Copyright © 1993-2001, Hugh Jackpage 1 Dynamic System Modeling and Control by Hugh Jack (Version 2.1, March 31, 2002) © Copyright 1993-2002 Hugh Jack page 1 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 1.1 BASIC TERMINOLOGY 20 1.2 EXAMPLE SYSTEM 21 1.3 SUMMARY 21 1.4 PRACTICE PROBLEMS 21 2. TRANSLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 2.1 INTRODUCTION 22 2.2 MODELING 24 2.2.1 Free Body Diagrams 25 2.2.2 Mass and Inertia 25 2.2.3 Gravity And Other Fields 28 2.2.4 Springs 31 2.2.5 Damping and Drag 36 2.2.6 Cables And Pulleys 39 2.2.7 Friction 41 2.2.8 Contact Points And Joints 43 2.3 SYSTEM EXAMPLES 44 2.4 OTHER TOPICS 53 2.5 SUMMARY 54 2.6 PRACTICE PROBLEMS 54 3. ANALYSIS OF DIFFERENTIAL EQUATIONS . . . . . . . . . . . . .60 3.1 INTRODUCTION 60 3.2 EXPLICIT SOLUTIONS 61 3.3 RESPONSES 70 3.3.1 First-order 71 3.3.2 Second-order 76 3.3.3 Other Responses 80 3.4 RESPONSE ANALYSIS 84 3.5 NON-LINEAR SYSTEMS 86 3.5.1 Non-Linear Differential Equations 86 3.5.2 Non-Linear Equation Terms 90 3.5.3 Changing Systems 93 3.6 CASE STUDY 99 3.7 SUMMARY 103 3.8 PRACTICE PROBLEMS 103 4. NUMERICAL ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 4.1 INTRODUCTION 112 4.2 THE GENERAL METHOD 112 4.2.1 State Variable Form 113 4.3 NUMERICAL INTEGRATION 121 4.3.1 Numerical Integration With Tools 121 page 2 4.3.2 Numerical Integration 126 4.3.3 Taylor Series 131 4.3.4 Runge-Kutta Integration 132 4.4 SYSTEM RESPONSE 139 4.4.1 Steady-State Response 139 4.5 DIFFERENTIATION AND INTEGRATION OF EXPERIMENTAL DATA 140 4.6 ADVANCED TOPICS 141 4.6.1 Switching Functions 141 4.6.2 Interpolating Tabular Data 144 4.6.3 Modeling Functions with Splines 145 4.6.4 Non-Linear Elements 147 4.7 CASE STUDY 147 4.8 SUMMARY 155 4.9 PRACTICE PROBLEMS 155 5. ROTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 5.1 INTRODUCTION 161 5.2 MODELING 162 5.2.1 Inertia 163 5.2.2 Springs 167 5.2.3 Damping 172 5.2.4 Levers 174 5.2.5 Gears and Belts 175 5.2.6 Friction 179 5.2.7 Permanent Magnet Electric Motors 181 5.3 OTHER TOPICS 182 5.4 DESIGN CASE 183 5.5 SUMMARY 187 5.6 PRACTICE PROBLEMS 187 6. INPUT-OUTPUT EQUATIONS . . . . . . . . . . . . . . . . . . . . . . . . .199 6.1 INTRODUCTION 199 6.2 THE DIFFERENTIAL OPERATOR 199 6.3 INPUT-OUTPUT EQUATIONS 202 6.3.1 Converting Input-Output Eqautions to State Equations 204 6.3.2 Integrating Input-Output Eqautions 206 6.4 DESIGN CASE 208 6.5 SUMMARY 217 6.6 PRACTICE PROBLEMS 217 6.7 REFERENCES 221 7. ELECTRICAL SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 7.1 INTRODUCTION 222 page 3 7.2 MODELING 222 7.2.1 Resistors 223 7.2.2 Voltage and Current Sources 225 7.2.3 Capacitors 229 7.2.4 Inductors 231 7.2.5 Op-Amps 232 7.3 IMPEDANCE 237 7.4 EXAMPLE SYSTEMS 239 7.5 PERMANENT MAGNET DC MOTORS 247 7.6 INDUCTION MOTORS 249 7.7 BRUSHLESS SERVO MOTORS 250 7.8 OTHER TOPICS 253 7.9 SUMMARY 253 7.10 PRACTICE PROBLEMS 253 8. FEEDBACK CONTROL SYSTEMS . . . . . . . . . . . . . . . . . . . . . .262 8.1 INTRODUCTION 262 8.2 TRANSFER FUNCTIONS 262 8.3 CONTROL SYSTEMS 264 8.3.1 PID Control Systems 266 8.3.2 Manipulating Block Diagrams 268 8.3.3 A Motor Control System Example 273 8.3.4 System Error 278 8.3.5 Controller Transfer Functions 282 8.3.6 State Variable Control Systems 282 8.3.7 Feedforward Controllers 283 8.3.8 Cascade Controllers 284 8.4 SUMMARY 284 8.5 PRACTICE PROBLEMS 284 9. PHASOR ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 9.1 INTRODUCTION 294 9.2 FOURIER TRANSFORMS FOR STEADY-STATE ANALYSIS 294 9.3 VIBRATIONS 301 9.4 SUMMARY 303 9.5 PRACTICE PROBLEMS 303 10. BODE PLOTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 10.1 INTRODUCTION 307 10.2 BODE PLOTS 311 10.3 SIGNAL SPECTRUMS 326 10.4 SUMMARY 327 10.5 PRACTICE PROBLEMS 327 10.6 LOG SCALE GRAPH PAPER 333 page 4 11. ROOT LOCUS ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336 11.1 INTRODUCTION 336 11.2 ROOT-LOCUS ANALYSIS 336 11.3 SUMMARY 344 11.4 PRACTICE PROBLEMS 345 12. NONLINEAR SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 12.1 INTRODUCTION 360 12.2 SYSTEM DIAGRAMS 360 12.3 SUMMARY 360 12.4 PRACTICE PROBLEMS 361 13. ANALOG INPUTS AND OUTPUTS . . . . . . . . . . . . . . . . . . . . .362 13.1 INTRODUCTION 362 13.2 ANALOG INPUTS 363 13.3 ANALOG OUTPUTS 370 13.4 SHIELDING 373 13.5 SUMMARY 375 13.6 PRACTICE PROBLEMS 375 14. CONTINUOUS SENSORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377 14.1 INTRODUCTION 377 14.2 INDUSTRIAL SENSORS 378 14.2.1 Angular Displacement 379 Potentiometers 379 14.2.2 Encoders 380 Tachometers 384 14.2.3 Linear Position 384 Potentiometers 384 Linear Variable Differential Transformers (LVDT)385 Moire Fringes 387 Accelerometers 388 14.2.4 Forces and Moments 391 Strain Gages 391 Piezoelectric 394 14.2.5 Liquids and Gases 396 Pressure 396 Venturi Valves 396 Coriolis Flow Meter 398 Magnetic Flow Meter 399 Ultrasonic Flow Meter 399 Vortex Flow Meter 399 Pitot Tubes 400 14.2.6 Temperature 400 page 5 Resistive Temperature Detectors (RTDs) 400 Thermocouples 401 Thermistors 403 Other Sensors 405 14.2.7 Light 405 Light Dependant Resistors (LDR) 405 14.3 INPUT ISSUES 406 14.4 SENSOR GLOSSARY 411 14.5 SUMMARY 412 14.6 REFERENCES 413 14.7 PRACTICE PROBLEMS 413 15. CONTINUOUS ACTUATORS . . . . . . . . . . . . . . . . . . . . . . . . . .417 15.1 INTRODUCTION 417 15.2 ELECTRIC MOTORS 417 15.2.1 Brushed DC Motors 418 15.2.2 AC Synchronous Motors 423 15.2.3 Brushless DC Motors 425 15.2.4 Stepper Motors 426 15.3 HYDRAULICS 428 15.4 OTHER SYSTEMS 429 15.5 SUMMARY 429 15.6 PRACTICE PROBLEMS 429 16. MOTION CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432 16.1 INTRODUCTION 432 16.2 MOTION PROFILES 433 16.3 MULTI AXIS MOTION 442 16.3.1 Slew Motion 442 Interpolated Motion 444 16.3.2 Motion Scheduling 445 16.4 SUMMARY 447 16.5 PRACTICE PROBLEMS 447 17. ELECTROMECHANICAL SYSTEMS . . . . . . . . . . . . . . . . . . . .450 17.1 INTRODUCTION 450 17.2 MATHEMATICAL PROPERTIES 450 17.2.1 Induction 450 17.3 EXAMPLE SYSTEMS 455 17.4 SUMMARY 462 17.5 PRACTICE PROBLEMS 462 18. FLUID SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 18.1 SUMMARY 463 page 6 18.2 MATHEMATICAL PROPERTIES 463 18.2.1 Resistance 464 18.2.2 Capacitance 466 18.2.3 Power Sources 468 18.3 EXAMPLE SYSTEMS 470 18.4 SUMMARY 472 18.5 PRACTICE PROBLEMS 472 19. THERMAL SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473 19.1 INTRODUCTION 473 19.2 MATHEMATICAL PROPERTIES 473 19.2.1 Resistance 473 19.2.2 Capacitance 475 19.2.3 Sources 476 19.3 EXAMPLE SYSTEMS 476 19.4 SUMMARY 479 19.5 PRACTICE PROBLEMS 479 20. LAPLACE TRANSFER FUNCTIONS . . . . . . . . . . . . . . . . . . . .480 20.1 INTRODUCTION 480 20.2 THE LAPLACE TRANSFORM 480 20.2.1 A Few Transforms 482 20.2.2 Impulse Response (or Why Laplace Transforms Work) 484 20.3 MODELING MECHANICAL SYSTEMS 487 20.4 MODELING ELECTRICAL SYSTEMS 488 20.5 USING LAPLACE TRANSFORMS 489 20.5.1 Solving Partial Fractions 494 20.5.2 Input Functions 502 20.5.3 Examples 502 20.6 A MAP OF TECHNIQUES FOR LAPLACE ANALYSIS 507 20.7 NON-LINEAR ELEMENTS 508 20.8 SUMMARY 508 20.9 PRACTICE PROBLEMS 509 20.10 REFERENCES 520 21. CONTROL SYSTEM ANALYSIS . . . . . . . . . . . . . . . . . . . . . . .521 21.1 INTRODUCTION 521 21.2 CONTROL SYSTEMS 521 21.2.1 PID Control Systems 523 21.2.2 Analysis of PID Controlled Systems With Laplace Transforms 525 21.2.3 Finding The System Response To An Input 528 21.2.4 Controller Transfer Functions 533 21.3 ROOT-LOCUS PLOTS 533 page 7 21.3.1 Approximate Plotting Techniques 537 21.4 DESIGN OF CONTINUOUS CONTROLLERS 541 21.5 SUMMARY 541 21.6 PRACTICE PROBLEMS 542 22. LABORATORY GUIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 22.1 Lab 1 - Introduction to Resources and Tutorials 547 22.1.1 Tutorial 1a - Creating Web Pages 547 22.1.2 Tutorial 1b - Introduction to Mathcad, Working Model 2D and The Internet 549 22.1.3 Presentation 1a - Introduction to Library Searches 550 22.2 Lab 2 - Computer Based Data Collection 551 22.2.1 Prelab 2a - Tutorial for LabVIEW Programming 551 22.2.2 Prelab 2b - Overview of Labview and the DAQ Cards 552 22.2.3 Experiment 2 - Introduction to LabVIEW and the DAQ Cards 553 22.3 Lab 3 - Sensors and More Labview 557 22.3.1 Prelab 3 - Sensors 557 22.3.2 Experiment 3 - Measurement of Sensor Properties 558 22.4 Lab 4 - Motors 559 22.4.1 Prelab 4a - Permanent Magnet DC Motors 559 22.4.2 Experiment 4a - Modeling of a DC Motor 561 22.5 Lab 5 - Basic Control Systems 562 22.5.1 Prelab 6a - Servomotor Proportional Control Systems 562 22.5.2 Experiment 5a - Servomotor Proportional Control Systems564 22.6 Lab 6 - Basic System Components 565 22.6.1 Prelab 6a - Mechanical Components 565 22.6.2 Experiment 6a - Mechanical Components 569 22.7 Lab 7 - Oscillating Systems 570 22.7.1 Prelab 7a - Oscillating Systems 570 22.7.2 Experiment 7a - Oscillation of a Torsional Spring 571 22.8 Lab 8 - Servo Control Systems 572 22.8.1 Prelab 5a - Research 572 22.8.2 Experiment 5a - Tutorial and programming 573 22.9 TUTORIAL - ULTRA 5000 DRIVES AND MOTORS 573 22.10 Lab 9 - Filters 582 22.10.1 Prelab 9 - Filtering of Audio Signals 582 22.10.2 Experiment 9 - Filtering of Audio Signals 585 22.11 Lab 10 - Stepper Motors 586 22.11.1 Prelab 10 - Stepper Motors 586 22.11.2 Experiment 9 - Stepper Motors 587 22.12 TUTORIAL - STEPPER MOTOR CONTROLLERS (by A. Blauch and H. Jack) 588 22.13 Lab 11 - Variable Frequency Drives 592 22.13.1 Prelab 11 - Variable Frequency Drives 592 page 8 22.13.2 Experiment 11 - Variable Frequency Drives 592 22.14 TUTORIAL - ALLEN BRADLEY 161 VARIABLE FREQUENCY DRIVES 593 22.15 TUTORIAL - ULTRA 100 DRIVES AND MOTORS 595 22.16 TUTORIAL - DVT CAMERAS (UPDATE FROM 450???) 598 23. WRITING REPORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600 23.1 WHY WRITE REPORTS? 600 23.2 THE TECHNICAL DEPTH OF THE REPORT 600 23.3 TYPES OF REPORTS 601 23.3.1 Laboratory 601 An Example First Draft of a Report 602 An Example Final Draft of a Report 609 23.3.2 Research 609 23.3.3 Project 609 23.3.4 Executive 610 23.3.5 Consulting 610 23.3.6 Interim 610 23.4 ELEMENTS 610 23.4.1 Figures 611 23.4.2 Tables 612 23.4.3 Equations 613 23.4.4 Experimental Data 613 23.4.5 Result Summary 614 23.4.6 References 614 23.4.7 Acknowledgments 614 23.4.8 Appendices 615 23.5 GENERAL FORMATTING 615 24. MATHEMATICAL TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617 24.1 INTRODUCTION 617 24.1.1 Constants and Other Stuff 618 24.1.2 Basic Operations 619 Factorial 620 24.1.3 Exponents and Logarithms 620 24.1.4 Polynomial Expansions 621 24.1.5 Practice Problems 622 24.2 FUNCTIONS 625 24.2.1 Discrete and Continuous Probability Distributions 625 24.2.2 Basic Polynomials 625 24.2.3 Partial Fractions 627 24.2.4 Summation and Series 630 24.2.5 Practice Problems 631 24.3 SPATIAL RELATIONSHIPS 632 24.3.1 Trigonometry 632 page 9 24.3.2 Hyperbolic Functions 637 Practice Problems 639 24.3.3 Geometry 640 24.3.4 Planes, Lines, etc. 657 24.3.5 Practice Problems 659 24.4 COORDINATE SYSTEMS 661 24.4.1 Complex Numbers 661 24.4.2 Cylindrical Coordinates 664 24.4.3 Spherical Coordinates 665 24.4.4 Practice Problems 666 24.5 MATRICES AND VECTORS 667 24.5.1 Vectors 667 24.5.2 Dot (Scalar) Product 668 24.5.3 Cross Product 673 24.5.4 Triple Product 675 24.5.5 Matrices 675 24.5.6 Solving Linear Equations with Matrices 680 24.5.7 Practice Problems 681 24.6 CALCULUS 686 24.6.1 Single Variable Functions 686 Differentiation 686 Integration 689 24.6.2 Vector Calculus 693 24.6.3 Differential Equations 695 First-order Differential Equations 696 Guessing 697 Separable Equations 697 Homogeneous Equations and Substitution 698 Second-order Differential Equations 699 Linear Homogeneous 699 Nonhomogeneous Linear Equations 700 Higher Order Differential Equations 702 Partial Differential Equations 702 24.6.4 Other Calculus Stuff 703 24.6.5 Practice Problems 703 24.7 NUMERICAL METHODS 709 24.7.1 Approximation of Integrals and Derivatives from Sampled Data 709 24.7.2 Euler First-order Integration 710 24.7.3 Taylor Series Integration 710 24.7.4 Runge-Kutta Integration 711 24.7.5 Newton-Raphson to Find Roots 711 24.8 LAPLACE TRANSFORMS 712 24.8.1 Laplace Transform Tables 712 24.9 z-TRANSFORMS 715 page 10 24.10 FOURIER SERIES 718 24.11 TOPICS NOT COVERED (YET) 718 24.12 REFERENCES/BIBLIOGRAPHY 719 25. A BASIC INTRODUCTION TO ‘C’ . . . . . . . . . . . . . . . . . . . . . .720 25.1 WHY USE ‘C’? 720 25.2 BACKGROUND 720 25.3 PROGRAM PARTS 720 25.4 HOW A ‘C’ COMPILER WORKS 728 25.5 STRUCTURED ‘C’ CODE 729 25.6 ARCHITECTURE OF ‘C’ PROGRAMS (TOP-DOWN) 730 25.6.1 How? 730 25.6.2 Why? 731 25.7 CREATING TOP DOWN PROGRAMS 731 25.8 HOW THE BEAMCAD PROGRAM WAS DESIGNED 732 25.8.1 Objectives: 732 25.8.2 Problem Definition: 732 25.8.3 User Interface: 733 Screen Layout (also see figure): 733 Input: 733 Output: 733 Help: 733 Error Checking: 734 Miscellaneous: 734 25.8.4 Flow Program: 735 25.8.5 Expand Program: 735 25.8.6 Testing and Debugging: 737 25.8.7 Documentation 737 Users Manual: 738 Programmers Manual: 738 25.8.8 Listing of BeamCAD Program. 738 25.9 PRACTICE PROBLEMS 738 26. UNITS AND CONVERSIONS . . . . . . . . . . . . . . . . . . . . . . . . . .740 26.1 HOW TO USE UNITS 740 26.2 HOW TO USE SI UNITS 741 26.3 THE TABLE 741 26.4 ASCII, HEX, BINARY CONVERSION 745 26.5 G-CODES 747 27. ATOMIC MATERIAL DATA . . . . . . . . . . . . . . . . . . . . . . . . . . .751 28. MECHANICAL MATERIAL PROPERTIES . . . . . . . . . . . . . . .751 28.1 FORMULA SHEET 754 page 11 Course Number:EGR 345 Course Name:Dynamic Systems Modeling and Control Academic Unit:Padnos School of Engineering Semester:Fall 2000 Class Times:Lecture: 1-2pm - Mon, Wed, Fri in EC312 Lab 1: 8-11am - Tues - Dr. Adamczyk Lab 2: 1-4am - Thurs - Dr. Adamczyk Lab 3: 8-11am - Fri - Dr. Jack Description: Mathematical modeling of mechanical, electrical, fluid, and thermal dynamic systems involving energy storage and transfer by lumped parameter linear elements. Topics include model building, Laplace transforms, transfer functions, system response and stability, Fourier methods, frequency response feedback control, control methods, and computer simulation. Emphasis on linear mechanical systems. Laboratory. page 12 Prerequisites:EGR 214, MTH 302, ENG 150 Corequisites:EGR 314 - Dynamics Instructor:Dr. Hugh Jack, Office: 718 Eberhard Center Office hours: 2-3 Mon, Wed, Fri Phone: 771-6755 Email:
[email protected] Web: http://claymore.engineer.gvsu.edu Textbook:Close and Frederick, Modeling and Analysis of Dynamic Systems, Sec- ond Edition, Wiley, 1995. Jack, H. EGR345 Dynamic Systems Modeling and Control Course Notes, Grand Valley State University Software:Mathcad Working Model 2D Netscape Communicator page 13 FTP/Telnet Labview Excel Goals: The main objective of this course is to develop your knowledge and ability to mathematically model, simulate, and analyze dynamic systems. In the lab you will study the time and frequency response of dynamic systems and further develop your laboratory, data analysis, and report writing skills. During this course you will practice the application of differential equations to the solution of practical engineering problems and then verify some of these solutions in the laboratory. The overall goal is to improve your engineering problem solving ability in the area of time-varying systems. Another major objective is to improve your technical writing skills. To this end, this course has been designated a supplemental writing skills (SWS) course and significant time and effort will be spent on writing instruction and the creation of technical reports. page 14 Instruction Methods: Lecture, discussion, laboratories, assignments and projects. Prerequisite Topics: 1. Electric circuits 2. Statics 3. Trigonometry, algebra, matrices 4. Calculus, differential equations and Laplace transforms 5. Computer applications and programming 6. Physics Topics: 1. Introduction 2. Systems variables and modeling 3. Translation 4. Rotation 5. Electrical systems 6. First and second order systems 7. Laplace transforms 8. Laplacian analysis 9. Block diagrams for modeling and analysis 10. Feedback systems for modeling and control 11. Electromechanical systems 12. Thermal systems 13. Fluid systems Grading:Design project10% Labs and SWS writing skills40% Quizzes and assignments20% Final exam 30% Tests and assignments will be given at natural points during the term as new page 15 material is covered. Laboratory work will be assigned to reinforce lecture material and expose the student to practical aspects of systems modeling and control. Special attention will be paid to writing skills in the laboratories. A final examination will be given to conclude the work, and test the students global comprehension of the material. A design project will be done in class to emphasize lecture and lab topics. Details of this will be announced later. SWS Required Statement: This course is designated SWS (Supplemental Writing Skills). As a result you MUST have already taken and passed ENG150 with a grade of C or better, or have passed the advanced placement exam with a score of 3 or higher. If you have not already done this, please see the instructor. The official university SWS statement is: “ This course is designated SWS (Supplemental Writing Skills). Completion of English 150 with a grade of C or better (not C-) is the prerequisite. SWS credit will not be given to a student who completes the course before the prerequisite. SWS courses adhere to certain guidelines. Students turn in a total of at least 3,000 words or writing during the term. Part of that total may be essay exams, but a substantial amount of it is made up of finished essays or reports or research papers. The instructor works with page 16 the students on revising drafts of their papers, rather than simply grading the finished pieces of writing. At least four hours of class time are devoted to writing instruction. At least one third of the final grade in the course is based on the writing assignments.” SWS Practical Implementation: The main source of writing grades are the laboratories and they are worth 40% of the final grade. You may look at all of this grade as writing. If the level of writing is not acceptable it will be returned for rewriting and it will be awarded partial marks. It is expected that the level of writing improve based upon feedback given for previous laboratory reports. A lab that would have received a grade of ‘A’ at the beginning of the term may very well receive an ‘F’ at the end of the term. It is expected that a typical lab will include 500-1000 words, and there will be approximately 10 labs in the course. Writing instruction will be given in the labs at appropriate times and this will total four hours. Grading Scale:A100 - 90 A- 89-80 B+ 79-77 B 76-73 page 17 B- 72-70 C+ 69-67 C 66-63 C- 62-60 D+ 59-57 D 56-55 page 18 PREFACE How to use the book. • read the chapters and do drill problems as you read • examine the case studies - these pull together concepts from previous chapters • problems at the ends of chapters are provided for further practice Tools that should be used include, • graphing calculator that can solve differential equations, such as a TI-85 • computer algebra software that can solve differential equations, such as Mathcad Supplemental materials at the end of this book include, • a lab guide for the course • a writing guide • a summary of math topics important for engineers • a table of generally useful engineering units • properties of common materials Acknowledgement to, Dr. Hal Larson for reviewing the calculus and numerical methods chapters Dr. Wendy Reffeor for reviewing the translation chapter Student background a basic circuits course a basic statics and mechanics of materials course math up to differential equations a general knowledge of physics computer programming, preferably in ’C’ TO BE DONE small italicize variables and important terms fix equation numbering (auto-numbering?) fix subscripts and superscripts fix problem forms to include therefores, mark FBDs, etc. big proofread and complete writing chapters add more drill problems and solutions chapter numerical add ti-89 integration methods chapter rotation replace the rotational case with IC motor chapter circuits page 19 complete the induction motor section complete the brushless motor section add a design case - implement a differential equation with op-amps chapter frequency analysis add problems chapter non-linear systems develop chapter chapter motion control add accceleration profile for velocity control add a setpoint scheduler program add a multiaxis motion control program chapter magnetic consider adding/writing this chapter chapter fluids consider adding/writing this chapter chapter thermal consider adding/writing this chapter chapter laplace consider adding/writing these chapters chapter lab guide update the labs and rewrite where necessary chapter c programming review section add problems page 20 1. INTRODUCTION 1.1 BASIC TERMINOLOGY • Lumped parameter (masses and springs) • Distributed parameters (stress in a solid) • Continuous vs. Discrete • Linear vs. Non-linear • linearity and superposition • reversibility • through and across variables • Analog vs. Digital • process vs. controllers Topics: Objectives: page 21 1.2 EXAMPLE SYSTEM • Servo control systems • Robot 1.3 SUMMARY • 1.4 PRACTICE PROBLEMS 1. page 22 2. TRANSLATION 2.1 INTRODUCTION If the velocity and acceleration of a body are both zero then the body will be static. When forces act on the body they may cause motion. If the applied forces are balanced, and cancel each other out, the body will not accelerate. If the forces are unbalanced then the body will accelerate. If all of the forces act through the center of mass then the body will only translate. Forces that do not act through the center of mass will also cause rota- tion to occur. This chapter will focus only on translational systems. The equations of motion for translating bodies are shown in Figure 1. These state simply that velocity is the first derivative of position, and velocity is the first derivative of acceleration. Conversely the acceleration can be integrated to find velocity, and the veloc- ity can be integrated to find position. Therefore, if we know the acceleration of a body, we can determine the velocity and position. Finally, when a force is applied to a mass, an acceleration can be found by dividing the net force by the mass. Topics: Objectives: • To be able to develop differential equations that describe translating systems. • Basic laws of motion • Gravity, inertia, springs, dampers, cables and pulleys, drag, friction, FBDs • System analysis techniques • Design case page 23 Figure 1 Velocity and acceleration of a translating mass An example application of these fundamental laws is shown in Figure 2. The initial conditions of the system are supplied (and are normally required to solve this type of prob- lem). These are then used to find the state of the system after a period of time. The solu- tion begins by integrating the acceleration, and using the initial velocity value for the integration constant. So at t=0 the velocity will be equal to the initial velocity. This is then integrated once more to provide the position of the object. As before the initial position is used for the integration constant. This equation is then used to calculate the position after a period of time. Notice that the units are used throughout the calculations. This is good practice for any engineer. x,v,a v t ( ) d dt ---- - ¸ , ¸ _ x t ( ) = a t ( ) d dt ---- - ¸ , ¸ _ 2 x t ( ) d dt ----- ¸ , ¸ _ v t ( ) = = OR x t ( ) v t ( ) t d ∫ a t ( ) t d ∫ ∫ = = v t ( ) a t ( ) t d ∫ = (1) (2) (3) (4) a t ( ) F t ( ) M ---------- = (5) where, x v a , , position, velocity and acceleration = M mass of the body = F an applied force = equations of motion F page 24 Figure 2 Sample state calculation for a translating mass, with initial conditions 2.2 MODELING When modeling translational systems it is common to break the system into parts. These parts are then described with Free Body Diagrams (FBDs). Common components that must be considered when constructing FBDs are listed below, and are discussed in following sections. • gravity and other fields - apply non-contact forces • inertia - opposes acceleration and deceleration • springs - resist deflection • dampers and drag - resist motion • friction - opposes relative motion between bodies in contact Given an initial (t=0) state of x=5m, v=2m/s, a=3ms -2 , find the system state 5 seconds later assuming constant acceleration. x 0 5m = The initial conditions for the system at time t=0 are, v 0 2ms 1 – = a 0 3ms 2 – = The constant acceleration can be integrated to find the velocity as a function of time. v t ( ) a 0 t d ∫ a 0 t C + a 0 t v 0 + = = = Next, the velocity can be integrated to find the position as a function of time. x t ( ) v t ( ) t d ∫ a 0 t v 0 + ( ) t d ∫ a 0 2 ----- t 2 v 0 t x 0 + + = = = This can then be used to calculate the position of the mass after 5 seconds. x 5 ( ) a 0 2 -----t 2 v 0 t x 0 + + = ∴ 3ms 2 – 2 --------------- 5s ( ) 2 2ms 1 – 5s ( ) 5m + + = ∴ 37.5m 10m 5m + + 52.5m = = (6) (7) Note: units are very important and should nor- mally be carried through all calculations. Note: v t ( ) a 0 t C + = v 0 a 0 0 ( ) C + = v 0 C = page 25 • cables and pulleys - redirect forces • contact points/joints - transmit forces through up to 3 degrees of freedom 2.2.1 Free Body Diagrams Free Body Diagrams (FBDs) allow us to reduce a complex mechanical system into smaller, more manageable pieces. The forces applied to the FBD can then be summed to provide an equation for the piece. These equations can then be used later to do an analysis of system behavior. These are required elements for any engineering problem involving rigid bodies. An example of FBD construction is shown in Figure 3. In this case there is a mass sitting atop a spring. An FBD can be drawn for the mass. In total there are two obvious forces applied to the mass, gravity pulling the mass downward, and a spring pushing the mass upwards. The FBD for the spring has two forces applied at either end. Notice that the spring force acting on the mass, and on the spring have an equal magnitude, but opposite direction. Figure 3 Free body diagram example 2.2.2 Mass and Inertia In a static system the sum of forces is zero and nothing is in motion. In a dynamic system the sum of forces is not zero and the masses accelerate. The resulting imbalance in forces acts on the mass causing it to accelerate. For the purposes of calculation we create a virtual reaction force, called the inertial force. This force is also known as D’Alembert’s (pronounced as daa-lamb-bear) force. It can be included in calculations in one of two ways. The first is to add the inertial force to the FBD and then add it into the sum of M = 10 kg k = 20 N/m FBD Mass: Mg F R1 FBD Spring: F R2 F R1 page 26 forces, which will equal zero. The second method is known as D’Alembert’s equation where all of the forces are summed and set equal to the inertial force, as shown in Figure 4. The acceleration is proportional to the inertial force and inversely proportional to the mass. Figure 4 D’Alembert’s and Netwon’s equation An application of Newton’s form to FBDs can be seen in Figure 5. In the first case an inertial force is added to the FBD. This force should be in an opposite direction (left here) to the positive direction of the mass (right). When the sum of forces equation is used then the force is added in as a normal force component. In the second case Newton’s equa- tion is used so the force is left off the FBD, but added to the final equation. In this case the sign of the inertial force is positive if the assumed positive direction of the mass matches the positive direction for the summation. F ∑ Ma = (11) F Ma – ∑ 0 = (12) (Newton’s) (D’Alembert’s) page 27 Figure 5 Free body diagram and inertial forces An example of the application of Newton’s equation is shown in Figure 6. In this example there are two unbalanced forces applied to a mass. These forces are summed and set equal to the inertial force. Solving the resulting equation results in acceleration values in the x and y directions. In this example the forces and calculations are done in vector for- mat for convenience and brevity. x F x ∑ F M d dt ----- ¸ , ¸ _ 2 x = = F Ma M d dt ----- ¸ , ¸ _ 2 x = Newton’s form D’Alemberts’s form: F x ∑ F M d dt ---- - ¸ , ¸ _ 2 x – 0 = = x F + + F x ∑ F – M d dt ---- - ¸ , ¸ _ 2 x + 0 = = + or or F x ∑ F – M – ( ) d dt ---- - ¸ , ¸ _ 2 x = = + M M Note: If using Newton’s form the sign of the inertial force should be positive if the positive direction for the summation and the mass are the same, otherwise if they are opposite then the sign should be negative. Note: If using an inertial force then the direction of the force should be opposite to the positive motion direction for the mass. page 28 Figure 6 Sample acceleration calculation 2.2.3 Gravity And Other Fields Gravity is a weak force of attraction between masses. In our situation we are in the proximity of a large mass (the earth) which produces a large force of attraction. When ana- lyzing forces acting on rigid bodies we add this force to our FBDs. The magnitude of the force is proportional to the mass of the object, with a direction toward the center of the earth (down). The relationship between mass and force is clear in the metric system with mass having the units Kilograms (kg), and force the units Newtons (N). The relationship between these is the gravitational constant 9.81N/kg, which will vary slightly over the sur- face of the earth. The Imperial units for force and mass are both the pound (lb.) which often causes confusion. To reduce this confusion the units for force is normally modified to be, lbf. An example calculation including gravitational acceleration is shown in Figure 7. The 5kg mass is pulled by two forces, gravity and the arbitrary force, F. These forces are described in vector form, with the positive z axis pointing upwards. To find the equations M=10kg F 1 5 4 – 0 N = F 2 7 – 3 – 0 N = If both forces shown act through the center of mass, what is the acceleration of the ball? F ∑ F 1 F 2 + Ma = = 5 4 – 0 N 7 – 3 – 0 N + ∴ 10Kg ( )a = a ∴ 1 10Kg ------------- ¸ , ¸ _ 2 – 7 – 0 N 0.2 – 0.7 – 0 Kgm s 2 ------------ ¸ , ¸ _ 1 Kg ------- 0.2 – 0.7 – 0 m s 2 ---- = = = page 29 of motion the forces are summed. To eliminate the second derivative on the inertia term the equation is integrated twice. The result is a set of three vector equations that describe the x, y and z components of the motion. Notice that the units have been carried through these calculations. page 30 Figure 7 Gravity vector calculations F g g M 5Kg = g 0 0 9.81 – N Kg ------- 0 0 9.81 – m s 2 ---- = = F ∑ Mg F + M d dt ----- ¸ , ¸ _ 2 X t ( ) = = Assume we have a mass that is acted upon by gravity and a second constant force vector. To find the position of the mass as a function of time we first define the grav- ity vector, and position components for the system. X t ( ) x t ( ) y t ( ) z t ( ) = F F f x f y f z = Next sum the forces and set them equal to inertial resistance. 5Kg 0 0 9.81 – m s 2 ---- f x f y f z + 5Kg d dt ----- ¸ , ¸ _ 2 x t ( ) y t ( ) z t ( ) = 0 0 9.81 – m s 2 ---- 0.2Kg 1 – f x f y f z + d dt ----- ¸ , ¸ _ 2 x t ( ) y t ( ) z t ( ) = 0 0 9.81 – m s 2 ---- 0.2Kg 1 – f x f y f z + t v x 0 v y 0 v z 0 + d dt ---- - ¸ , ¸ _ x t ( ) y t ( ) z t ( ) = Integrate twice to find the position components. 1 2 --- 0 0 9.81 – m s 2 ---- 0.2Kg 1 – f x f y f z + t 2 v x 0 v y 0 v z 0 t x 0 y 0 z 0 + + x t ( ) y t ( ) z t ( ) = x t ( ) y t ( ) z t ( ) 0.1f x t 2 v x 0 t x 0 + + 0.1f y t 2 v y 0 t y 0 + + 9.81 – 2 ------------- 0.1f z + ¸ , ¸ _ t 2 v z 0 t z 0 + + m = Note: When an engineer solves a problem they will always be looking at the equations and unknowns. In this case there are three equa- tions, and there are 9 constants/givens fx, fy, fz, vx0, vy0, xz0, x0, y0 and z0. There are 4 variables/unknowns x, y, z and t. Therefore with 3 equations and 4 unknowns only one value (4-3) is required to find all of the unknown values. F g Mg = page 31 Like gravity, magnetic and electrostatic fields can also apply forces to objects. Magnetic forces are commonly found in motors and other electrical actuators. Electro- static forces are less common, but may need to be considered for highly charged systems. Figure 8 Drill problem: find the acceleration of the FBD 2.2.4 Springs A spring is based on an elastic material that will provide an opposing force when deformed. The most common springs are made of metals or plastics. The properties of the spring are determined by the Young’s modulus (E) of the material and the geometry of the spring. A primitive spring is shown in Figure 9. In this case the spring is a solid member. The relationship between force and displacement is determined by the basic mechanics of materials relationship. In practice springs are more complex, but the parameters (E, A and L) are combined into a more convenient form. This form is known as Hooke’s Law. Given, Find the acceleration. F 1 3 4 0 N = g 0 9.81 – 0 N Kg ------- = M 2Kg = M F1 g FBD: page 32 Figure 9 A solid member as a spring Hooke’s law does have some limitations that engineers must consider. The basic equation is linear, but as a spring is deformed the material approaches plastic deformation, and the modulus of elasticity will change. In addition the geometry of the object changes, also changing the effective stiffness. Springs are normally assumed to be massless. This allows the inertial effects to be ignored, such as a force propagation delay. In applications with fast rates of change the spring mass may become significant, and they will no longer act as an ideal device. The cases for tension and compression are shown in Figure 10. In the case of com- pression the spring length has been made shorter than its’ normal length. This requires that a compression force be applied. For tension both the displacement from neutral and the required force change direction. It is advisable when solving problems to assume a spring is either in tension or compression, and then select the displacement and force directions accordingly. δ L EA ------- ¸ , ¸ _ F = δ L F F EA L ------- ¸ , ¸ _ δ = F Kδ = (Hooke’s law) page 33 Figure 10 Sign conventions for spring forces and displacements Previous examples have shown springs with displacement at one end only. In Fig- ure 11 springs are shown that have movement at both ends. In these cases the force applied to the spring is still related to the relative compression and tension. The primary difference is that care is required to correctly construct the expressions for the tension or compres- sion forces. In all cases the forces on the springs must be assumed and drawn as either ten- sile or compressive. In the first example the displacement and forces are tensile. The displacement at the left is tensile, so it will be positive, but on the right hand side the dis- placement is compressive so it is negative. In the second example the force and both dis- placements are shown as tensile, so the terms are both positive. In the third example the force is shown as compressive, while the displacements are both shown as tensile, so both terms are negative. NOTE: the symbols for springs, resistors and inductors are quite often the same or simi- lar. You will need to remember this when dealing with complex systems - and espe- cially in this course where we deal with both types of systems. tension as positive compression as positive F c K s ∆x = F c F t F t K s ∆x = K s K s ∆x ∆x ∆x deformed length = ASIDE: a spring has a natural or unde- formed length. When at this length it is neither in tension or compression page 34 Figure 11 Examples of forces when both sides of a spring can move Sometimes the true length of a spring is important, and the deformation alone is insufficient. In these cases the deformation can be defined as a deformed and undeformed length, as shown in Figure 12. Figure 12 Using the actual spring length In addition to providing forces, springs may be used as energy storage devices. Figure 13 shows the equation for energy stored in a spring. ∆x 1 ∆x 2 F F K s F K s ∆x 1 ∆x 2 – ( ) = ∆x 1 ∆x 2 F F K s F K s ∆x 1 ∆x 2 + ( ) = ∆x 1 ∆x 2 F F K s F K s ∆x 1 – ∆x 2 – ( ) = ETC.... Aside: it is useful to assume that the spring is either in tension or compression, and then make all decisions based on that assumption. ∆x deformed length = ∆x l 1 l 0 – = where, l 0 the length when undeformed = l 1 the length when deformed = page 35 Figure 13 Energy stored in a spring Figure 14 Drill problem: Deformation of a two spring system E P K ∆x ( ) 2 2 ------------------ = Given, Find F1 and F2 separately (don’t 10m F 1 K s K s ∆x 1 ∆x 2 F 2 K s 10 N m ---- = ∆x 1 0.1m = ∆x 2 0.1m = try to solve at the same time) Aside: it can help to draw a FBD of the pin. page 36 Figure 15 Drill problem: Draw the FBDs for the masses 2.2.5 Damping and Drag A damper is a component that resists motion. The resistive force is relative to the rate of displacement. As mentioned before, springs store energy in a system but dampers dissipate energy. Dampers and springs are often used to compliment each other in designs. Damping can occur naturally in a system, or can be added by design. A physical damper is pictured in Figure 16. This one uses a cylinder that contains a fluid. There is a moving rod and piston that can slide along the cylinder. As the piston moves fluid is forced through a small orifice in the cylinder. When moved slowly the fluid moves easily, but when moved quickly the pressure required to force the fluid through the orifice rises. This rise in pressure results in a higher force of resistance. In ideal terms any motion would result in an opposing force. In reality there is also a break-away force that needs to be applied before motion begins. Other manufacturing variations could also lead to other Draw the FBDs and sum the forces for the masses K s F M1 M2 page 37 small differences between dampers. Normally these cause negligible effects. Figure 16 A physical damper The basic equation for an ideal damper in compression is shown in Figure 17. In this case the force and displacement are both compressive. The force is calculated by mul- tiplying the damping coefficient by the velocity, or first derivative of position. Aside from the use of the first derivative of position, the analysis of dampers in systems is similar to that of springs. Figure 17 An ideal damper Damping can also occur when there is relative motion between two objects. If the objects are lubricated with a viscous fluid (e.g., oil) then there will be a damping effect. In the example in Figure 18 two objects are shown with viscous friction (damping) between them. When the system is broken into free body diagrams the forces are shown to be a function of the relative velocities between the blocks. fluid piston orifice motion fluid F x Kd F K d d dt ----- ¸ , ¸ _ x = (15) Aside: The symbol shown is typically used for dampers. It is based on an old damper design called a dashpot. It was constructed using a small piston inside a larger pot filled with oil. page 38 Figure 18 Viscous damping between two bodies with relative motion A damping force is proportional to the first derivative of position (velocity). Aero- dynamic drag is proportional to the velocity squared. The equation for drag is shown in Figure 19 in vector and scalar forms. The drag force increases as the square of velocity. Normally, the magnitude of the drag force coefficient ’D’ is approximated theoretically and/or measured experimentally. The drag coefficient is a function of material type, sur- face properties, object size and object geometry. Figure 19 Aerodynamic drag K d x 1 F d K d x 1 ' x 2 ' – ( ) = x 2 F d K d x 1 ' x 2 ' – ( ) = Aside: Fluids, such as oils, have a significant viscosity. When these materials are put in shear they resist the motion. The higher the shear rate, the greater the resistance to flow. Normally these forces are small, except at high velocities. v F F D v v – = page 39 Figure 20 Drill problem: Find the required forces on the dampers 2.2.6 Cables And Pulleys Cables are useful when transmitting tensile forces or displacements. The centerline of the cable becomes the centerline for the force. And, if the force becomes compressive, the cable goes limp, and will not transmit force. A cable by itself can be represented as a force vector. When used in combination with pulleys a cable can redirect a force vector, or multiply a force. Typically we assume that a pulley is massless and frictionless (in the rotation chap- ter we will assume they are not). If this is the case then the tension in the cable on both sides of the pulley is equal as shown in Figure 21. If we are pushing the cylinder at the given velocities below, what is the required force? k d 0.1 Ns m ------ = d dt ---- -x 1 0.1 m s ---- = d dt ---- -x 2 0.3 m s ---- – = F F page 40 Figure 21 Tension in a cable over a massless frictionless pulley If we have a pulley that is fixed and cannot rotate the cable must slide over the sur- face of the pulley. In this case we can use the friction to determine the relative ratio of forces between the sides of the pulley, as shown in Figure 22. Figure 22 Friction of a belt over a fixed drum T 2 T 1 T 1 T 2 = for a massless frictionless pulley T 2 T 1 ----- e µ k ∆θ ( ) = T 2 T 1 ∆θ page 41 Figure 23 Drill problem: Find the force required to overcome friction Although the discussion in this section has focused on cables and pulleys, the the- ory also applies to belts and drums. 2.2.7 Friction Viscous friction was discussed before, where a lubricant would provide a damping effect between two moving objects. In cases where there is no lubricant, and the joint is dry, we may experience dry coulomb friction. In this case the object will stick in place until a maximum force is overcome. After that the object will begin to slide and a constant force will result. Figure 24 shows the classic model for friction. The force on the horizontal axis is the force applied to the friction surfaces while the vertical axis is the resulting friction force. Beneath the slip force the object will stay in place. When the slip force is exceeded M F µ k 0.2 = Given, Find F to lift/drop the mass slowly. M 1Kg = page 42 the object will begin to slip, and the resulting kinetic friction force is relatively constant. If the object begins to travel fast then the kinetic friction force will decrease. It is also com- mon to forget that friction is bidirectional, but it always opposes the applied force. The friction force is a function of the normal force across the friction surface and the coeffi- cient of friction. The coefficient of friction is a function of the materials, surface texture and surface shape. Figure 24 Dry friction Many systems use kinetic friction to dissipate energy from a system as heat, sound and vibration. N F k µ k N = F s µ s N ≤ F F s F k F s , F F k F s F g Block begins to slip Note: When solving problems with friction remember that the friction force will always equal the applied force until slip occurs. After that the friction is approximately con- stant. In addition, the friction forces will change direction to oppose an applied force, or motion. page 43 Figure 25 Drill problem: find the accelerations 2.2.8 Contact Points And Joints A system is built by connecting components together. These connections can be rigid or moving. In solid connections all forces and moments are transmitted and the two pieces act as a single rigid body. In moving connections there is at least one degree of free- dom. If we limit this thought to translation only, there are up to three degrees of freedom between parts, x, y and z. In any direction there is a degree of freedom, force cannot be transmitted. When constructing FBDs for a system we must break all of the components into individual rigid bodies. Where the mechanism has been broken the contact forces must be added to both of the separated pieces. Consider the example in Figure 26. At joint A the forces are written as two components in the x and y directions. For joint B the force com- ponents with equal magnitudes but opposite directions are added to both FBDs. Find the acceleration of the block for both angles indicated. 1 0 k g θ 1 5° = θ µ s 0.3 = θ 2 35° = µ k 0.2 = page 44 Figure 26 FBDs for systems with connected members 2.3 SYSTEM EXAMPLES An orderly approach to system analysis can simplify the process of analyzing large systems. The list of steps below is based on general observations of good problem solving techniques. 1. Assign letters/numbers to designate components (if not already done) - this will allow you to refer to components in your calculations. 2. Define positions and directions for any moving masses. This should include the selection of reference points. 3. Draw free body diagrams for each component, and add forces (inertia is optional). 4. Write equations for each component by summing forces. 5.(next chapter) Combine the equations by eliminating unwanted variables. 6.(next chapter) Develop a final equation that relates input (forcing functions) to outputs (results). Consider the cart in Figure 27. On the left is a force, it is opposed by a spring and damper on the right. The basic problem definition already contains all of the needed defi- nitions, so no others are required. The FBD for the mass shows the force and the reaction A B M1 M2 F Bx F By F Ay F Ax M 1 g F Bx F By M 2 g Note: Don’t forget that forces on con- nected FBDs should have equal magnitudes, but opposite direc- tions. page 45 forces from the spring and damper. When the forces are summed the inertia is on the right in Newton’s form. This equation is then rearranged to a second-order non-homogeneous differential equation. Figure 27 A simple translational system example M 1 F K s K d x Given the system diagram; The FBD for the cart is M 1 F K d x' K s x The forces for the cart are in a single direction and can be summed as, F x ∑ F – K d x' K s x + + M 1 x'' = = + This equation can be rearranged to a second-order non-homogeneous diff. eqn. M 1 x'' K d x' K s x + + F – = Aside: later on we will solve the differential equations, or use other methods to determine how the system will behave. It is useful to have all of the ’output’ variables for the system on the left hand side, and everything else on the other. page 46 Figure 28 Drill problem: Find the differential equations A simplified model of an elevator (M1) and a passenger (M2) are shown in Figure 29. In this example many of the required variables need to be defined. These are added to the FBDs. Care is also taken to ensure that all forces between bodies are equal in magni- tude, but opposite in direction. The wall forces are ignored because they are statically indeterminate and being in the x-axis irrelevant to the problem in the y-axis. M 2 K s2 K d2 x 2 M 1 F K s1 K d1 x 1 Develop the equation relating the input force to the motion (in terms of x) of the lefthand cart for the problem below. page 47 Figure 29 A multi-body translating system (an elevator with a passenger) The forces on the FBDs are then summed, and the equations are expanded as shown in Figure 30. M 2 M 1 K S2 K S1 Assign required quantities and draw the FBDs y 1 F S1 F D M 1 g F S2 F D M 2 g F S2 y 2 K d page 48 Figure 30 Equations for the elevator Now, we write out the force balance equation (vector form), and substitute relationships F M 1 ∑ F S1 F S2 M 1 g F D + + + M 1 a 1 = = F M 2 ∑ F S2 – M 2 g F D – + M 2 a 2 = = At this point we can expand the equations into vector components K – S2 ∆y 2 ∆y 1 – ( ) M 2 9.81 – ( ) K d d dt ----- y 2 y 1 – ( ) – + M 2 a y = K S1 ∆y 1 – ( ) K S2 ∆y 2 ∆y 1 – ( ) M 1 9.81 – ( ) K d d dt ----- y 2 y 1 – ( ) + + + M 1 a y = page 49 Figure 31 Drill problem: A more complex translational systems Consider the springs shown in Figure 32. When two springs are combined in this manner they can be replaced with a single equivalent spring. In the parallel spring combi- nation the overall stiffness of the spring would increase. In the series spring combination the overall stiffness would decrease. A B K S1 M 1 M 2 µ k1 µ k2 Write the differential equations for the system below. page 50 Figure 32 Springs in parallel and series (kinematically) Figure 33 shows the calculations required to find a spring coefficient equivalent to the two springs in series. The first step is to draw a FBD for the mass at the bottom, and for a point between the two springs, P. The forces for both of these are then summed. The next process is to combine the two equations to eliminate the height variable created for P. After this the equation is rearranged into Hooke’s law, and the equivalent spring coeffi- cient is found. K S2 K S1 M M K S2 K S1 Parallel Series page 51 Figure 33 Calculation of an equivalent spring coefficient for springs in series K S2 K S1 M P y 2 y 1 First, draw FBDs for P and M and sum the forces assuming the system is static. P M K S1 y 2 K S2 y 1 y 2 – ( ) K S2 y 1 y 2 – ( ) F g F y ∑ K S1 y 2 K S2 y 1 y 2 – ( ) – 0 = = F y ∑ K S2 y 1 y 2 – ( ) F g – 0 = = Next, rearrange the equations to eliminate y2 and simplify. (a) (b) + + (b) becomes K S2 y 1 y 2 – ( ) F g – 0 = y 1 y 2 – ∴ F g K S2 -------- - = y 2 ∴ y 1 F g K S2 -------- - – = (a) becomes K S1 y 2 K S2 y 1 y 2 – ( ) – 0 = y ∴ 2 K S1 K S2 + ( ) y 1 K S2 = sub (b) into (a) y 1 F g K S2 -------- - – ¸ , ¸ _ K S1 K S2 + ( ) y 1 K S2 = y 1 ∴ F g K S2 -------- - – y 1 K S2 K S1 K S2 + ------------------------ = F g ∴ y 1 1 K S2 K S1 K S2 + ------------------------ – ¸ , ¸ _ K S2 = F g ∴ y 1 K S1 K S2 K S2 – + K S1 K S2 + --------------------------------------- ¸ , ¸ _ K S2 = F g ∴ y 1 K S1 K S2 K S1 K S2 + ------------------------ ¸ , ¸ _ = K equiv · ∴ K S1 K S2 K S1 K S2 + ------------------------ = Finally, consider the basic spring equation to find the equivalent spring coefficient. page 52 Figure 34 Drill problem: Find an equivalent spring for the springs in parallel Consider the drill problem. When an object has no mass, the force applied to one side of the spring will be applied to the other. The only factor that changes is displace- ment. page 53 Figure 35 Drill problem: Prove that the force on both sides is equal 2.4 OTHER TOPICS Designing a system in terms of energy content can allow insights not easily obtained by the methods already discussed. Consider the equations in Figure 36. These equations show that the total energy in the system is the sum of kinetic and potential energy. Kinetic energy is half the product of mass times velocity squared. Potential energy in translating systems is a distance multiplied by a length that force was applied over. In addition the power, or energy transfer rate is the force applied multiplied by the velocity. Show that a force applied to one side of a massless spring is the reaction force at the other side. page 54 Figure 36 Energy and power equations for translating masses 2.5 SUMMARY • FBDs are useful for reducing complex systems to simpler parts. • Eqautions for translation and rotation can be written for FBDs. • The equations can be integrated for dynaic cases, or solved algebraicaly for static cases. 2.6 PRACTICE PROBLEMS 1. If a spring has a deflection of 6 cm when exposed to a static load of 200N, what is the spring constant? (ans. 33.3N/cm) 2. The mass, M, illustrated below starts at rest. It can slide across a surface, but the motion is opposed by viscous friction (damping) with the coefficient B. Initially the system starts at rest, when a constant force, F, is applied. Write the differential equation for the mass, and solve the differential equation. Leave the results in variable form. P Fv d dt ----- E = = E K Mv 2 2 ---------- = E P Fd Mgd = = E E P E K + = (7) (8) (9) (10) M B F x page 55 3. Write the differential equations for the translating system below. 4. Write the differential equations for the system given below. 5. Find the effective damping coefficients for the pairs below, K s F M1 M2 M 2 M 1 K d B 1 F K s B 2 Kd1 Kd2 Kd1 Kd2 a) b) (ans. K eq K d1 K d2 K d1 K d2 + ------------------------ = a) K eq K d1 K d2 + = b) page 56 6. Write the differential equations for the system below. 7. Write the differential equations for the system below. M 2 K s3 K d3 x 2 M 1 F K s2 K d2 x 1 K s1 K d1 K d1 x 1 ' – K s1 x 1 – K d2 x 1 ' x 2 ' – ( ) K s2 x 1 x 2 – ( ) K d3 x 2 ' K s3 x 2 M 1 M 2 F ∑ K d1 x 1 ' – K s1 x 1 – K d2 x 1 ' x 2 ' – ( ) – K s2 x 1 x 2 – ( ) – M 1 x 1 '' = = + x 1 '' M 1 ( ) x 1 ' K d1 K d2 + ( ) x 1 K s1 K s2 + ( ) x 2 ' K d2 – ( ) x 2 K s2 – ( ) + + + + 0 = F ∑ K d2 x 1 ' x 2 ' – ( ) K s2 x 1 x 2 – ( ) F K d3 x 2 ' – K s3 x 2 – + + M 2 x 2 '' = = + x 2 '' M 2 ( ) x 2 ' K d2 K d3 + ( ) x 2 K s2 K s3 + ( ) x 1 ' K d2 – ( ) x 1 K s2 – ( ) + + + + F = F (ans. For M1: For M2: FBDs: M 2 x 2 M 1 F K s2 x 1 K s1 K d1 page 57 8. Write the differential equations for the system below. 9. Write the differential equations for the system below. 10. Write the differential equations for the system below. M 2 x 2 M 1 F K s2 x 1 K s1 K d1 B M 2 x 2 M 1 F K s2 x 1 K s1 K d1 B M 2 x 2 M 1 F K s2 x 1 K s1 K d1 µ s µ k , page 58 11. Write the differential equations for the system below. 12. Write the differential equations for the system below. In this system the upper mass, M1, is between a spring and a cable and there is viscous damping between the mass and the floor. The suspended mass, M2, is between the cable and a damper. The cable runs over a massless, fric- tionless pulley. M 2 x 2 K s2 K d 2 M 1 x 1 K s1 K d1 F M 1 M 2 R x 2 K s x 1 K d B page 59 13. Write the differential equations for the system below. (ans. Bx 1 ' K s x 1 T T K d x 2 ' M 2 M 1 FBDs: For M1: F ∑ K s x 1 – Bx 1 ' – T + M 1 x 1 '' = = + x 1 '' M 1 ( ) x 1 ' B ( ) x 1 K s ( ) + + T = For M2: F ∑ T K d x 2 ' M 2 g – + M – 2 x 2 '' = = + x 2 '' M – 2 ( ) x 2 ' K d – ( ) + T M 2 g – = M 2 g For T: if T <= 0 then T = 0N if T > 0 x1 = x2 M 1 M 2 x 2 K s1 x 1 K s2 µ s µ k , page 60 3. ANALYSIS OF DIFFERENTIAL EQUATIONS 3.1 INTRODUCTION In the previous chapter we derived differential equations of motion. These equa- tions can be used to analyze the behavior of the system and make design decisions. The most basic method is to select a standard input type, and initial conditions, and then solve the differential equation. It is also possible to estimate the system response without solv- ing the differential equation. Figure 37 shows an abstract description of a system used by engineers. The basic concept is that the system accepts inputs and the system changes the inputs to produce out- puts. Say, for example, that the system to be analyzed is an elevator. Inputs to the system would be the mass of human riders and desired elevator height. The output response of the system would be the actual height of the elevator. For analysis, the system model could be developed using differential equations for the motor, elastic lift cable, mass of the car, etc. A basic test would involve assuming that the elevator starts at the ground floor and must travel to the top floor. Using assumed initial values and input functions the differential equation could be solved to get an explicit equation for elevator height. This output response can then be used as a guide to modify design choices (parameters). In practice, many of the assumptions and tests are mandated by law or groups such as Underwriters Laboratories (UL), Canadian Standards Association (CSA) and the European Commission (CE). Topics: Objectives: • To develop explicit equations that describe a system response. • To recognize first and second-order equation forms. • First and second-order homogeneous differential equations • Non-homogeneous differential equations • First and second-order responses • Non-linear system elements • Design case page 61 Figure 37 A system with and input and output response There are several standard input types used to test a system. These are listed below in order of relative popularity with brief explanations. • step - a sudden change of input, such as very rapidly changing a desired speed from 0Hz to 50Hz. • ramp - a continuously increasing input, such as a motor speed that increases con- stantly at 10Hz per minute. • sinusoidal - a cyclic input that varies continuously, such as a motor speed that is continually oscillating sinusoidally between 0Hz and 100Hz. • parabolic - an exponentially increasing input, such as a motor speed that is 2Hz at 1 second, 4Hz at 2 seconds, 8Hz at 3 seconds, etc. After the system has been modeled, an input type has been chosen, and the initial conditions have been selected, the system can be analyzed to determine its behavior. The most fundamental technique is to integrate the differential equation for the the system. 3.2 EXPLICIT SOLUTIONS Solving a differential equation results in an explicit solution. This explicit equation provides the general response, but it can also be used to find frequencies and other details of interest. This section will review techniques used to integrate first and second-order homogenous differential equations. These equations correspond to systems without inputs, also called unforced systems. Non-homogeneous differential equations will also be reviewed. Solving differential equations is necessary for analyzing systems with inputs. The basic types of differential equations are shown in Figure 38. Each of these equations is linear. On the left hand side is the integration variable ’x’. If the right hand side is zero, then the equation is homogeneous. Each of these equations is linear because each of the terms on the left hand side is simply multiplied by a linear coefficient. inputs system outputs differential equations function function Note: By convention inputs are on the left, and outputs are on the right. page 62 Figure 38 Standard equation forms A general solution for a first-order homogeneous differential equation is given in Figure 39. The solution begins with the solution of the homogeneous equation where a general form is ’guessed’. Substitution leads to finding the value of the coefficient ’Y’. Following this, the initial conditions for the equation are used to find the value of the coef- ficient ’X’. Notice that the final equation will begin at the initial displacement, but approach zero as time goes to infinity. The e-to-the-x behavior is characteristic for a first- order response. Ax'' Bx' Cx + + Df t ( ) = second-order non-homogeneous Ax'' Bx' Cx + + 0 = second-order homogeneous Ax' Bx + Cf t ( ) = first-order non-homogeneous Ax' Bx + 0 = first-order homogeneous page 63 Figure 39 General solution of a first-order homogeneous equation The general solution to a second-order homogeneous equation is shown in Figure 40. The solution begins with a guess of the homogeneous solution, but this time requires the solution of the quadratic equation. There are three possible cases that result from the solution of the quadratic equation: different but real roots; two identical roots; or two com- plex roots. The three cases result in three different forms of solutions, as shown. The com- plex result is the most notable because it results in sinusoidal oscillations. It is not shown, but after the homogeneous solution has been found, the initial conditions need to be used to find the remaining coefficient values. Ax' Bx + 0 = Given, x Xe Yt – = Guess a solution form and solve. x' YX – e Yt – = A ∴ YX – e Yt – ( ) B Xe Yt – ( ) + 0 = A ∴ Y – ( ) B + 0 = Y ∴ B A --- = and x 0 ( ) x 0 = initial condition x h Xe B A ---t – = Next, use the initial conditions to find the remaining unknowns. x 0 Xe B A ---0 – = x h Xe B A ---t – = Therefore the general form is, x 0 X = x t ( ) x 0 e B A ---t – = Therefore the final equation is, Note: The general form below is useful for finding almost all homogeneous equations x h t ( ) Xe Yt – = page 64 Figure 40 Solution of a second-order homogeneous equation As mentioned above, a complex solution when solving the homogeneous equation results in a sinusoidal oscillation, as proven in Figure 41. The most notable part of the solution is that there is both a frequency of oscillation and a phase shift. This form is very useful for analyzing the frequency response of a system, as will be seen in a later chapter. Ax'' Bx' Cx + + 0 = Given, x 0 ( ) x 0 = x' 0 ( ) v 0 = and x h Xe Yt – = Guess a general equation form and substitute it into the differential equation, x' h YX – e Yt – = x'' h Y 2 Xe Yt – = A Y 2 Xe Yt – ( ) B YX – e Yt – ( ) C Xe Yt – ( ) + + 0 = A Y 2 ( ) B Y – ( ) C + + 0 = Y B – ( ) – B – ( ) 2 4 AC ( ) – t 2A --------------------------------------------------------------- B B 2 4AC – t 2A ------------------------------------- = = Note: There are three possible outcomes of finding the roots of the equa- tions: two different real roots, two identical real roots, or two complex roots. Therefore there are three fundamentally different results. Y R 1 R 2 , = If the values for Y are both real, but different, the general form is, x h X 1 e R 1 t X 2 e R 2 t + = Note: The initial conditions are then used to find the values for X 1 and X 2 . Y R 1 R 1 , = If the values for Y are both real, and identical, the general form is, x h X 1 e R 1 t X 2 te R 1 t + = The initial conditions are then used to find the values for X 1 and X 2 . Y σ ωj t = If the values for Y are complex, the general form is, x h X 3 e σt ωt X 4 + ( ) cos = The initial conditions are then used to find the values of X 3 and X 4 . page 65 Figure 41 The phase shift solution to a second-order homogeneous differential equa- tion Y R Cj t = This gives the general result, as shown below: x X 1 e R C + j ( )t X 2 e R Cj – ( )t + = x X 1 e Rt e Cjt X 2 e Rt e Cjt – + = x e Rt X 1 e Cjt X 2 e Cjt – + ( ) = x e Rt X 1 Ct ( ) cos j Ct ( ) sin + ( ) X 2 C – t ( ) cos j C – t ( ) sin + ( ) + ( ) = x e Rt X 1 Ct ( ) cos j Ct ( ) sin + ( ) X 2 Ct ( ) j Ct ( ) sin – ( ) cos ( ) + ( ) = x e Rt X 1 X 2 + ( ) Ct ( ) cos j X 1 X 2 – ( ) Ct ( ) sin + ( ) = x e Rt X 1 X 2 + ( ) Ct ( ) cos j X 1 X 2 – ( ) Ct ( ) sin + ( ) = x e Rt X 1 X 2 + ( ) 2 j 2 X 1 X 2 – ( ) 2 + X 1 X 2 + ( ) 2 j 2 X 1 X 2 – ( ) 2 + ------------------------------------------------------------------ X 1 X 2 + ( ) Ct ( ) cos j X 1 X 2 – ( ) Ct ( ) sin + ( ) = x e Rt X 1 2 2X 1 X 2 X 2 2 X 1 2 2 – X 1 X 2 X 2 2 + + ( ) – + + X 1 2 2X 1 X 2 X 2 2 X 1 2 2 – X 1 X 2 X 2 2 + + ( ) – + + ---------------------------------------------------------------------------------------------------- X 1 X 2 + ( ) Ct ( ) cos j X 1 X 2 – ( ) Ct ( ) sin + ( = x e Rt 4X 1 X 2 4X 1 X 2 -------------------- X 1 X 2 + ( ) Ct ( ) cos j X 1 X 2 – ( ) Ct ( ) sin + ( ) = x e Rt 4X 1 X 2 X 1 X 2 + ( ) 4X 1 X 2 ----------------------- Ct ( ) cos j X 1 X 2 – ( ) 4X 1 X 2 ----------------------- Ct ( ) sin + ¸ , ¸ _ = x e Rt 4X 1 X 2 Ct X 1 X 2 – ( ) X 1 X 2 + ( ) ----------------------- ¸ , ¸ _ atan + ¸ , ¸ _ cos = x e Rt X 3 Ct X 4 + ( ) cos = phase shift frequency Consider the situation where the results of a homogeneous solution are the complex conjugate pair.. where, X 3 4X 1 X 2 = X 4 X 1 X 2 – ( ) X 1 X 2 + ( ) ----------------------- ¸ , ¸ _ atan = page 66 The methods for solving non-homogeneous differential equations builds upon the methods used for the solution of homogeneous equations. This process adds a step to find the particular solution of the equation. An example of the solution of a first-order non- homogeneous equation is shown in Figure 42. To find the homogeneous solution the non- homogeneous part of the equation is set to zero. To find the particular solution the final form must be guessed. This is then substituted into the equation, and the values of the coefficients are found. Finally the homogeneous and particular are added to get the final equation form. The overall response of the system can be obtained by adding the homoge- neous and particular parts because the equations are linear, and the principle of superposi- tion applies. The homogeneous equation deals with the response to initial conditions, and the particular solution deals with the response to forced inputs. Figure 42 Solution of a first-order non-homogeneous equation The method for finding a particular solution for a second-order non-homogeneous Ax' Bx + Cf t ( ) = Generally, x 0 ( ) x 0 = Next, guess the particular solution by looking at the form of ’f(t)’. This step is highly subjective, and if an incorrect guess is made, it will be unsolvable. When this hap- pens, just make another guess and repeat the process. An example is given below. In the case below the guess should be similar to the exponential forcing function. 6x' 2x + 5e 4t = For example, if we are given x h x 0 e B A ---t – = x p C 1 e 4t = A reasonable guess for the particular solution is, Substitute these into the differential equation and solve for A. x ∴ ' p 4C 1 e 4t = 6 4C 1 e 4t ( ) 2 C 1 e 4t ( ) + 5e 4t = x x p x h + 5 26 ------e 4t x 0 e 6 2 ---t – + = = 24C 1 2C 1 + 5 = C 1 ∴ 5 26 ----- - = Combine the particular and homogeneous solutions. First, find the homogeneous solution as before in Figure 39. page 67 differential equation is shown in Figure 43. In this example the forcing function is sinuso- idal, so the particular result should also be sinusoidal. The final result is converted into a phase shift form. Figure 43 Solution of a second-order non-homogeneous equation Ax'' Bx' Cx + + Df t ( ) = Generally, x 0 ( ) x 0 = x' 0 ( ) v 0 = and 2. Guess the particular solution by looking at the form of ’f(t)’. This step is highly sub- jective, and if an incorrect guess is made it will be unsolvable. When this happens, just make another guess and repeat the process. For the purpose of illustration an example is given below. In the case below it should be similar to the sine function. 2x'' 6x' 2x + + 2 3t 4 + ( ) sin = For example, if we are given x h e σt X 3 ωt X 4 + ( ) cos = 1. Find the homogeneous solution as before. x p A 3t ( ) sin B 3t ( ) cos + = A reasonable guess is, 2 A 3t ( ) sin B 3t ( ) cos + ( ) 6 A 3t ( ) cos B 3t ( ) sin – ( ) 2 A – 3t ( ) sin B 3t ( ) cos – ( ) + + 2 3t 4 + ( sin = Substitute these into the differential equation ans solve for A and B. x' p A 3t ( ) cos B 3t ( ) sin – = x'' p A – 3t ( ) sin B 3t ( ) cos – = 2A 6B – 2A – ( ) 3t ( ) sin 2B 6A 2B – + ( ) 3t ( ) cos + 2 3t 4 + ( ) sin = 6B – ( ) 3t ( ) sin 6A ( ) 3t ( ) cos + 2 3t 4 cos sin 3t 4 sin cos + ( ) = 6B – 2 4 cos = 6A 2 4 sin = B 0.2179 = A 0.2523 – = Next, rearrange the equation to phase shift form. x p 0.2523 – 3t ( ) sin 0.2179 3t ( ) cos + = x p 0.3333 0.7568 3t ( ) sin – 0.6536 3t ( ) cos + ( ) = x p 0.3333 0.8584 – ( ) 3t ( ) sin sin 0.8584 – ( ) 3t ( ) cos cos + ( ) = x p 0.3333 3t 0.8584 + ( ) cos = 3. Use the initial conditions to determine the coefficients in the homogeneous solution. page 68 When guessing particular solutions, the forms in Figure 44 can be helpful. Figure 44 General forms for particular solutions An example of a second-order system is shown in Figure 45. As typical it begins with a FBD and summation of forces. This is followed with the general solution of the homogeneous equation. Real roots are assumed to allow the problem solution to continue in Figure 46. A forcing function C Guess Ax B + Cx D + e Ax Ce Ax B Ax ( ) sin C Ax ( ) sin D Ax ( ) cos + Cxe Ax B Ax ( ) cos Cx Ax ( ) sin xD Ax ( ) cos + or or or page 69 Figure 45 Second-order system example The solution continues by finding the particular solution and then solving it using initial conditions in Figure 46. The final result is a second-order system that is over- damped, with no oscillation. K d K s y F g F y ∑ Mg – K s y K d y' + + M – y'' = = M Assume the system illustrated to the right starts from rest at a height h. At time t=0 the system is released and allowed to move. K s y Mg K d y' + My'' K d y' K s y + + 0 = Find the homogeneous solution. My'' K d y' K s y + + Mg = y h e At = y' h Ae At = y'' h A 2 e At = M A 2 e At ( ) K d Ae At ( ) K s e At ( ) + + 0 = MA 2 K d A K s + + 0 = A K d – K d 2 4MK s – t 2M ------------------------------------------------ = Let us assume that the values of M, K d and K s lead to the case of two differ- ent positive roots. This would occur if the damper value was much larger than the spring and mass values. Thus, A R 1 R 2 , = y h C 1 e R 1 t C 2 e R 2 t + = page 70 Figure 46 Second-order system example (continued) 3.3 RESPONSES Solving differential equations tends to yield one of two basic equation forms. The e-to-the-negative-t forms are the first-order responses and slowly decay over time. They y t ( ) y p y h + Mg K s -------- C 1 e R 1 t C 2 e R 2 t + + = = Next, find the particular solution. M 0 ( ) K d 0 ( ) K s C ( ) + + Mg = y p C = y' h 0 = y'' h 0 = y 0 ( ) h = C Mg K s -------- = y' 0 ( ) 0 = h Mg K s -------- C 1 e 0 C 2 e 0 + + = C 1 C 2 + h Mg K s -------- – = y' t ( ) R 1 C 1 e R 1 t R 2 C 2 e R 2 t + = 0 R 1 C 1 e 0 R 2 C 2 e 0 + = 0 R 1 C 1 R 2 C 2 + = C 1 R – 2 R 1 --------- C 2 = R 2 R 1 ------C 2 – C 2 + h Mg K s -------- – = C 2 K s h Mg – K s ----------------------- ¸ , ¸ _ R – 1 R 1 R 2 – ------------------ ¸ , ¸ _ = C 1 R – 2 R 1 --------- K s h Mg – K s ----------------------- ¸ , ¸ _ R – 1 R 1 R 2 – ------------------ ¸ , ¸ _ = y t ( ) Mg K s -------- K s h Mg – K s ----------------------- ¸ , ¸ _ R – 1 R 1 R 2 – ------------------ ¸ , ¸ _ e R 1 t R – 2 R 1 --------- K s h Mg – K s ----------------------- ¸ , ¸ _ R – 1 R 1 R 2 – ------------------ ¸ , ¸ _ e R 2 t + + = Now, combine the solutions and solve for the unknowns using the initial conditions. Now, add the homogeneous and particular solutions and solve for the unknowns using the initial conditions. y t ( ) Mg K s -------- K s h Mg – K s ----------------------- ¸ , ¸ _ R – 1 R 1 R 2 – ------------------ ¸ , ¸ _ e R 1 t K s h Mg – K s ----------------------- ¸ , ¸ _ R 2 R 1 R 2 – ------------------ ¸ , ¸ _ e R 2 t + + = page 71 never naturally oscillate, they only oscillate if forced to do so. The second-order forms may include natural oscillation. In general the analysis of input responses focus on the homogeneous part of the solution. 3.3.1 First-order A first-order system will result in a first-order differential equation. The solution for these systems is a natural decay or growth as shown in Figure 47. The time constant for the system can be found directly from the differential equation. It is a measure of how quickly the system responds to a change. When an input to a system has changed, the sys- tem output will be approximately 63% of the way to its final value when the elapsed time equals the time constant. The initial and final values of the function can be determined algebraically to find the first-order response with little effort. If we have experimental results for a system, we can find the time constant, initial and final values graphically. The time constant can be found two ways, one by extending the slope of the first part of the curve until it intersects the final value line. That time is the time constant value. The other method is to look for the time when the output value has shifted 63.2% of the way from the initial to final values for the system. Assuming the change started at t=0, this time at this point corresponds to the time constant. page 72 Figure 47 Typical first-order responses The example in Figure 48 determines the coefficients for a first-order differential equation given a graphical output response to an input. The differential equation is for a permanent magnet DC motor, and will be developed in a later chapter. If we consider the steady state when the speed is steady at 1400RPM, the first derivative will be zero. This simplifies the equation and allows us to find a value for the parameter K in the differential equation. The time constant can be found by drawing a line asymptotic to the start of the motor curve, and finding the point where it intercepts the steady-state value. This gives an approximate time constant of 0.8 s. This can then be used to calculate the remaining coef- ficient. Some additional numerical calculation leads to the final differential equation as shown. Figure 48 Finding an equation using experimental data t y τ y 1 y 0 y t ( ) y 1 y 0 y 1 – ( )e t τ -- – + = t y τ y 0 y 1 OR y' 1 τ ---y + f t ( ) = time constant y τ ( ) y 1 y 0 y 1 – ( )e τ τ -- – + = y τ ( ) y 1 y 0 y 1 – ( )e 1 – + = y τ ( ) y 1 y 0 y 1 – ( )0.368 + = Note: The time will be equal to the time constant when the value is 63.2% of the way to the final value, as shown below. y τ ( ) 1 0 1 – ( )0.368 + = y τ ( ) 0.632 = page 73 A simple mechanical example is given in Figure 49. As typical the modeling starts with a FBD and a sum of forces. After this, the homogenous solution is found by setting the non-homogeneous part to zero and solving. Next, the particular solution is found, and the two solutions are combined. The initial conditions are used to find the remaining unknown coefficients. For the motor use the differential equation and the speed curve when Vs=10V is applied: d dt ----- ¸ , ¸ _ ω K 2 JR ------ ¸ , ¸ _ ω + K JR ------ ¸ , ¸ _ V s = 1s 2s 3s 1400 RPM d dt ----- ¸ , ¸ _ ω 0 = For steady-state ω 1400RPM 146.6rads 1 – = = 0 K 2 JR ------ ¸ , ¸ _ 146.6 + K JR ------ ¸ , ¸ _ 10 = K 0.0682 = 1s τ 0.8s ≈ K 2 JR ------ ¸ , ¸ _ 1 0.8s ---------- = 0.0682 K JR ------ ¸ , ¸ _ 1 0.8s ---------- = K JR ------ 18.328 = Dω 1 0.8 ------- ω + 18.328V s = 1400 RPM page 74 Figure 49 First-order system analysis example K d K s y F F y ∑ F – K s y K d d dt ---- - ¸ , ¸ _ y + + 0 = = F K s y K d d dt ----- ¸ , ¸ _ y Find the response to the applied force if the force is applied at t=0s. Assume the system is initially deflected a height of h. K d y' K s y + F = + Find the homogeneous solution. y h Ae Bt = y' h ABe Bt = K d ABe Bt ( ) K s Ae Bt ( ) + 0 = K d B K s + 0 = B K s – K d --------- = Next, find the particular solution. y p C = y' p 0 = K d 0 ( ) K s C ( ) + F = C ∴ F K s ----- = Combine the solutions, and find the remaining unknown. y t ( ) y p y h + Ae K s – K d ---------t F K s ----- + = = y 0 ( ) h = h Ae 0 F K s ----- + = A ∴ h F K s ----- – = The final solution is, y t ( ) h F K s ----- – ¸ , ¸ _ e K s – K d ---------t F K s ----- + = page 75 Figure 50 Drill problem: Developing the final equation using the first-order model form A first-order system tends to be passive, meaning it doesn’t deliver energy or power. A first-order system will not oscillate unless the input forcing function is also oscillating. Its output response lags its input and the delay is determined by the system’s time constant. Use the general form given below to solve the problem in Figure 49 without solving the differential equation. y t ( ) y 1 y 0 y 1 – ( )e t τ -- – + = y' 1 τ --- y + f t ( ) = page 76 3.3.2 Second-order A second-order system response typically contains two first-order responses, or a first-order response and a sinusoidal component. A typical sinusoidal second-order response is pictured in Figure 51. Notice that the coefficients of the differential equation include a damping coefficient and a natural frequency. These can be used to develop the final response, given the initial conditions and forcing function. Notice that the damped frequency of oscillation is the actual frequency of oscillation. The damped frequency will be lower than the natural frequency when the damping coefficient is between 0 and 1. If the damping coefficient is greater than one the damped frequency becomes negative, and the system will not oscillate - it is overdamped. Figure 51 The general form for a second-order system When only the damping coefficient is increased, the frequency of oscillation, and overall response time will slow, as seen in Figure 52. When the damping coefficient is 0 the system will oscillate indefinitely. Critical damping occurs when the damping coeffi- cient is 1. At this point both roots of the differential equation are equal. The system will A second-order system, and a typical response to a stepped input. ω n ξ σ ζω n = ω d ω n 1 ζ 2 – = A B y A B A – ( )e σt – ω d t ( ) cos + = y'' 2ζω n y' ω n 2 y + + f t ( ) = ω d Natural frequency of system, approximate frequency of control sys- tem oscillations Damping factor of system. If < 1 underdamped, and system will oscillate. If =1 critically damped. If > 1 overdamped, and never any oscillation (more like a first-order system). As damping factor approaches 0, the first peak becomes infinite in height. The actual frequency of the system. This is the resulting decrease in the natural frequency caused the damping page 77 not oscillate is the damping coefficient is greater than or equal to 1. Figure 52 The effect of the damping coefficient When observing second-order systems it is more common to use more direct mea- surements of the response. Some of these measures are shown in Figure 53. The rise time is the time it takes to go from 10% to 90% of the total displacement, and can be a good ξ 0 ≈ ξ 0.5 ≈ ξ 1 2 ------- 0.707 = = ξ 1 = ξ 1 » (overdamped) (underdamped) (critical) page 78 measure of general system responsiveness. The settling time indicates how long it takes for the system to pass within a tolerance band around the final value. Here the permissible zone is 2%, but if it were slightly larger the system would have a much smaller settling time. The period of oscillation can be measured directly as the time between peaks of the oscillation, the inverse is the damping frequency. (Note: don’t forget to convert to radi- ans.) The damped frequency can also be found using the time to the first peak, as half the period. The overshoot is the height of the first peak. Using the time to the first peak, and the overshoot the damping coefficient can be found. Figure 53 Characterizing a second-order response (not to scale) ∆x 0.02∆x 0.02∆x t r t s T f d 1 T --- = b b overshoot = where, t r rise time (from 10% to 90%) = t s settling time (to within 2-5% typ.) = ∆x total displacement = T f d , period and frequency - damped = t p e ss 0.1∆x 0.5∆x 0.9∆x b ∆x ------ e σt p – = t p time to first peak = e ss steady state error = Note: This figure is not to scale to make details near the steady-state value easier to see. (3) (2) ω d π t p ---- ≈ (1) σ ξω n = x ∆xe σt – ω d t ( ) cos = ξ 1 π t p σ -------- ¸ , ¸ _ 2 1 + ----------------------------- = (4) page 79 Figure 54 Second order relationships between damped and natural frequency Note: We can calculate these relationships using the complex homogenous form, and the generic second order equation form. A 2 2ξω n ω n 2 + + 0 = A 2ξω n – 4ξ 2 ω n 2 4ω n 2 – t 2 ----------------------------------------------------------- σ jω d t = = 2ξω n – 2 ---------------- σ ξω n – = = 4ξ 2 ω n 2 4ω n 2 – 2 ----------------------------------- jω d = 4ξ 2 ω n 2 4ω n 2 – 4 1 – ( )ω d 2 = ω n 2 ξ 2 ω n 2 – ω d 2 = (1) (2) (3) (5) ω n 1 ξ 2 – ω d = ω n σ ξ – ------ = σ 2 ξ 2 ------ ξ 2σ 2 ξ 2 ------ – ω d 2 = 1 ξ 2 ----- ω d 2 σ 2 ------ 1 + = ξ 1 ω d 2 σ 2 ------ 1 + -------------------- = x t ( ) C 1 e σt – ω d t C 2 + ( ) cos = The time to the first peak can be used to find the approximate decay constant b ∆xe σt p – 1 ( ) ≈ σ b ∆x ------ ¸ , ¸ _ ln t p ------------------ – = ω d π t p ---- = (4) page 80 Figure 55 Drill problem: Find the equation given the response curve 3.3.3 Other Responses First-order systems have e-to-the-t type responses. Second-order systems add another e-to-the-t response or a sinusoidal excitation. As we move to higher order linear 4.0 2 0 Write a function of time for the graph given. (Note: measure using a ruler to get values.) Also find the natural frequency and damping coefficient to develop the differential equation. Using the dashed lines determine the set- tling time. t page 81 systems we typically add more e-to-the-t terms, and more sinusoidal terms. A possible higher order system response is seen in Figure 56. The underlying function is a first-order response that drops at the beginning, but levels out. There are two sinusoidal functions superimposed, one with about one period showing, the other with a much higher fre- quency. Figure 56 An example of a higher order system response The basic techniques used for solving first and second-order differential equations can be applied to higher order differential equations, although the solutions will start to become complicated for systems with much higher orders. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX page 82 Figure 57 Solution of a higher order differential equation d dt ----- ¸ , ¸ _ 4 x 13 d dt ----- ¸ , ¸ _ 3 x 34 d dt ---- - ¸ , ¸ _ 2 x 42 d dt ----- ¸ , ¸ _ x 20x + + + + 5 = x h C 1 e t – C 2 e 10t – C 3 e t – t C 4 + ( ) cos + + = Given the homogeneous differential equation Guess a solution for the homogeneous equation, A 4 e At 13A 3 e At 34A 2 e At 42Ae At 20e At + + + + 0 = x h e At = d dt -----x h Ae At = d dt ----- ¸ , ¸ _ 2 x h A 2 e At = d dt ---- - ¸ , ¸ _ 3 x h A 3 e At = d dt ---- - ¸ , ¸ _ 4 x h A 4 e At = Substitute the values into the differential equation and find a value for the unknown. A 4 13A 3 34A 2 42A 20 + + + + 0 = A 1 – 10 – 1 – j – 1 – j + , , , = Guess a particular solution, and the solve for the coefficient. x p A = d dt ----- x p 0 = d dt ----- ¸ , ¸ _ 2 x p 0 = d dt ----- ¸ , ¸ _ 3 x p 0 = d dt ----- ¸ , ¸ _ 4 x p 0 = 0 13 0 ( ) 34 0 ( ) 42 0 ( ) 20A + + + + 5 = A 0.25 = page 83 Figure 58 Solution of a higher order differential equation Solve for the unknowns, assuming the system starts at rest and undeflected. x t ( ) C 1 e t – C 2 e 10t – C 3 e t – t C 4 + ( ) cos 0.25 + + + = 0 C 1 C 2 C 3 C 4 ( ) cos 0.25 + + + = d dt ----- x h C – 1 e t – 10C 2 e 10t – – C 3 e t – t C 4 + ( ) cos – C 3 e t – t C 4 + ( ) sin – = 0 C – 1 10C 2 – C 3 C 4 ( ) cos – C 3 C 4 ( ) sin – = 0 9C 2 – C 3 C 4 ( ) sin – 0.25 + = (1) (3) Equations (1) and (3) can be added to get the simplified equation below. (4) d dt ----- ¸ , ¸ _ 2 x h C 1 e t – 100C 2 e 10t – C 3 e t – t C 4 + ( ) cos C 3 e t – t C 4 + ( ) sin + + + + = C 3 e t – t C 4 + ( ) sin C 3 e t – t C 4 + ( ) cos – 0 C 1 100C 2 C 3 C 4 ( ) cos C 3 C 4 ( ) sin C 3 C 4 ( ) sin C 3 C 4 ( ) cos – + + + + = 0 C 1 100C 2 2C 3 C 4 ( ) sin + + = (5) Equations (4) and (5) can be combined. 0 C 1 100C 2 2 9C 2 – 0.25 + ( ) + + = C 3 C 4 ( ) sin 9C 2 – 0.25 + = 0 17C – 1 100C 2 0.5 + + = (6) d dt ----- ¸ , ¸ _ 3 x h C – 1 e t – 1000 – ( )C 2 e 10t – 2C 3 e t – t C 4 + ( ) sin – 2C 3 e t – t C 4 + ( ) cos + + = 0 C – 1 1000 – ( )C 2 2C 3 C 4 ( ) sin – 2C 3 C 4 ( ) cos + + = C 3 C 4 ( ) cos C – 1 C 2 – 0.25 – = (2) (7) page 84 Figure 59 Solution of a higher order differential equation (cont’d) In some cases we will have systems with multiple differential equations, or non- linear terms. In these cases explicit analysis of the equations may not be feasible. In these cases we may turn to other techniques, such as numerical integration which will be cov- ered in later chapters. 3.4 RESPONSE ANALYSIS Up to this point we have mostly discussed the process of calculating the system response. As an engineer, obtaining the response is important, but evaluating the results is more important. The most critical design consideration is system stability. In most cases a system should be inherently stable in all situations, such as a car cruise control. In other Equations (2 and (4) are substituted into equation (7). 0 C – 1 1000 – ( )C 2 2 9C 2 – 0.25 + ( ) – 2 C – 1 C 2 – 0.25 – ( ) + + = 0 3C – 1 984 – ( )C 2 1 – + = (8) Equations (6) and (8) can be combined. C 1 984 3 --------- – ¸ , ¸ _ C 2 1 3 --- – = 0 17 984 3 --------- – ¸ , ¸ _ C 2 1 3 --- – ¸ , ¸ _ – 100C 2 0.5 + + = 0 5676C 2 6.1666667 + = C 2 0.00109 – = C 1 984 3 --------- – ¸ , ¸ _ 0.00109 – ( ) 1 3 -- - – = C 1 0.0242 = Equations (2) and (4) can be combined. C 3 C 4 ( ) sin C 3 C 4 ( ) cos --------------------------- 9C 2 – 0.25 + C – 1 C 2 – 0.25 – -------------------------------------- = C 4 ( ) tan 9 0.00109 – ( ) – 0.25 + 0.0242 ( ) – 0.00109 – ( ) – 0.25 – --------------------------------------------------------------------------- = C 4 0.760 – = C 3 0.760 – ( ) sin 9 0.00109 – ( ) – 0.25 + = Equation (4) can be used the find the remaining unknown. C 3 0.377 – = The final response function is, x t ( ) 0.0242e t – 0.00109 – ( )e 10t – 0.377 – ( )e t – t 0.760 – ( ) cos 0.25 + + + = page 85 cases an unstable system may be the objective, such as an explosive munition. Simple methods for determining the stability of a system are listed below: 1. If a step input causes the system to go to infinity, it will be inherently unstable. 2. A ramp input might cause the system to go to infinity; if this is the case, the sys- tem might not respond well to constant change. 3. If the response to a sinusoidal input grows with each cycle, the system is proba- bly resonating, and will become unstable. Beyond establishing the stability of a system, we must also consider general per- formance. This includes the time constant for a first-order system, or damping coefficient and natural frequency for a second-order system. For example, assume we have designed an elevator that is a second-order system. If it is under damped the elevator will oscillate, possibly leading to motion sickness, or worse. If the elevator is over damped it will take longer to get to floors. If it is critically damped it will reach the floors quickly, without overshoot. Engineers distinguish between initial setting effects (transient) and long term effects (steady-state). The transient effects are closely related to the homogeneous solution to the differential equations and the initial conditions. The steady-state effects occur after some period of time when the system is acting in a repeatable or non-changing form. Fig- ure 60 shows a system response. The transient effects at the beginning include a quick rise time and an overshoot. The steady-state response settles down to a constant amplitude sine wave. page 86 Figure 60 A system response with transient and steady-state effects 3.5 NON-LINEAR SYSTEMS Non-linear systems cannot be described with a linear differential equation. A basic linear differential equation has coefficients that are XXXXXXXXXXXXXX Eamples of system conditions that lead to non-linear solutions are, • XXXXXXXXXXXXXXXXXXXX 3.5.1 Non-Linear Differential Equations A non-linear differential equation is presented in Figure 61. It involves a person ejected from an aircraft with a drag coefficient of 0.8. The FBD shows the sum of forces, and the resulting differenetial equation. The velocity squared term makes the equation non-linear, and so it cannot be analyzed with the previous methods. In this case the termi- Steady-state Transient Note: the transient response is predicted with the homogeneous solution. The steady state response in mainly predicted with the particular solution, althought in some cases the homogeneous solution might have steady state effects, such as a non-decaying oscillation. page 87 nal velocity is calculated by setting the acceleration to zero. This results in a maximum speed of 126 kph. The equation can also be solved using explicit integration XXXXXXXXXXXXXX Figure 61 Development of a non-linear differential equation Consider the differential equation for a 100kg human ejected from an airplane. The aero- dynamic drag will introduce a squared variable, therefore making the equation non- linear. Mg 0.8 Ns 2 m 2 --------- y' ( ) 2 F y ∑ 0.8 y' ( ) 2 Mg – My'' – = = 100kgy'' 0.8 Ns 2 m 2 --------- y' ( ) 2 + 100kg9.81 N kg ------ = 100kgy'' 0.8 Ns 2 m 2 --------- y' ( ) 2 + 981N = 100kgy'' 0.8kg m s 2 ---- s 2 m 2 ------ y' ( ) 2 + 981kg m s 2 ---- = 100y'' 0.8m 1 – y' ( ) 2 + 981ms 2 – = The terminal velocity can be found be setting the acceleration to zero. 100 0 ( ) 0.8m 1 – y' ( ) 2 + 981ms 2 – = y y' 981ms 2 – 0.8m 1 – --------------------- 981 0.8 ---------m 2 s 2 – 35.0 m s ---- 126 km h ------- = = = = page 88 Figure 62 Development of an integral An explicit solution can begin by replacing the position variable with a velocity variable and rewriting the equation as a separable differential equation. 100y'' 0.8m 1 – y' ( ) 2 + 981ms 2 – = 100v' 0.8m 1 – v 2 + 981ms 2 – = 100 dv dt ------ 0.8m 1 – v 2 + 981ms 2 – = 100 dv dt ------ 981ms 2 – 0.8m 1 – v 2 – = 100 981ms 2 – 0.8m 1 – v 2 – ------------------------------------------------- dv dt = 100 0.8m 1 – – -------------------- 981 0.8m 1 – – -------------------- ms 2 – v 2 + -------------------------------------------- v d ∫ dt ∫ = 125m – v 2 1226.25m 2 s 2 – – --------------------------------------------- v d ∫ t C 1 + = 125m – v 35.02 m s ---- + ¸ , ¸ _ v 35.02 m s ---- – ¸ , ¸ _ ----------------------------------------------------------------- v d ∫ t C 1 + = page 89 Figure 63 Solution of the integral A v 35.02 m s ---- + ¸ , ¸ _ -------------------------------- B v 35.02 m s ---- – ¸ , ¸ _ -------------------------------- + v d ∫ t C 1 + = Av A 35.02 m s ---- ¸ , ¸ _ – Bv B 35.02 m s ---- ¸ , ¸ _ + + 125m – = This can be reduced with a partial fraction expansion. v A B + ( ) 35.02 m s ---- A – B + ( ) + 125m – = A B + 0 = 35.02 m s ---- A – B + ( ) 125m – = B – ( ) – B + ( ) 125 35.02 ------------- s – = B 1.785s – = A 1.785s = 1.785s v 35.02 m s ---- + ¸ , ¸ _ -------------------------------- 1.785s – v 35.02 m s ---- – ¸ , ¸ _ -------------------------------- + v d ∫ t C 1 + = a bx + ( ) 1 – x d ∫ a bx + ln b ----------------------- C + = The integral can then be solved using an identity from the integral table. In this case the integration constants can be left off because they are redundant with the one on the right hand side. 1.785s v 35.02 m s ---- + ln 1.785s v 35.02 m s ---- – ln – t C 1 + = 1.785s v 35.02 m s ---- + v 35.02 m s ---- – --------------------------- ln t C 1 + = v 35.02 m s ---- + v 35.02 m s ---- – --------------------------- e t 1.785s ---------------- C 1 + = A B – = v 35.02 m s ---- + v 35.02 m s ---- – --------------------------- e C 1 e t 1.785s ---------------- = page 90 Figure 64 Solution of the integral and application of the initial conditions As evident from the example, non-linear equations are much harder to solve and don’t have routine methods. Typically the numerical methods discussed in the next chap- ter are preferred. 3.5.2 Non-Linear Equation Terms If our models include a device that is non-linear, we will need to linearize the An initial velocity of zero can be assumed to find the value of the integration constant v 35.02 m s ---- + v 35.02 m s ---- – --------------------------- C 2 e t 1.785s ---------------- = v 35.02 m s ---- + v 35.02 m s ---- – --------------------------- e t t 1.785s ---------------- = 0 35.02 m s ---- + 0 35.02 m s ---- – --------------------------- C 2 e 0 1.785s ---------------- = 1 C 2 = This can then be simplified, and the absolute value sign eliminated. v 35.02 m s ---- + ve t t 1.785s ---------------- 35.02 m s ----e t 1.785s ---------------- + − = v 1 e t 1.785s ---------------- + − ¸ , ¸ _ 35.02 m s ---- e t 1.785s ---------------- + − 35.02 m s ---- – = v 35.02 m s ---- e t 1.785s ---------------- + − 1 – 1 e t 1.785s ---------------- + − ----------------------------- ¸ , ¸ _ = 0 35.02 m s ---- 1 + − 1 – 1 1 + − ---------------- ¸ , ¸ _ 1 1 – 1 1 + ------------ ¸ , ¸ _ 0 2 --- = = = v 35.02 m s ---- e t 1.785s ---------------- 1 – 1 e t 1.785s ---------------- + ------------------------ ¸ , ¸ _ = page 91 model before we can proceed. A non-linear system can be approximated with a linear equation using the following method. 1. Pick an operating point or range for the component. 2. Find a constant value that relates a change in the input to a change in the output. 3. Develop a linear equation. 4. Use the linear equation for the analysis. Consider the non-linear function in Figure 65. The function can be approximated as linear by picking a value XXXXXXXXXXXXXXXXXXXXXX Figure 65 Finding a linear parameter A linearized differential equation can be approximately solved using known tech- niques as long as the system doesn’t travel too far from the linearized point. The example in Figure 66 shows the linearization of a non-linear equation about a given operating point. This equation will be approximately correct as long as the first derivative doesn’t move too far from 100. When this value does the new velocity can be calculated. In this case the relationship between pressure drop and flow are non-linear. We need to develop an equation that approximates the local operating point. ∆ ∆p ( ) ∆q q ∆p q ∆p R q q – ( ) ≈ R ∆ ∆p ( ) ∆q --------------- ≈ R 2 q K 2 ------ = page 92 Figure 66 Linearizing a differential equation Assume we have the non-linear differential equation below. It can be solved by lin- earizing the value about the operating point y' 2 4y + 200 = Given, y 0 ( ) 10 = We can make the equation linear by replacing the velocity squared term with the velocity times the actual velocity. As long as the system doesn’t vary too much from the given velocity the model should be reasonably accurate. 12.65y' 4y + 20 = This system may now be solved as a linear differential equation. If the velocity (first derivative of y) changes significantly, then the differential equation should be changed to reflect this. y' 200 4y – t = y' 0 ( ) 200 4 10 ( ) – t 12.65 t = = 12.65y' 4y + 0 = Homogeneous: 12.65A 4 + 0 = A 0.316 – = y h Ce 0.316t – = 12.65 0 ( ) 4A + 200 = Particular: y p A = A 50 = Initial conditions: y t ( ) Ce 0.316t – 50 + = 10 Ce 0 50 + = C 40 – = y t ( ) 40e 0.316t – – 50 + = page 93 Figure 67 Linearizing a differential equation 3.5.3 Changing Systems In practical systems, the forces at work are continually changing. For example a system often experiences a static friction force when motion is starting, but once motion starts it is replaced with a smaller kinetic friction. Another example is tension in a cable. When under tension the cable acts as a spring. But, when in compression the force goes to zero. If the velocity (first derivative of y) changes significantly, then the differential equation should be changed to reflect this. For example we could decide to recalculate the equation value after 0.1s. y 0.1 ( ) 40e 0.316 0.1 ( ) – – 50 + 11.24 = = d dt ----- y 0.1 ( ) 40 0.316 – ( )e 0.316 0.1 ( ) – – 12.25 = = Note: a small change 12.25y' 4y + 20 = Now recalculate the solution to the differential equation. 12.25y' 4y + 0 = Homogeneous: 12.25A 4 + 0 = A 0.327 – = y h Ce 0.327t – = 12.25 0 ( ) 4A + 200 = Particular: y p A = A 50 = Initial conditions: y t ( ) Ce 0.327t – 50 + = 11.24 Ce 0.1 50 + = C 35.070575 – = y t ( ) 35.07e 0.316t – – 50 + = Notice that the values have shifted slightly, and as the analysis progresses the equations will adjust slowly. Higher accuracy can be obtained using smaller steps in time. page 94 Consider the example in Figure 68. A mass is pulled by a springy cable. The right hand side of the cable is being pulled at a constant rate, while the block is free to move, only restricted by friction forces and inertia. At the beginning all components are at rest and undeflected. Figure 68 A differential equation for a mass pulled by a springy cable x 2 M 100kg = K s 1000 N m ---- = x 1 0.1 m s ----t = µ k 0.1 = µ s 0.3 = M 100kg = An FBD and equation can be developed for the system. The friction force will be left as a variable at this point. F F K s x 1 x 2 – ( ) F x ∑ F F – K s x 1 x 2 – ( ) + Mx 2 '' = = F F – 1000 N m ---- 0.1 m s ----t x 2 – ¸ , ¸ _ + 100kgx 2 '' = 100kgx 2 '' 1000 N m ----x 2 + 1000 N m ----0.1 m s ----t F F – = x 2 '' 10 N kgm ---------- x 2 + 1 N kgs -------- t F F 100kg --------------- – = x 2 '' 10s 2 – x 2 + 1 m s 3 ---- t F F 100kg --------------- – = For the cable/spring in tension x 1 x 2 – 0 ≥ M 100kg = F F F x ∑ F F – Mx 2 '' = = F F – 100kgx 2 '' = 100kgx 2 '' F F – = x 2 '' F F 100kg --------------- – = For the cable/spring in compression x 1 x 2 – 0 < page 95 Figure 69 Friction forces for the mass x 2 M 100kg = K s 1000 N m ---- = x 1 0.1 m s ----t = µ k 0.1 = µ s 0.3 = An FBD and equation can be developed for the system. The friction force will be left as a variable at this point. N 100kg9.81 N kg ------ 981N = = 0N F F µ s N 294.3N < < ≤ static friction d dt ----- x 2 0 m s ---- ≤ F F µ k N 98.1N = = kinetic friction d dt ----- x 2 0 m s ---- > The analysis of the system begins with assuming the system starts at rest and unde- flected. In this case the cable/spring will be undeflected with no force, and the mass will be experiencing static friction. Therefore the block will stay in place until the cable stretches enough to overcome the static friction. x 2 '' 10s 2 – x 2 + 1 m s 3 ---- t F F 100kg --------------- – = x 2 0 = x 2 '' 0 = F F 294.3N = 0 10s 2 – 0 + 1 m s 3 ---- t 294.3N 100kg ----------------- – = 1 m s 3 ---- t 294.3kgm 100kgs 2 ------------------------ = t 2.943s = Therefore the system is static from 0 to 2.943s page 96 Figure 70 Analysis of the object before motion begins Figure 71 Analysis of the object after motion begins After motion begins the object will only experience kinetic friction, and continue to accellerate until the cable/spring becomes loose in compression. This stage of motion requires the solution of a differential equation. x 2 '' 10s 2 – x 2 + 1 m s 3 ---- t 98.1N 100kg --------------- – = x 2 '' 10s 2 – x 2 + 0 = For the homogeneous, A 10s 2 – + 0 = A 3.16js 1 – t = x h C 1 3.16t C 2 + ( ) sin = x p At B + = For the particular, x p ' A = x p '' 0 = 0 10s 2 – At B + ( ) + 1 m s 3 ---- t 98.1N 100kg --------------- – = 10s 2 – A 1 m s 3 ---- = 10s 2 – B 98.1N 100kg --------------- – = A 0.1 m s ---- = B 0.0981m – = page 97 Figure 72 Analysis of the object after motion begins For the initial conditions, x t ( ) C 1 3.16t C 2 + ( ) sin 0.1 m s ----t 0.0981m – + = x 2.943s ( ) 0m = d dt ---- -x 2.943s ( ) 0 m s ---- = 0 C 1 3.16 2.943s ( ) C 2 + ( ) sin 0.1 m s ---- 2.943s ( ) 0.0981m – + = C 1 9.29988 C 2 + ( ) sin 0.1962 – = d dt -----x t ( ) 3.16C 1 3.16t C 2 + ( ) cos 0.1 m s ---- + = 0 3.16C 1 3.16 2.943 ( ) C 2 + ( ) cos 0.1 m s ---- + = C 1 9.29988 C 2 + ( ) cos 0.0316 – = C 1 9.29988 C 2 + ( ) sin C 1 9.29988 C 2 + ( ) cos ----------------------------------------------------- 0.1962 – 0.0316 – ------------------- = 9.29988 C 2 + ( ) tan 6.209 = C 2 7.889 – πn + ( )rad = C 1 0.1962 – 9.29988 7.889 – ( ) sin --------------------------------------------------- 0.199m – = = x t ( ) 0.199 – m 3.16t 7.889rad – ( ) sin 0.1 m s ----t 0.0981m – + = d dt ----- x t ( ) 0.199 – 3.16 ( )m 3.16t 7.889rad – ( ) cos 0.1 m s ---- + = n I ∈ page 98 Figure 73 Determining when the cable become slack 0.1 m s ----t 0.199 – m 3.16t 7.889rad – ( ) sin 0.1 m s ----t 0.0981m – + = The equation of motion changes after the cable becomes slack. This point in time can be determined when the displacement of the block equals the displacement of the cable/spring end. 0.199 – m 3.16t 7.889rad – ( ) sin 0.0981m = 3.16t 7.889 – πn + 0.51549413 – = After this the differential equation without the cable/spring is used. x 2 '' 98.1N 100kg --------------- – 0.981 m s 2 ---- – = = x 3.328 ( ) 0.137m = d dt ---- -x 2.333 ( ) 0.648 m s ---- = x 2 '' 98.1N 100kg --------------- – 0.981 m s 2 ---- – = = x 2 ' 0.981 m s 2 ---- – ¸ , ¸ _ t C 1 + = 0.648 m s ---- 0.981 m s 2 ---- – ¸ , ¸ _ 3.328s ( ) C 1 + = C 1 3.913 m s ---- = x 2 0.981 2 ------------- m s 2 ---- – ¸ , ¸ _ t 2 3.913 m s ----t C 2 + + = x 2 t ( ) 0.981 2 ------------- m s 2 ---- – ¸ , ¸ _ t 2 3.913 m s ----t 7.453m – + = This motion continues until the block stops moving. t 3.989s = The solution can continue, considering when to switch the analysis conditions. t 3.328s = 0 0.981 m s 2 ---- – ¸ , ¸ _ t 3.913 m s ---- + = 0.137m 0.981 2 ------------- m s 2 ---- – ¸ , ¸ _ 3.328s ( ) 2 3.913 m s ---- 3.328s ( ) C 2 + + = C 2 7.453m – = page 99 3.6 CASE STUDY A typical vibration control system design is described in Figure 74. Figure 74 A vibration control system There are a number of elements to the design and analysis of this system, but as usual the best place to begin is by developing a free body diagram, and a differential equa- tion. This is done in Figure 75. M F y The model to the left describes a piece of reciprocating industrial equipment. The mass of the equipment is 10000kg. The equipment operates such that a force of 1000N with a frequency of 2Hz is exerted on the mass. We have been asked to design a vibration isolation mounting system. The criteria we are given is that the mounts should be 30cm high when unloaded, and 25cm when loaded with the mass. In addi- tion, the oscillations while the machine is running cannot be more than 2cm total. In total there will be four mounts mounted around the machine. Each isolator will be composed of a spring and a damper. M F page 100 Figure 75 FBD and derivation of equation Using the differential equation, the spring values can be found by assuming the machine is at rest. This is done in Figure 76. Figure 76 Calculation of the spring coefficient The remaining unknown is the damping coefficient. At this point we have deter- mined the range of motion of the mass. This can be done by developing the particular solution of the differential equation, as it will contain the steady-state oscillations caused 4K s y M F 4K d y' F y ∑ F 4K s y – 4K d y' – Mg + My'' = = y + My'' 4K d y' 4K s y + + F Mg + = y'' 4K d y' M ------------- 4K s y M ------------ + + F M ----- g + = Mg y'' 4K d y' 10000Kg ---------------------- 4K s y 10000Kg ---------------------- + + 1000N 10000Kg ---------------------- 2 2π ( )t ( ) sin 9.81ms 2 – + = y'' 0.0004Kg 1 – K d y' 0.0004Kg 1 – K s y + + 0.1ms 2 – 4πt ( ) sin 9.81ms 2 – + = 0.0004Kg 1 – K s y 9.81ms 2 – = When the system is at rest the equation is simplified; the acceleration and velocity terms both become zero. In addition, we will assume that the cyclic force is not applied for the unloaded/loaded case. This simplifies the differential equation by eliminating several terms. 0.0004Kg 1 – K s 0.05m ( ) 9.81ms 2 – = Now we can consider that when unloaded the spring is 0.30m long, and after loading the spring is 0.25m long. This will result in a downward compression of 0.05m, in the positive y direction. K s 9.81 0.0004 0.05 ( ) -------------------------------- Kgms 2 – m 1 – = K ∴ s 491KNm 1 – = page 101 by the forces as shown in Figure 77. Figure 77 Particular solution of the differential equation The particular solution can be used to find a damping coefficient that will give an overall oscillation of 0.02m, as shown in Figure 78. In this case Mathcad was used to find the solution, although it could have also been found by factoring out the algebra, and find- ing the roots of the resulting polynomial. y'' 0.0004Kg 1 – K d y' 0.0004Kg 1 – 491KNm 1 – ( )y + + 0.1ms 2 – 4πt ( ) sin 9.81ms 2 – + = y'' 0.0004Kg 1 – K d y' 196s 2 – y + + 0.1ms 2 – 4πt ( ) sin 9.81ms 2 – + = y A 4πt ( ) sin B 4πt ( ) cos C + + = y' 4πA 4πt ( ) cos 4πB 4πt ( ) sin – = y'' 16 – π 2 A 4πt ( ) sin 16π 2 B 4πt ( ) cos – = 16 – π 2 A 4πt ( ) sin 16π 2 B 4πt ( ) cos – ( ) 0.0004K d 4πA 4πt ( ) cos 4πB 4πt ( ) sin – ( ) + ∴ 196 A 4πt ( ) sin B 4πt ( ) cos C + + ( ) + 0.1 4πt ( ) sin 9.81 + = C 9.81ms 2 – = 16 – π 2 A 0.0004K d 4πB – ( ) 196A + + 0.1 = 16π 2 B – 0.0004K d 4πA 196A + + 0 = B A 31.8 10 6 – × K d 1.24 + ( ) = A 16 – π 2 196 + ( ) A 31.8 10 6 – × K d 1.24 + ( ) 5.0 10 3 – × – K d ( ) + 0.1 = A 0.1 K d 2 159 – 10 9 – × ( ) K d 6.2 10 3 – × – ( ) 38.1 + + -------------------------------------------------------------------------------------------------------- = A 16 – π 2 196 + ( ) B 5.0 10 3 – × – K d ( ) + 0.1 = A 0.1 16 – π 2 196 + 31.8 10 6 – × K d 1.24 + ( ) 5.0 10 3 – × – K d ( ) + ------------------------------------------------------------------------------------------------------------------------------------- = The particular solution can now be found by guessing a value, and solving for the coefficients. (Note: The units in the expression are uniform (i.e., the same in each term) and will be omitted for brevity.) B 3.18 10 6 – × K d 0.124 – K d 2 159 – 10 9 – × ( ) K d 6.2 10 3 – × – ( ) 38.1 + + -------------------------------------------------------------------------------------------------------- = page 102 Figure 78 Determining the damping coefficient The values of the spring and damping coefficients can be used to select actual components. Some companies will design and build their own components. Components can also be acquired by searching catalogs, or requesting custom designs from other com- panies. In the previous particular solution the values were split into cosine and sine components. The magnitude oscillation can be calculated with the Pythagorean formula. The design requirements call for a maximum oscillation of 0.02m, or a magnitude of 0.01m. magnitude A 2 B 2 + = magnitude 0.1 ( ) 2 3.18 10 6 – × K d 0.124 – ( ) 2 + K d 2 159 – 10 9 – × ( ) K d 6.2 10 3 – × – ( ) 38.1 + + -------------------------------------------------------------------------------------------------------- = 0.01 0.1 ( ) 2 3.18 10 6 – × K d 0.124 – ( ) 2 + K d 2 159 – 10 9 – × ( ) K d 6.2 10 3 – × – ( ) 38.1 + + -------------------------------------------------------------------------------------------------------- = A given-find block was used in Mathcad to obtain a damper value of, K d 3411N s m ---- = Aside: the Mathcad solution page 103 3.7 SUMMARY • First and second-order differential equations were analyzed explicitly. • First and second-order responses were examined. • The topic of analysis was discussed. • A case study looked at a second-order system. 3.8 PRACTICE PROBLEMS 1. a) Write the differential equations for the system below. Solve the equations for x assuming that the system is at rest and undeflected before t=0. Also assume that gravity is present. b) State whether the system is first or second-order. If the system if first-order find the time constant. If it is second-order find the natural frequency and damping ratio. M = 1 kg Kd = 1 Ns/m Ks = 1 N/m F = 1 N x Kd1 = 1 Ns/m Ks1 = 1 N/m F = 1 N x1 x2 Ks2 = 1 N/m Kd2 = 1Ns/m page 104 2. Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 seconds. The input is a step function that turns on at t=0. 3. Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 seconds. The input is a step function that turns on at t=0. 4. The following differential equation was derived for a mass suspended with a spring. At time 0s the system is released and allowed to drop. It then oscillates. Solve the differential equation to ans. x 12.485e 0.5t – – 0.866t 0.524 – ( ) cos 10.81 + = ans. ζ 0.5 = ω n 1 = x 1 1 e t – – = x 2 2 2e t – – = τ 1 = 0.5V o '' 0.6V o ' 2.1V o + + 3V i 2 + = V i 5V = V o 0 = V o ' 0 = initial conditions 0.5V o '' 0.6V o ' 2.1V o + + 3V i 2 + = V i 5V = V o 0 = V o ' 1 = initial conditions (ans. V 0 t ( ) 8.331e 0.6t – – 1.96t 0.238 – ( ) cos 8.095 + = page 105 find the motion as a function of time. y' 0 0ms 1 – = y 0 0m = K s 100 N m ---- = y M 1Kg = F y ∑ K s y Mg – My'' – = = 1 Nm s 2 -------- ¸ , ¸ _ y'' 100 N m ---- ¸ , ¸ _ y + 9.81N = 100 N m ---- ¸ , ¸ _ y 1Kg ( ) 9.81 N Kg ------- ¸ , ¸ _ – 1Kg – ( )y'' = + 1Kg ( )y'' 100 Kgm ms 2 ------------ ¸ , ¸ _ y + 9.81 Kgm s 2 ------------ = y'' 100s 2 – ( )y + 9.81ms 2 – = FBD: K s y Mg M (ans. homogeneous: guess y h e At = y h ' Ae At = y h '' A 2 e At = A 2 e At 100s 2 – ( )e At + 0 = C 2 0 = A 2 100s 2 – – = A 10 t js 1 – = y h C 1 10t C 2 + ( ) cos = particular: guess y p At B + = y p ' A = y p '' 0 = 0 ( ) 100s 2 – ( ) At B + ( ) + 9.81ms 2 – = A 0 = B 9.81ms 2 – 100s 2 – ---------------------- 0.0981m = = y p 0.0981m = 100s 2 – ( ) At B + ( ) 9.81ms 2 – = initial conditions: y y h y p + C 1 10t C 2 + ( ) cos 0.0981m + = = y' 10C 1 – 10t C 2 + ( ) sin = for d/dt y0 = 0m: 0 10C 1 – 10 0 ( ) C 2 + ( ) sin = C 1 0.0981m – = for y0 = 0m: 0 C 1 10 0 ( ) 0 ( ) + ( ) cos 0.0981m + = 0.0981m – C 1 0 ( ) cos = y 0.0981m – ( ) 10t ( ) cos 0.0981m + = page 106 5. Solve the following differential equation with the three given cases. All of the systems have a step input ’y’ and start undeflected and at rest. 6. Solve the following differential equation with the three given cases. All of the systems have a sinusoidal input ’y’ and start undeflected and at rest. 7. A system is to be approximated with a mass-spring-damper model using the following parame- ters: weight 28N, viscous damping coefficient 6Ns/m and stiffness 36N/m. Calculate the undamped natural frequency (Hz) of the system, the damping ratio and describe the type of response you would expect if the mass were displaced and released. What additional damping would be required to make the system critically damped? x' 0 = x 0 = y 1 = initial conditions x'' 2ξω n x' ω n 2 x + + y = ξ 0.5 = ω n 10 = ξ 1 = ω n 10 = ξ 2 = ω n 10 = case 1: case 2: case 3: x' 0 = x 0 = y t ( ) sin = initial conditions x'' 2ξω n x' ω n 2 x + + y = ξ 0.5 = ω n 10 = ξ 1 = ω n 10 = ξ 2 = ω n 10 = case 1: case 2: case 3: page 107 8. What is the transfer function for a second-order system that responds to a step input with an overshoot of 20%, with a delay of 0.4 seconds to the first peak? 9. For our standard lumped parameter model weight is 36N, stiffness is 2.06*10 3 N/m and damp- ing coefficient is 100Ns/m. What are the natural frequency (Hz) and damping ratio? (ans. fn=3.77Hz, damp.=.575) 10. What would the displacement amplitude after 100ms for a system having a natural frequency of 13 rads/sec and a damping ratio of 0.20. Assume an initial displacement of 50mm. (0.018m) 11. A spring damper system supports a mass of 34N. If it has a spring constant of 20.6N/cm, what is the systems natural frequency? (ans. 24.37 rad/sec) 12. Determine the first order differential equation given the graphical response shown below. (ans. K d 6N s m ---- = K s 36 N m ---- = Given M 28N 9.81 N kg ----- - ----------------- 2.85kg = = x F --- 1 D 2 M DK d K s + + ------------------------------------------ A D 2 D2ξω n ω n 2 + + -------------------------------------------- = = The typical transfer function for a mass-spring-damper systems is, ω n K s M ----- 36 N m ---- 2.85kg ---------------- 36 kgm ms 2 ---------- 2.85kg ----------------- 12.63s 2 – 3.55 rad s --------- = = = = = ξ K d M ------ ¸ , ¸ _ 2ω n ------------ 6N s m ---- 2 3.55 ( ) rad s ---------2.85kg --------------------------------------------- 0.296 = = = ω d ω n 1 ξ 2 – 3.39 rad s --------- = = The second order parameters can be calculated from this. If pulled and released the system would have a decaying oscillation about 1.9Hz A critically damped system would require a damping coefficent of.... ξ K d M ------ ¸ , ¸ _ 2ω n ------------ K d 2 3.55 ( ) rad s --------- 2.85kg --------------------------------------------- 1 = = = K d 20.2 Ns m ------ = page 108 Assume the input is a step function. 13. The second order response below was obtained experimentally. Determine the parameters of 0 1 2 3 4 t(s) x 4 (ans. 0 1 2 3 4 t(s) x 4 τ 1 = x' 1 τ ---x + A = Given the equation form, x' 0 = The values at steady state will be x 4 = So the unknown ‘A’ can be calculated. 0 1 1 ---4 + A = A 4 = x' 1 1 ---x + 4 = x' x + 4 = page 109 the differential equation that resulted in the response assuming the input was a step function. 10 1s 2 0.5s t(s) 0 page 110 14. Explain with graphs how to develop first and second-order equations using experimental data. (ans. b ∆x ------ e σt p – = ω d π t p ---- ≈ σ ξω n = ξ 1 π t p σ -------- ¸ , ¸ _ 2 1 + ----------------------------- = 2 10 ------ e σ0.5 – = 2 10 ------ ¸ , ¸ _ ln σ0.5 – = σ 2 2 10 ------ ¸ , ¸ _ ln – 3.219 = = For the first peak: ω d 2π 1s ------ 2π = = For the damped frequency: ω d ω n 1 ξ 2 – = These values can be used to find the damping coefficient and natural frequency ω n 3.219 ξ ------------- = 2π 3.219 ξ ------------- 1 ξ 2 – = 2π 3.219 ------------- ¸ , ¸ _ 2 1 ξ 2 – ξ 2 -------------- = 2π 3.219 ------------- ¸ , ¸ _ 2 1 + 1 ξ 2 ----- = ξ 1 2π 3.219 ------------- ¸ , ¸ _ 2 1 + ------------------------------- 0.4560 = = ω n 3.219 ξ ------------- 3.219 0.4560 ---------------- 7.059 = = = This leads to the final equation using the steady state value of 10 x'' 2ξω n x' ω n 2 x + + F = x'' 2 0.4560 ( ) 7.059 ( )x' 7.059 ( ) 2 x + + F = x'' 6.438x' 49.83x + + F = 0 ( ) 6.438 0 ( ) 49.83 10 ( ) + + F = F 498.3 = x'' 6.438x' 49.83x + + 498.3 = page 111 (ans. Key points: First-order: find initial final values find time constant with 63% or by slope use these in standard equation Second-order: find damped frequency from graph find time to first peak use these in cosine equation page 112 4. NUMERICAL ANALYSIS 4.1 INTRODUCTION For engineering analysis it is always preferable to develop explicit equations that include symbols, but this is not always practical. In cases where the equations are too costly to develop, numerical methods can be used. As their name suggests, numerical methods use numerical calculations (i.e., numbers not symbols) to develop a single solu- tion to a differential equation. The solution is often in the form of a set of numbers, or a graph. This can then be used to analyze a particular design case. The solution is often returned quickly so trial and error design techniques may be used. But, without a symbolic equation the system can be harder to understand and manipulate. This chapter focuses on techniques that can be used for numerically integrating systems of differential equations. 4.2 THE GENERAL METHOD The general process of analyzing systems of differential equations involves first putting the equations into standard form, and then integrating these with one of a number of techniques. The most common standard form is state variable form, which reduces all of the equations to first-order differential equations. These first-order equations are then easily integrated to provide a solution for the system of equations. Topics: Objectives: • To be able to solve systems of differential equations using numerical methods. • State variable form for differential equations • Numerical integration with Mathcad and calculators • Numerical integration theory: first-order, Taylor series and Runge-Kutta • Using tabular data • A design case page 113 4.2.1 State Variable Form At any time a system can be said to have a state. Consider a car for example, the state of the car is described by its position and velocity. Factors that are useful when iden- tifying state variables are: • The variables should describe energy storing elements (potential or kinetic). • The variables must be independent. • They should fully describe the system elements. After the state variables of a system have been identified, they can be used to write first-order state variable equations. The general form of state variable equations is shown in Figure 79. Notice that the state variable equation is linear, and the value of x is used to calculate the derivative. The output equation is not always required, but it can be used to calculate new output values. Figure 79 The general state variable form An example of a state variable equation is shown in Figure 80. As always, the FBD is used to develop the differential equation. The resulting differential equation is second- order, but this must be reduced to first-order. Using the velocity variable, ’v’, reduces the second-order differential equation can be reduced to a first-order equation. An equation is also required to define the velocity as the first derivative of the position, ’x’. In the exam- ple the two state equations are manipulated into a matrix form. This form can be useful, and may be required for determining a solution. For example, HP calculators require the matrix form, while TI calculators use the equation forms. Software such as Mathcad can use either form. The main disadvantage of the matrix form is that it will only work for lin- d dt ----- ¸ , ¸ _ x Ax Bu + = where, x = state/output vector (variables such as position) u = input vector (variables such as input forces) A = transition matrix relating outputs/states B = matrix relating inputs to outputs/states y Cx Du + = y = non-state value that can be found directly (i.e. no integration) C = transition matrix relating outputs/states D = matrix relating inputs to outputs/states state variable equation output equation page 114 ear differential equations. Figure 80 A state variable equation example Given the FBD shown below, the differential equation for the system is, M F K d x' K s x F x ∑ F – K d x' K s x + + Mx'' = = + x F – K d x' K s x + + Mx'' = The equation is second-order, so two state variables will be needed. One obvious choice for a state variable in this equation is ’x’. The other choice can be the veloc- ity, ’v’. Equation (1) defines the velocity variable. The velocity variable can then be substituted into the differential equation for the system to reduce it to first-order. x' v = F – K d x' K s x + + Mx'' = F – K d v K s x + + Mv' = v' x K s M ----- ¸ , ¸ _ v K d M ------ ¸ , ¸ _ F – M ------ ¸ , ¸ _ + + = (1) (2) Equations (1) and (2) can also be put into a matrix form similar to that given in Fig- ure 79. d dt ----- x v 0 1 K s M ----- K d M ------ x v 0 F – M ------ + = Note: To have a set of differential equations that is solvable, there must be the same number of state equations as variables. If there are too few equations, then an additional equation must be developed using an unexploited relationship. If there are too many equations, a redundancy or over constraint must be elimi- nated. page 115 Figure 81 Drill problem: Put the equation in state variable form Consider the two cart problem in Figure 82. The carts are separated from each other and the wall by springs, and a force is applied to the left hand side. Free body dia- grams are developed for each of the carts, and differential equations developed. For each cart a velocity state variable is created. The equations are then manipulated to convert the second-order differential equations to first-order state equations. The four resulting equa- tions are then put into the state variable matrix form. F ∑ F M d dt ---- - ¸ , ¸ _ 2 x = = Put the equation into state variable and matrix form. page 116 Figure 82 Two cart state equation example M 2 K s2 x 2 M 1 F K s1 x 1 M 2 M 1 K s1 x 1 x 2 – ( ) F K s1 x 1 x 2 – ( ) K s2 x 2 ( ) F x ∑ F K s1 x 1 x 2 – ( ) – M 1 x 1 '' = = F x ∑ K s1 x 1 x 2 – ( ) K s2 x 2 ( ) – M 2 x 2 '' = = + + M 1 x 1 '' K s1 x 1 K s1 x 2 – + F = M 2 x 2 '' K s1 K s2 + ( )x 2 K s1 x 1 – + 0 = x 1 ' v 1 = M 1 v 1 ' K s1 x 1 K s1 x 2 – + F = v 1 ' F M 1 ------- K s1 M 1 -------- x 1 – K s1 M 1 -------- x 2 + = (1) (2) (3) (4) x 2 ' v 2 = M 2 v 2 ' K s1 K s2 + ( )x 2 K s1 x 1 – + 0 = v 2 ' K s1 M 2 -------- x 1 K s1 K s2 + M 2 ----------------------- ¸ , ¸ _ x 2 – = The state equations can now be combined in a matrix form. d dt ----- x 1 v 1 x 2 v 2 0 1 0 0 K – s1 M 1 ----------- 0 K s1 M 1 -------- 0 0 0 0 1 K s1 M 2 -------- 0 K – s1 K s2 – M 2 -------------------------- 0 x 1 v 1 x 2 v 2 0 F M 1 ------- 0 0 + = page 117 Figure 83 Drill problem: Develop the state equations in matrix form M 2 K s2 x 2 M 1 F K s1 x 1 K d1 page 118 Figure 84 Drill problem: Convert the system to state equations In some cases we will develop differential equations that cannot be directly reduced because they have more than one term at the highest order. For example, if a sec- ond-order equation has two second derivatives it cannot be converted to a state equation in the normal manner. In this case the two high order derivatives can be replaced with a dummy variable. In mechanical systems this often happens when masses are neglected. Consider the example problem in Figure 85, both ’y’ and ’u’ are first derivatives. To solve this problem, the highest order terms (’y’ and ’u’) are moved to the left of the equation. A dummy variable, ’q’, is then created to replace these two variables with a single variable. M 1 K s1 K d1 x 1 page 119 This also creates an output equation as shown in Figure 79. Figure 85 Using dummy variables for multiple high order terms At other times it is possible to eliminate redundant terms through algebraic manip- ulation, as shown in Figure 86. In this case the force on both sides of the damper is the same, so it is substituted into the equation for the cart. But, the effects on the damper must also be integrated, so a dummy variable is created for the integration. An output equation needed to be created to calculate the value for x 1 . 3y' 2y + 5u' = Given the equation, Step 1: put both the first-order derivatives on the left hand side, 3y' 5u' – 2y – = Step 2: replace the left hand side with a dummy variable, q' ∴ 2y – = q 3y 5u – = Step 3: solve the equation using the dummy variable, then solve for y as an output eqn. q' 2y – = y q 5u + 3 --------------- = page 120 Figure 86 A dummy variable example M K d x1 x 2 M K d x 1 ' x 2 ' – ( ) F K d x 1 ' x 2 ' – ( ) F F x ∑ F K d x 1 ' x 2 ' – ( ) – 0 = = x 2 ' v 2 = K d x 1 ' x 2 ' – ( ) F = F x ∑ K d x 1 ' x 2 ' – ( ) Mx 2 '' = = (1) (3) (4) + + q x 1 x 2 – = q' F K d ------ = x 1 x 2 q + = (2) F Mx 2 '' = v 2 ' F M ---- - = d dt ----- q x 2 v 2 0 0 0 0 0 1 0 0 0 q x 2 v 2 F K d ------ 0 F M ---- - + = The FBDs and equations are; K d q ( ) F = The state equations (1, 3, 4) can be put in matrix form. The output equation (2) can also be put in matrix form. x 1 1 1 0 q x 2 v 2 0 + = page 121 4.3 NUMERICAL INTEGRATION Repetitive calculations can be used to develop an approximate solution to a set of differential equations. Starting from given initial conditions, the equation is solved with small time steps. Smaller time steps result in a higher level of accuracy, while larger time steps give a faster solution. 4.3.1 Numerical Integration With Tools Numerical solutions can be developed with hand calculations, but this is a very time consuming task. In this section we will explore some common tools for solving state variable equations. The analysis process follows the basic steps listed below. 1. Generate the differential equations to model the process. 2. Select the state variables. 3. Rearrange the equations to state variable form. 4. Add additional equations as required. 5. Enter the equations into a computer or calculator and solve. An example in Figure 87 shows the first four steps for a mass-spring-damper com- bination. The FBD is used to develop the differential equations for the system. The state variables are then selected, in this case the position, y, and velocity, v, of the block. The equations are then rearranged into state equations. The state equations are also put into matrix form, although this is not always necessary. At this point the equations are ready for solution. Figure 87 Dynamic system example Figure 88 shows the method for solving state equations on a TI-86 graphing calcu- lator. (Note: this also works on other TI-8x calculators with minor modifications.) In the example a sinusoidal input force, F, is used to make the solution more interesting. The next step is to put the equation in the form expected by the calculator. When solving with the TI calculator the state variables must be replaced with the predefined names Q1, Q2, etc. The steps that follow describe the button sequences required to enter and analyze the equations. The result is a graph that shows the solution of the equation. Points can then be taken from the graph using the cursors. (Note: large solutions can sometimes take a few minutes to solve.) page 122 M K d K S y F F K d d dt ---- - ¸ , ¸ _ y K s y M d dt ---- - ¸ , ¸ _ 2 y + + + ∴ 0 = Step 2: We need to identify state variables. In this case the height is clearly a defining variable. We will also need to use the vertical velocity, because the acceleration is a second deriva- tive (we can only have first derivatives). Using the height, y, and velocity, v, as state vari- ables we may now proceed to rewriting the equations. (Note: this is just an algebraic trick, but essential when setting up these matrices.) F y ∑ F – K d d dt ---- - ¸ , ¸ _ y – K s y – M d dt ---- - ¸ , ¸ _ 2 y = = d dt ----- ¸ , ¸ _ v F – K d v – K s y – M -------------------------------------- = d dt ----- ¸ , ¸ _ y v = Step 4: We put the equations into a state variable matrix form. d dt ----- ¸ , ¸ _ y d dt ----- ¸ , ¸ _ v 0 1 K S – M --------- K d – M --------- y v 0 1 – F M ---- - + = Step 1: Develop equations Step 3: M F K d y' K s y page 123 Figure 88 Solving state equations with a TI-85 calculator d dt ----- ¸ , ¸ _ v y F – K d v y – K s y – M ---------------------------------------- 4e 0.5t – t ( ) sin – 2v y – 5y – = = d dt ----- ¸ , ¸ _ y v y = Next, the calculator requires that the state variables be Q1, Q2, ..., Q9, so we replace y with Q1 and v with Q2. First, we select some parameter values for the equations of Figure 87. The input force will be a decaying sine wave. Q2' 4e 0.5t – t ( ) sin – 2Q2 – 5Q1 – = Q1' Q2 = Now, we enter the equations into the calculator and solve. To do this roughly follow the steps below. Look at the calculator manual for additional details. 1. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER] 2. Go to graph mode and enter the equations above [GRAPH][F1] 3. Set up the axis for the graph [GRAPH][F2] so that time and the x- axis is from 0 to 10 with a time step of 0.5, and the y height is from +3 to -3. 4. Enter the initial conditions for the system [GRAPH][F3] as Q1=0, Q2=0 5. Set the axis [GRAPH][F4] as x=t and y=Q 6. (TI-86 only) Set up the format [GRAPH][MORE][F1][Fld- Off][ENTER] 7. Draw the graph [GRAPH][F5] 8. Find points on the graph [GRAPH][MORE][F4]. Move the left/right cursor to move along the trace, use the up/down cursor to move between traces. page 124 Figure 89 Solving state equations with a TI-89 calculator State equations can also be solved in Mathcad using built-in functions, as shown in Figure 90. The first step is to enter the state equations as a function, ’D(t, Q)’, where ’t’ is the time and ’Q’ is the state variable vector. (Note: the equations are in a vector, but it is not the matrix form.) The state variables in the vector ’Q’ replace the original state vari- ables in the equations. The ’rkfixed’ function is then used to obtain a solution. The argu- ments for the function, in sequence are; the state vector, the start time, the end time, the number of steps, and the state equation function. In this case the 10 second time interval is divided into 100 parts each 0.1s in duration. This time is chosen because of the general d dt ----- ¸ , ¸ _ v y F – K d v y – K s y – M ---------------------------------------- 4e 0.5t – t ( ) sin – 2v y – 5y – = = d dt ----- ¸ , ¸ _ y v y = Next, the calculator requires that the state variables be Q1, Q2, ..., Q9, so we replace y with Q1 and v with Q2. First, we select some parameter values for the equations of Figure 87. The input force will be a decaying sine wave. Q2' 4e 0.5t – t ( ) sin – 2Q2 – 5Q1 – = Q1' Q2 = Now, we enter the equations into the calculator and solve. To do this roughly follow the steps below. Look at the calculator manual for additional details. 1. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER] 2. Go to graph mode and enter the equations above [GRAPH][F1] 3. Set up the axis for the graph [GRAPH][F2] so that time and the x- axis is from 0 to 10 with a time step of 0.5, and the y height is from +3 to -3. 4. Enter the initial conditions for the system [GRAPH][F3] as Q1=0, Q2=0 5. Set the axis [GRAPH][F4] as x=t and y=Q 6. (TI-86 only) Set up the format [GRAPH][MORE][F1][Fld- Off][ENTER] 7. Draw the graph [GRAPH][F5] 8. Find points on the graph [GRAPH][MORE][F4]. Move the left/right cursor to move along the trace, use the up/down cursor to move between traces. UPDATE FOR TI-89 page 125 response time for the system. If the time step is too large the solution may become unsta- ble and go to infinity. A time step that is too small will increase the computation time mar- gnially. When in doubt, run the calculator again using a smaller time step. Figure 90 Solving state variable equations with Mathcad Note: Notice that for the TI calculators the variables start at Q1, while in Mathcad the arrays start at Q0. Many students encounter problems because they forget this. page 126 4.3.2 Numerical Integration The simplest form of numerical integration is Euler’s first-order method. Given the current value of a function and the first derivative, we can estimate the function value a short time later, as shown in Figure 91. (Note: Recall that the state equations allow us to calculate first-order derivatives.) The equation shown is known as Euler’s equation. Basi- cally, using a known position and first derivative we can calculate an approximate value a short time, h, later. Notice that the function being integrated curves downward, creating an error between the actual and estimated values at time ’t+h’. If the time step, h, were smaller, the error would decrease. Figure 91 First-order numerical integration The example in Figure 92 shows the solution of Newton’s equation using Euler’s method. In this example we are determining velocity by integrating the acceleration caused by a force. The acceleration is put directly into Euler’s equation. This is then used to calculate values iteratively in the table. Notice that the values start before zero so that initial conditions can be used. If the system was second-order we would need two previous values for the calculations. y t h + ( ) y t ( ) h d dt ---- -y t ( ) + ≈ Note: here the h value is the time step between integrations points. A smaller time step will increase the accuracy. y t h + ( ) y t ( ) d dt -----y t ( ) t h + t page 127 Figure 92 Numerical integration example F M d dt ----- ¸ , ¸ _ v = Given the differential equation, we can create difference equations using simple methods. d dt ----- ¸ , ¸ _ v F M ----- = v t h + ( ) v t ( ) h d dt ----- ¸ , ¸ _ v t ( ) + ≈ v t h + ( ) v t ( ) h F t ( ) M ---------- ¸ , ¸ _ + ≈ first rearrange equation put this in the Euler equation finally substitute in known terms We can now use the equation to estimate the system response. We will assume that the system is initially at rest and that a force of 1N will be applied to the 1kg mass for 4 seconds. After this time the force will rise to 2N. A time step of 2 seconds will be used. i -1 0 1 2 3 4 5 6 7 8 t (sec) -2 0 2 4 6 8 10 12 14 16 F (N) 0 1 1 2 2 2 2 2 2 2 d/dt v i 0 1 1 2 2 2 2 2 etc v i 0 0 2 4 8 12 16 20 etc page 128 Figure 93 Drill problem: Numerically integrate the differential equation An example of solving the previous example with a traditional programming lan- guage is shown in Figure 94. In this example the results will be written to a text file ’out.txt’. The solution iteratively integrates from 0 to 10 seconds with time steps of 0.1s. The force value is varied over the time period with ’if’ statements. The integration is done with a separate function. x' 3x + 5 = Use first-order integration to solve the differential equation from 0 to 10 seconds with time steps of 1 second. page 129 Figure 94 Solving state variable equations with a C program double step(double, double, double); int main(){ double h = 0.1, M = 1.0, F; FILE *fp; double v, t; if( ( fp = fopen("out.txt", "w")) != NULL){ v = 0.0; for( t = 0.0; t < 10.0; t += h ){ if((t >= 0.0) && (t < 4.0)) F = 1.0; if(t > 4.0) F = 2.0; v = step(v, h, F/M); fprintf(fp, "%f, %f, %f\n", t, v, F, M); } } fclose(fp); } double step(double v, double h, double slope){ double v_new; v_new = v + h * slope; return v_new; } page 130 Figure 95 Solving state variable equations with a Java program double step(double, double, double); public class Integrate extends Object public void main() { double h = 0.1, M = 1.0, F; FileOut fp = new FileOut("out.txt"); if(fp.writeStatus != fp.IO_EXCEPTION){ double v = 0.0; for( double t = 0.0; t < 10.0; t += h ){ if((t >= 0.0) && (t < 4.0)) F = 1.0; if(t > 4.0) F = 2.0; v = step(v, h, F/M); fp.printf(fp, "%f, %f, %f\n", t, v, F, M); } fp.close(); } fclose(fp); } public double step(double v, double h, double slope){ double v_new; v_new = v + h * slope; return v_new; } } page 131 4.3.3 Taylor Series First-order integration works well with smooth functions. But, when a highly curved function is encountered we can use a higher order integration equation. Recall the Taylor series equation shown in Figure 96 for approximating a function. Notice that the first part of the equation is identical to Euler’s equation, but the higher order terms add accuracy. Figure 96 The Taylor series An example of the application of the Taylor series is shown in Figure 97. Given the differential equation, we must first determine the derivatives and substitute these into Tay- lor’s equation. The resulting equation is then used to iteratively calculate values. x t h + ( ) x t ( ) h d dt ----- ¸ , ¸ _ x t ( ) 1 2! ---- - h 2 d dt ---- - ¸ , ¸ _ 2 x t ( ) 1 3! ---- - h 3 d dt ---- - ¸ , ¸ _ 3 x t ( ) 1 4! ---- - h 4 d dt ---- - ¸ , ¸ _ 4 x t ( ) … + + + + + = page 132 Figure 97 Integration using the Taylor series method Recall that the state variable equations are first-order equations. But, to obtain accuracy the Taylor method also requires higher order derivatives, thus making is unsuit- able for use with state variable equations. 4.3.4 Runge-Kutta Integration First-order integration provides reasonable solutions to differential equations. That accuracy can be improved by using higher order derivatives to compensate for function curvature. The Runge-Kutta technique uses first-order differential equations (such as state equations) to estimate the higher order derivatives, thus providing higher accuracy without requiring other than first-order differential equations. d dt ----- ¸ , ¸ _ x 1 e 20t – t 3 x + + + = x 0 0 = h 0.1 = t (s) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 x(t) 0 0 Thus We can write, d dt ----- ¸ , ¸ _ 2 x e t – – 3t 2 + = d dt ----- ¸ , ¸ _ 3 x e t – 6t + = e.g., for t=0.1 x 0 0.1 + ( ) 0 0.1 2 ( ) 1 2! ----- 0.1 ( ) 2 1 – ( ) 1 3! ---- - 0.1 ( ) 3 1 ( ) + + + = = x' x – 1 e 20t – t 3 + + = Given x t h + ( ) x t ( ) h 1 e 20t – t 3 x + + + ( ) 1 2! ---- - h 2 e t – – 3t 2 + ( ) 1 3! ---- - h 3 e t – 6t + ( ) + + + = In the Taylor series this becomes, page 133 The equations in Figure 98 are for fourth order Runge-Kutta integration. The func- tion ’f()’ is the state equation or state equation vector. For each time step the values ’F1’ to ’F4’ are calculated in sequence and then used in the final equation to find the next value. The ’F1’ to ’F4’ values are calculated at different time steps, and values from previous time steps are used to ’tweak’ the estimates of the later states. The final summation equa- tion has a remote similarity to Euler’s equation. Notice that the two central values in time are more heavily weighted. Figure 98 Fourth order Runge-Kutta integration An example of a Runge-Kutta integration calculation is shown in Figure 99. The solution begins by putting the state equations in matrix form and defining initial condi- tions. After this, the four integrating factors are calculated. Finally, these are combined to get the final value after one time step. The number of calculations for a single time step should make obvious the necessity of computers and calculators. x t h + ( ) x t ( ) 1 6 --- F 1 2F 2 2F 3 F 4 + + + ( ) + = F 1 hf t x , ( ) = F 2 hf t h 2 --- + x F 1 2 ------ + , ¸ , ¸ _ = F 3 hf t h 2 --- + x F 2 2 ------ + , ¸ , ¸ _ = F 4 hf t h + x F 3 + , ( ) = where, x = the state variables f = the differential function or (d/dt) x t = current point in time h = the time step to the next integration point page 134 Figure 99 Runge-Kutta integration example d dt -----x v = d dt -----v 3 4v 5y + + = y 2 (assumed input) = v 0 1 = d dt ----- x v 0 1 0 4 x v 0 0 5 3 y 1 + = x 0 3 = h 0.1 = F 2 0.1 0 1 0 4 3 0.1 2 ------- + 1 1.7 2 ------- + 0 0 5 3 2 1 + ¸ , ¸ _ 0.185 2.04 = = For the first time step, F 1 0.1 0 1 0 4 3 1 0 0 5 3 2 1 + ¸ , ¸ _ 0.1 1 4 0 13 + ¸ , ¸ _ 0.1 1.7 = = = F 3 0.1 0 1 0 4 3 0.185 2 ------------- + 1 2.04 2 ---------- + 0 0 5 3 2 1 + ¸ , ¸ _ 0.202 2.108 = = F 4 0.1 0 1 0 4 3 0.202 + 1 2.108 + 0 0 5 3 2 1 + ¸ , ¸ _ 0.3108 2.5432 = = x i 1 + v i 1 + x i v i 1 6 --- F 1 2F 2 2F 3 F 4 + + + ( ) + = x i 1 + v i 1 + 3 1 1 6 --- 0.1 1.7 2 0.185 2.04 2 0.202 2.108 0.3108 2.5432 + + + ¸ , ¸ _ + 3.1974667 3.0898667 = = page 135 Figure 100 Drill problem: Integrate the acceleration function F M d dt ----- ¸ , ¸ _ 2 x = use, x(0) = 1 v(0) = 2 h = 0.5 s F = 10 M = 1 page 136 Figure 101 Drill problem: Integrate to find the system response Kd Ks M y Leave the solution in variable form, and then change values to see how the system response changes. K d 10Nsm 1 – = K s 10Nm 1 – = M 1kg = y 0 1 = y 0 ' 0 = page 137 The program below is used to perform a Runge-Kutta integration of a mass-spring- damper system. XXXXXXXXXXXXXXXXXXXXXXXX // // A program to do Runge Kutta integration of a mass spring damper system // #include <stdio.h> voidmultiply(double, double[], double[]); voidadd(double[], double[], double[]); voidstep(double, double, double[]); voidderivative(double, double[], double[]); #defineSIZE 2 // the length of the state vector #defineKs 1000 // the spring coefficient #defineKd 10000 // the damping coefficient #defineMass 10 // the mass coefficient #defineForce 100 // the applied force int main(){ FILE *fp; double h = 0.001; double t; int j = 0; double X[SIZE];// create state variable list X[0] = 0;// set initial condition for x X[1] = 0;// set initial condition for v if( ( fp = fopen("out.txt", "w")) != NULL){ fprintf(fp, " t(s) x v \n\n"); for( t = 0.0; t < 50.0; t += h ){ step(t, h, X); if(j == 0) fprintf(fp, "%9.5f %9.5f %9.5f\n", t, X[0], X[1]); j++; if(j >= 10) j = 0; } } fclose(fp); } page 138 Figure 102 Runge-Kutta integration program // // First order integration done here (could be replaced with runge kutta) // void step(double t, double h, double X[]){ double tmp[SIZE], dX[SIZE], F1[SIZE], F2[SIZE], F3[SIZE], F4[SIZE]; // Calculate F1 derivative(t, X, dX); multiply(h, dX, F1); // Calculate F2 multiply(0.5, F1, tmp); add(X, tmp, tmp); derivative(t+h/2.0, tmp, dX); multiply(h, dX, F2); // Calculate F3 multiply(0.5, F2, tmp); add(X, tmp, tmp); derivative(t+h/2.0, tmp, dX); multiply(h, dX, F3); // Calculate F4 add(X, F3, tmp); derivative(t+h, tmp, dX); multiply(h, dX, F4); // Calculate the weighted sum add(F2, F3, tmp); multiply(2.0, tmp, tmp); add(F1, tmp, tmp); add(F4, tmp, tmp); multiply(1.0/6.0, tmp, tmp); add(tmp, X, X); } page 139 Figure 103 Runge-Kutta integration program (continued) Figure 104 Runge-Kutta integration program (continued) 4.4 SYSTEM RESPONSE In most cases the result of numerical analysis is graphical or tabular. In both cases details such as time constants and damped frequencies can be obtained by the same meth- ods used for experimental analysis. In addition to these methods there is a technique that can determine the steady-state response of the system. 4.4.1 Steady-State Response The state equations can be used to determine the steady-state response of a system by setting the derivatives to zero, and then solving the equations. Consider the example in Figure 105. The solution begins with a state variable matrix. (Note: this can also be done // // State Equations Calculated Here // void derivative(double t, double X[], double dX[]){ dX[0] = X[1]; dX[1] = (-Ks/Mass)*X[0] + (-Kd/Mass)*X[1] + (Force/Mass); } // // A subroutine to add vectors to simplify other equations // void add(double X1[], double X2[], double R[]){ for(int i = 0; i < SIZE; i++) R[i] = X1[i] + X2[i]; } // // A subroutine to multiply a vector by a scalar to simplify other equations // void multiply(double X, double V[], double R[]){ for(int i = 0; i < SIZE; i++) R[i] = X*V[i]; } page 140 without the matrix also.) The derivatives on the left hand side are set to zero, and the equa- tions are rearranged and solved with Cramer’s rule. Figure 105 Finding the steady-state response 4.5 DIFFERENTIATION AND INTEGRATION OF EXPERIMENTAL DATA When doing experiments, data is often collected in the form of individual data points (not as complete functions). It is often necessary to integrate or differente these val- ues. The basic equations for integrating and differentiating are shown in Figure 106. Given data points, y, collected at given times, t, we can integrate and differentiate using the given equations. The integral is basically the average height of the two points multiplied by the width to give an area, or integral. The first derivative is basically the slope between two points. The second derivative is the change in slope values for three points. In a computer based system the time points are often equally spaced in time, so the difference in time can be replaced with a sample period, T. Ideally the time steps would be as small as possible to d dt ----- x v 0 1 K s M ----- – K d M ------ – x v 0 F M ---- - + = Given the state variable form: Set the derivatives to zero 0 0 0 1 K s M ----- – K d M ------ – x v 0 F M ---- - + = Solve for x and v 0 1 K s M ----- – K d M ------ – x v 0 F M ---- - – = x 0 1 F M ----- – K d M ------ – 0 1 K s M ----- – K d M ------ – ----------------------------- F M ----- ¸ , ¸ _ K s M ----- ¸ , ¸ _ ----------- F K S ------ = = = v 0 0 K s M ----- – F M ---- - – 0 1 K s M ----- – K d M ------ – ----------------------------- 0 K s M ----- ¸ , ¸ _ ----------- 0 = = = page 141 increase the accuracy of the estimates. Figure 106 Integration and differentiation using data points 4.6 ADVANCED TOPICS 4.6.1 Switching Functions When analyzing a system, we may need to choose an input that is more complex than the inputs such as the step, ramp, sinusoidal and parabolic. The easiest way to do this is to use switching functions. Switching functions turn on (have a value of 1) when their arguments are greater than or equal to zero, or off (a value of 0) when the argument is neg- ative. Examples of the use of switching functions are shown in Figure 107. By changing T T y i 1 – y i 1 + t i y i t i 1 – t i 1 + y t ( ) y t i ( ) t d t i 1 – t i ∫ y i y i 1 – + 2 --------------------- ¸ , ¸ _ t i t i 1 – – ( ) ≈ T 2 --- y i y i 1 – + ( ) = d dt ----- y t i ( ) y i y i 1 – – t i t i 1 – – --------------------- ¸ , ¸ _ ≈ y i 1 + y i – t i 1 + t i – --------------------- ¸ , ¸ _ 1 T --- y i y i 1 – – ( ) 1 T --- y i 1 + y i – ( ) = = = d dt ----- ¸ , ¸ _ 2 y t i ( ) 1 T --- y i 1 + y i – ( ) 1 T --- y i y i 1 – – ( ) – T ----------------------------------------------------------------- ≈ 2 – y i y i 1 – y i 1 + + + T 2 --------------------------------------------- = page 142 the values of the arguments we can change when a function turns on and off. Figure 107 Switching function examples These switching functions can be multiplied with other functions to create a com- plex function by turning parts of the function on or off. An example of a curve created with switching functions is shown in Figure 108. t u t ( ) 1 t u t – ( ) 1 t u t 1 – ( ) 1 t u t 1 + ( ) 1 t u t 1 + ( ) u t 1 – ( ) – 1 page 143 Figure 108 Switching functions to create a non-smooth function The unit step switching function is available in Mathcad and makes creation of complex functions relatively trivial. Step functions are also easy to implement when writ- ing computer programs, as shown in Figure 109. Figure 109 A subroutine implementing the example in Figure 108 t f(t) 5 0 1 3 4 seconds f t ( ) 5tu t ( ) 5 t 1 – ( )u t 1 – ( ) – 5 t 3 – ( )u t 3 – ( ) – 5 t 4 – ( )u t 4 – ( ) + = f t ( ) 5t u t ( ) t 1 – ( ) – ( ) 5 u t 1 – ( ) u t 3 – ( ) – ( ) 20 5t – ( ) u t 3 – ( ) u t 4 – ( ) – ( ) + + = or double u(double t){ if(t >= 0) return 1.0 return 0.0; } double function(double t){ double f; f = 5.0 * t * u(t) - 5.0 * (t - 1.0) * u(t - 1.0) - 5.0 * (t - 3.0) * u(t - 3.0) + 5.0 * (t - 4.0) * u(t - 4.0); return f; } f t ( ) 5tu t ( ) 5 t 1 – ( )u t 1 – ( ) – 5 t 3 – ( )u t 3 – ( ) – 5 t 4 – ( )u t 4 – ( ) + = For the function page 144 4.6.2 Interpolating Tabular Data In some cases we are given tables of numbers instead of equations for a system component. These can still be used to do numerical integration by calculating coefficient values as required, in place of an equation. Tabular data consists of separate data points as seen in Figure 110. But, we may need values between the datapoints. A simple method for finding intermediate values is to interpolate with the "lever law". (Note: it is called this because of its’ similarity to the equation for a lever.) The table in the example only gives flow rates for a valve at 10 degree intervals, but we want flow rates at 46 and 23 degrees. A simple application of the lever law gives approximate values for the flow rates. Figure 110 Using tables of values to interpolate numerical values using the lever law The subroutine in Figure 111 was written to return the numerical value for the data table in Figure 110. In the subroutine the tabular data is examined to find the interval that the flow rate value falls between. Once this is found the valve angle is calculated as the ratio between the two known values. valve angle (deg.) 0 10 20 30 40 50 60 70 80 90 flow rate (gpm) 0 0.1 0.4 1.2 2.0 2.3 2.4 2.4 2.4 2.4 Given a valve angle of 46 degrees the flow rate is, Q 2.0 2.3 2.0 – ( ) 46 40 – 50 40 – ----------------- - ¸ , ¸ _ + 2.18 = = Given a valve angle of 23 degrees the flow rate is, Q 0.4 1.2 0.4 – ( ) 23 20 – 30 20 – ----------------- - ¸ , ¸ _ + 0.64 = = page 145 Figure 111 A tabular interpolation subroutine example 4.6.3 Modeling Functions with Splines When more accuracy is required smooth curves can be fitted to interpolate points. These curves are known as splines. There are multiple methods for creating splines, but the simplest is to use a polynomial fitted to a set of points. The example in Figure 112 shows a spline curve being fitted for three data points. In this case a second order polynomial is used. The three data points are written out as equations, and then put into matrix form, using the coefficients as the unknown values. The matrix is then solved to obtain the coeficient values for the final equation. This equa- tion can then be used to build a mathematical model of the system. #define SIZE 10; double data[SIZE][2] = {{0.0, 0.0}, {10.0, 0.1}, {20.0, 0.4}, {30.0, 1.2}, {40.0, 2.0}, {50.0, 2.3}, {60.0, 2.4}, {70.0, 2.4}, {80.0, 2.4}, {90.0, 2.4}}; double angle(double rate){ for(int i = 0; i < SIZE-1; i++){ if((rate >= data[i][0]) && (rate <= data[i+1][0]){ return (data[i+1][1] - data[i][1]) * (rate - data[i][0]) / (data[i+1][0] - data[i][0]) + data[i][1]; } } printf("ERROR: rate out of range\n"); exit(1); } page 146 Figure 112 A spline fitting example S (RPM) 1000 4000 6000 P (HP) 105 205 110 The datapoints below might have been measured for the horsepower of an internal combustion engine on a dynamometer. In this case there are three datapoints, so we can fit the curve with a second (3-1) order polynomial. The major task is to calculate the coefficients so that the curve passes through all of the given points. P S ( ) AS 2 BS C + + = P 1000 ( ) A1000 2 B1000 C + + 105 = = P 4000 ( ) A4000 2 B4000 C + + 205 = = P 6000 ( ) A6000 2 B6000 C + + 110 = = Data values can be substituted into the equation, This can then be put in matrix form to find the coefficients, 1000 2 1000 1 4000 2 4000 1 6000 2 6000 1 A B C 105 205 110 = A B C 1000000 1000 1 16000000 4000 1 36000000 6000 1 1 – 105 205 110 = A B C 6.667 10 8 – × 1.667 10 7 – × – 1.000 10 7 – × 6.667 10 4 – × – 1.167 10 3 – × 5.000 10 4 – × – 1.600 1.000 – 0.400 105 205 110 = A B C 1.617 10 5 – × – 0.114 7.000 = P S ( ) 1.617 10 5 – × – ( )S 2 0.114S 7.000 + + = Note: in this example the inverse matrix is used, but other methods for solving systems of equations are equally valid. If the equa- tions were simpler, substitu- tion might have been a better approach. page 147 The order of the polynomial should match the number of points. Although, as the number of points increases, the shape of the curve will become less smooth. A common way for dealing with this problem is to fit the spline to a smaller number of points and then verify that it matches the remaining points. 4.6.4 Non-Linear Elements Despite our deepest wishes for simplicity, most systems contain non-linear compo- nents. In the last chapter we looked at dealing with non-linearities by linearizing them locally. Numerical techniques will handle non-linearities easily, but smaller time steps are required for accuracy. Consider the mass and an applied force shown in Figure 113. As the mass moves an aerodynamic resistance force is generated that is proportional to the square of the velocity. This results in a non-linear differential equation. This equation can be numeri- cally integrated using a technique such as Runge-Kutta. Note that the state equation matrix form cannot be used because it requires linear equations. Figure 113 Developing state equations for a non-linear system 4.7 CASE STUDY Consider the simplified model of a car suspension shown in Figure 114. The model distributes the vehicle weight over four tires with identical suspensions, so the mass of the vehicle is divided by four. In this model the height of the road will change and drive the tire up, or allow it to drop down. The tire acts as a stiff spring, with little deflection. The upper spring and damper are the vibration isolation units. The damper has been designed to stiffen as the damper is compressed. The given table shows how the damping coeffi- cient varies with the amount of compression. M F 20x' 2 F x ∑ F 20x' 2 – Mx'' = = x v' 20 – M ---------v 2 F M ---- - + = x' v = (1) (2) page 148 Figure 114 A model of a car suspension system For our purposes we will focus only on the translation of the tire, and ignore its rotational motion. The differential equations describing the system are developed in Fig- ure 115. K d K s1 y t y r y c M t M c L (cm) 30 0 -20 -30 Kd (Ns/m) 1000 1600 2000 2250 M c 400Kg = K s1 50000 N m ---- = M t 20Kg = K s2 K s2 200000 N m ---- = page 149 Figure 115 Differential and state equations for the car suspension system The damping force must be converted from a tabular form to equation form. This is done in Figure 116. y c M t M c K s2 y r y t – ( ) K d y t ' y c ' – ( ) K s1 y t y c – ( ) F ∑ K s1 y t y c – ( ) K d y t ' y c ' – ( ) M c g – + M c y c '' = = F ∑ K s2 y r y t – ( ) K s1 y t y c – ( ) – K d y t ' y c ' – ( ) – M t g – M t y t '' = = K d y t ' y c ' – ( ) K s1 y t y c – ( ) M c y c '' K s1 ( )y t K – s1 ( )y c K d ( )y t ' K – d ( )y c ' M c g – + + + = M t y t '' K s2 ( )y r K – s2 K s1 – ( )y t K s1 ( )y c K – d ( )y t ' K d ( )y c ' M t g – + + + + = v c ' K s1 M c -------- ¸ , ¸ _ y t K – s1 M c ----------- ¸ , ¸ _ y c K d M c ------- ¸ , ¸ _ v t K – d M c --------- ¸ , ¸ _ v c g – ( ) + + + + = d dt -----y c v c = d dt ----- y t v t = (1) (2) (3) v t ' K s2 M t -------- ¸ , ¸ _ y r K – s2 K s1 – M t -------------------------- ¸ , ¸ _ y t K s1 M t -------- ¸ , ¸ _ y c K – d M t --------- ¸ , ¸ _ v t K d M t ------ ¸ , ¸ _ v c g – ( ) + + + + + = (4) page 150 Figure 116 Fitting a spline to the damping values The system is to be tested for overall deflection when exposed to obstacles on the road. For the initial conditions we need to find the resting heights for the tire and car body. This can be done by setting the accelerations and velocities to zero, and finding the result- ing heights. L (cm) 30 0 -20 -30 Kd (Ns/m) 1000 1600 2000 2250 There are four data points, so a third order polynomial is required. K d L ( ) AL 3 BL 2 CL D + + + = The four data points can now be written in equation form, and then put into matrix form. 1000 A 0.3 ( ) 3 B 0.3 ( ) 2 C 0.3 ( ) D + + + = 1600 A 0 ( ) 3 B 0 ( ) 2 C 0 ( ) D + + + = 2000 A 0.2 – ( ) 3 B 0.2 – ( ) 2 C 0.2 – ( ) D + + + = 2250 A 0.3 – ( ) 3 B 0.3 – ( ) 2 C 0.3 – ( ) D + + + = 0.027 0.09 0.3 1 0 0 0 1 0.008 – 0.04 0.2 – 1 0.027 – 0.09 0.3 – 1 A B C D 1000 1600 2000 2250 = The matrix can be solved to find the coefficents, and the final equation written. A B C D 2778 – 277.8 1833 – 1600 = K d L ( ) 2778 – ( )L 3 277.8 ( )L 2 1833 – ( )L 1600 + + + = page 151 Figure 117 Calculation of initial deflections The resulting calculations can then be written in a computer program for analysis, as shown in Figure 118. The initial accelerations and velocities are set to zero, assuming the car has settled to a steady state height. This then yields equations that can be used to calculate the ini- tial deflections. Assume the road height is also zero to begin with. 0 K s1 M c -------- ¸ , ¸ _ y t K – s1 M c ----------- ¸ , ¸ _ y c K d M c ------- ¸ , ¸ _ 0 K – d M c --------- ¸ , ¸ _ 0 g – ( ) + + + + = y c y t g M c K s1 -------- – = 0 K s2 M t -------- ¸ , ¸ _ 0 K – s2 K s1 – M t -------------------------- ¸ , ¸ _ y t K s1 M t -------- ¸ , ¸ _ y c K – d M t --------- ¸ , ¸ _ 0 K d M t ------ ¸ , ¸ _ 0 g – ( ) + + + + + = gM t K – s2 K s1 – ( )y t K s1 ( )y c + = gM t K – s2 K s1 – ( )y t K s1 ( ) y t g M c K s1 -------- – ¸ , ¸ _ + = y c g M c M t + K s2 -------------------- – g M c K s1 -------- – = y t g M c M t + K s2 -------------------- – = y c g M c M t + K s2 -------------------- M c K s1 -------- + ¸ , ¸ _ – = page 152 Figure 118 Program for numerical analysis of suspension system #include <stdio.h> #include <math.h> #defineSIZE4 // define state variables #definey_c 0 #definey_t 1 #definev_c 2 #definev_t 3 #defineN_step10000// number of steps #defineh_step0.001// define step size #defineKs1 50000.0 // define component values #defineKs2 200000.0 #defineMc 400.0 #defineMt 20.0 #definegrav9.81 void integration_step(double h, double state[], double derivative[]){ for(int i = 0; i < SIZE; i++) state[i] += h * derivative[i]; } double damper(double L){ return (-2778*L*L*L + 277.8*L*L - 1833*L + 1600); } double y_r(double t){ // return 0.0; // a zero input to test the initial conditions // return 0.2 * sin(t);// a sinusoidal oscillation return 0.2;// a step function // return 0.2 * t;// a ramp function } page 153 Figure 119 Program for numerical analysis of suspension system (continued) This program was then used to test various design cases by selecting input types void d_dt(double t, double state[], double derivative[]){ double Kd; Kd = damper(state[y_c] - state[y_t]); derivative[y_c] = state[v_c]; derivative[y_t] = state[v_t]; derivative[v_c] = (Ks1/Mc)*state[y_t] - (Ks1/Mc)*state[y_c] + (Kd/Mc)*state[v_t] - (Kd/Mc)*state[v_c] - grav; derivative[v_t] = (Ks2/Mt)*y_r(t) - ((Ks2+Ks1)/Mt)*state[y_t] + (Ks1/Mt)*state[y_c] - (Kd/Mt)*state[v_t] + (Kd/Mt)*state[v_c] - grav; } main(){ double state[SIZE]; double derivative[SIZE]; FILE *fp_out; double t; int i; state[y_c] = - grav * ( (Mc/Ks1) + (Mt + Mc)/Ks2 ); // initial values state[y_t] = - grav * (Mt + Mc) / Ks2; state[v_c] = 0.0; state[v_t] = 0.0; if((fp_out = fopen("out.txt", "w")) != NULL){ // open the file fprintf(fp_out, " t Yc Yt Vc Vt \n"); for(t = 0.0, i = 0; i < N_step; i++, t += h_step){ if((i % 100) == 0) fprintf(fp_out, "%f %f %f %f %f \n", t, state[y_c], state[y_t], state[v_c], state[v_t]); d_dt(t, state, derivative); integration_step(h_step, state, derivative); } } else { printf("ERROR: Could not open file \n"); } fclose(fp_out); } page 154 for changes in the road height, and then calculating how the tire and vehicle heights would change as a result. Some of these results are seen in Figure 120. These results were obtained by running the program, and then graphing the results in a spreadsheet program. The input of zero for the road height was used to test the program. As shown the height of the vehicle changes, indicating that the initial height calculations are correct, and the model is stable. The step function shows some oscillations that settle out to a stable final value. The oscillation is relatively slow, and is fully transmitted to the automobile. The ramp function shows that the car follows the rise of the slope with small transient effects at the start. Figure 120 Graphs of simulation results y r t ( ) 0.0 = y r t ( ) 0.2m = y r t ( ) 0.2m t ( ) sin = y r t ( ) 0.2m ( )t = -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series1 Series2 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series1 Series2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series Series -0.5 0 0.5 1 1.5 2 2.5 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series Series page 155 4.8 SUMMARY • State variable equations are used to reduced to first order differential equations. • First order equations can be integrated numerically. • Higher order integration, such as Runge-Kutta increase the accuracy. • Switching functions allow functions terms to be turned on and off to provide more complex function. 4.9 PRACTICE PROBLEMS 1. a) Put the differential equations given below in state variable form. b) Put the state equations in matrix form 2. Develop state equations for the mass-spring-damper system below. 3. The system below is comprised of two masses. There is viscous damping between the masses and between the bottom mass and the floor. The masses are also connected with a cable that is run over a massless and frictionless pulley. Write the differential equations for the system, and y 1 ' 7y 1 8y 2 ' 9y 2 10y 3 '' 11y 3 5 5t ( ) cos + + + + + + 0 = y 1 '' 2y 1 ' 3y 1 4y 2 ' 5y 2 6y 3 ' t F + + + + + + + 0 = F input = y 1 y 2 y 3 , , outputs = y 1 ' 12y 2 '' 13y 3 ' + + 0 = M F K s K d x page 156 put them in state variable form. 4. Given the differential equation below integrate the values numerically (show all work) for the first ten seconds in 1 second intervals. Assume the initial value of x is 1. You may use first order or Runge Kutta integration. M 2 M 1 x 2 F K s x 1 B 2 B 1 (ans. M 2 M 1 T F K s x 1 T B 2 x 2 ' B 1 x 1 ' x 2 ' – ( ) B 1 x 1 ' x 2 ' – ( ) +x +y F ∑ T – K s x 1 – B 1 x 1 ' x 2 ' – ( ) – M 1 x 1 '' = = v 1 x 1 ' = v 2 x 2 ' = v 1 ' x 1 K – s M 1 --------- ¸ , ¸ _ v 1 B 1 – M 1 --------- ¸ , ¸ _ v 2 B 1 M 1 ------- ¸ , ¸ _ T – M 1 ------- ¸ , ¸ _ + + + = F ∑ T – B 1 x 1 ' x 2 ' – ( ) F B 2 x 2 ' – + + M 2 x 2 '' = = v 2 ' v 1 B 1 M 2 ------- ¸ , ¸ _ v 2 B – 1 B 2 – M 2 --------------------- ¸ , ¸ _ T – F + M 2 ----------------- ¸ , ¸ _ + + = x' 0.25x + 3 = page 157 5. Do a first order numerical integration of the derivative below from 0 to 10 seconds in one sec- ond step. Assume the system starts at rest. 6. Given the following differential equation and initial conditions, draw a sketch of the first 5 sec- onds of the output response. The input is a step function that turns on at t=0. Use at least two different methods, and compare the results. 7. a) For the mass-spring-damper system below solve the differential equation as a function of time. Assume the system starts at rest and undeflected. b) Also solve the problem using your calculator (and state equations) to verify your solution. Sketch the results. x' 3 0.25x – = (ans. t 0 1 2 3 4 5 6 7 8 9 10 x 1 3.75 5.81 7.36 8.52 9.39 10.0 10.5 10.9 11.2 11.4 x’ 2.75 2.06 1.55 1.16 0.870 0.652 0.489 0.367 0.275 0.206 x t h + ( ) x t ( ) h d dt -----x t ( ) ¸ , ¸ _ + = x t h + ( ) x t ( ) 1 3 0.25x t ( ) – ( ) + = x t h + ( ) 0.75x t ( ) 3 + = d dt ----- x t ( ) 5 t 4 – ( ) 2 = 0.5V o '' 0.6V o ' 2.1V o + + 3V i 2 + = V i 5V = V o 0 = V o ' 1 = initial conditions M F K s K d x K s 10 = K d 10 = M 10 = F 10 = page 158 8. The mechanical system below is a mass-spring-damper system. A force ’F’ of 100N is applied to the 10Kg cart at time t=0s. The motion is resisted by the spring and damper. The spring coefficient is 1000N/m, and the damping coefficient is to be determined. Follow the steps below to develop a solution to the problem. Assume the system always starts undeflected and M F K s x K d x' F ∑ F K d x' – K s x – Mx'' = = Mx'' K d x' K s x + + F = 10x'' 10x' 10x + + 10 = x'' x' x + + 1 = (ans. homogeneous: x'' x' x + + 0 = A 2 A 1 + + 0 = A 1 – 1 4 1 ( ) 1 ( ) – t 2 1 ( ) ---------------------------------------------- 0.5 – j 3 2 ------- t = = x h C 1 e 0.5t – 3 2 -------t C 2 + ¸ , ¸ _ cos = particular: 0 0 B + + 1 = x p B = x p 1 = initial conditions: x x h x p + C 1 e 0.5t – 3 2 -------t C 2 + ¸ , ¸ _ cos 1 + = = x' 3 2 -------C – 1 e 0.5t – 3 2 -------t C 2 + ¸ , ¸ _ sin 0.5C 1 e 0.5t – 3 2 -------t C 2 + ¸ , ¸ _ cos – = x' 0 ( ) 3 2 -------C – 1 C 2 ( ) sin 0.5C 1 C 2 ( ) cos – 0 = = 3 2 ------- – C 2 ( ) sin 0.5 C 2 ( ) cos = C 2 ( ) tan 1 – 3 ------- = C 2 1 – 3 ------- ¸ , ¸ _ atan 0.5236 – = = x 0 ( ) C 1 0.5236 – ( ) cos 1 + 0 = = C 1 1 – 0.5236 – ( ) cos --------------------------------- 1.155 – = = x 1.155 – e 0.5t – 3 2 ------- t 0.5236 – ¸ , ¸ _ cos 1 + = page 159 at rest. a) Develop the differential equation for the system. b) Solve the differential equation using damping coefficients of 100Ns/m and 10000Ns/m. Draw a graph of the results. c) Develop the state equations for the system. d) Solve the system with a first order numerical analysis using Mathcad for damp- ing coefficients of 100Ns/m and 10000Ns/m. Draw a graph of the results. e) Solve the system with a Runge Kutta numerical analysis using Mathcad for damping coefficients of 100Ns/m and 10000Ns/m. Draw a graph of the results. f) Write a computer program (in C, Java or Fortran) to do the Runge Kutta numer- ical integration in step e). Draw a graph of the results. g) Compare all of the solutions found in the previous steps. h) Select a damper value to give an overall system damping coefficient of 1. Verify the results by numerically integrating. 9. For the mechanism illustrated in the figure below: a. Find the differential equations for the system. Consider the effects of gravity. b. Put the equations in state variable form. c. Put the equations in state variable matrices. d. Use your calculator to find values for x 1 and x 2 over the first 10 seconds using 1/ 2 second intervals. Use the values, K 1 =K 2 =100N/m, B=10Nm/s, M 1 =M 2 =1kg. Assume that the system starts at rest, and the springs are undeformed initially. e. Use Mathcad to plot the values for the first 10 seconds. f. Use working model to find the values for the first 10 seconds. g. Use Mathcad and the Runge-Kutta method to find the first 10 seconds using half second intervals. M F K s K d x M 2 K s2 x 2 M 1 F K s1 x 1 page 160 h. Repeat step g. using the first-order approximation method. 10. For the mechanism shown in the figure below: a. Find the differential equations for the system. b. Put the equations in state variable form. c. Put the equations in state variable matrices. d. Use your calculator to find values for x 1 and x 2 over the first 10 seconds using 1/ 2 second intervals. Use the values, K s1 =K s2 =100N/m, K d1 =10Nm/s, M 1 =M 2 =1kg. Assume that the system starts at rest, and the springs are unde- formed initially. e. Use Mathcad to plot the values for the first 10 seconds. f. Use working model to find the values for the first 10 seconds. g. Use Mathcad and the Runge-Kutta calculations in the notes to find the first 10 seconds using half second intervals. h. Repeat step g. using the first-order approximation method. M 2 K s2 x 2 M 1 F K s1 x 1 K d1 page 161 5. ROTATION 5.1 INTRODUCTION The equations of motion for a rotating mass are shown in Figure 121. Given the angular position, the angular velocity can be found by differentiating once, the angular acceleration can be found by differentiating again. The angular acceleration can be inte- grated to find the angular velocity, the angular velocity can be integrated to find the angu- lar position. The angular acceleration is proportional to an applied torque, but inversely proportional to the mass moment of inertia. Figure 121 Basic properties of rotation Topics: Objectives: • To be able to develop and analyze differential equations for rotational systems. • Basic laws of motion • Inertia, springs, dampers, levers, gears and belts • Design cases θ ω d dt ----- ¸ , ¸ _ θ = α d dt ---- - ¸ , ¸ _ ω d dt ---- - ¸ , ¸ _ 2 θ = = T θ t ( ) ω t ( ) t d ∫ α t ( ) t d t d ∫ ∫ = = ω t ( ) α t ( ) t d ∫ = OR (1) (2) (3) (4) equations of motion α t ( ) T t ( ) J M ---------- = (5) where, θ ω α , , position, velocity and acceleration = J M second mass moment of i ner t i a of t he body = T torque applied to body = page 162 Figure 122 Drill problem: Find the position with the given conditions 5.2 MODELING Free Body Diagrams (FBDs) are required when analyzing rotational systems, as they were for translating systems. The force components normally considered in a rota- tional system include, • inertia - opposes acceleration and deceleration • springs - resist deflection • dampers - oppose velocity • levers - rotate small angles • gears and belts - change rotational speeds and torques Note: A ’torque’ and ’moment’ are equivalent in terms of calculations. The main differ- ence is that ’torque’ normally refers to a rotating moment. Given the initial state of a rotating mass, find the state 5 seconds later. θ 1rad = ω 2 rad s -------- - = α 3 rad s 2 --------- = page 163 5.2.1 Inertia When unbalanced torques are applied to a mass it will begin to accelerate, in rota- tion. The sum of applied torques is equal to the inertia forces shown in Figure 123. Figure 123 Summing moments and angular inertia The mass moment of inertia determines the resistance to acceleration. This can be calculated using integration, or found in tables. When dealing with rotational acceleration it is important to use the mass moment of inertia, not the area moment of inertia. The center of rotation for free body rotation will be the centroid. Moment of inertia values are typically calculated about the centroid. If the object is constrained to rotate about some point, other than the centroid, the moment of inertia value must be recalcu- lated. The parallel axis theorem provides the method to shift a moment of inertia from a centroid to an arbitrary center of rotation, as shown in Figure 124. θ ω α , , T ∑ J M α = J M I xx I yy + = J T I xx y 2 M d ∫ = I yy x 2 M d ∫ = (6) (7) (8) (9) Note: The ’mass’ moment of inertia will be used when dealing with acceleration of a mass. Later we will use the ’area’ moment of inertia for torsional springs. page 164 Figure 124 Parallel axis theorem for shifting a mass moment of inertia Figure 125 Parallel axis theorem for shifting a area moment of inertia An example of calculating a mass moment of inertia is shown in Figure 126. In this problem the density of the material is calculated for use in the integrals. The integrals are then developed using slices for the integration element dM. The integrals for the moments about the x and y axes, and then added to give the polar moment of inertia. This is then shifted from the centroid to the new axis using the parallel axis theorem. J M J M ˜ Mr 2 + = where, J M mass moment about the new point = J M ˜ mass moment about the centroi d = M mass of the object = r distance from the centroid to the new point = J A J A ˜ Ar 2 + = where, J A area moment about the new point = J A ˜ area moment about the centroi d = A mass of the object = r distance from the centroid to the new point = Aside: If forces do not pass through the center of an object, it will rotate. If the object is made of a homogeneous material, the area and volume centroids can be used as the center. If the object is made of different materials then the center of mass should be used for the center. If the gravity varies over the length of the (very long) object then the center of gravity should be used. page 165 Figure 126 Mass moment of inertia example I xx y 2 M d 4 – 4 ∫ y 2 ρ2 5m ( ) y d 4 – 4 ∫ 1.25Kgm 1 – y 3 3 ----- 4 – 4 = = = The rectangular shape to the right is constrained to rotate about point A. The total mass of the object is 10kg. The given dimensions are in meters. Find the mass moment of inertia. First find the density and calculate the moments of inertia about the centroid. 4 5 -5 -4 -2.5 -1 ρ 10Kg 2 5m ( )2 4m ( ) -------------------------------- 0.125Kgm 2 – = = ∴ 1.25Kgm 1 – 4m ( ) 3 3 --------------- 4m – ( ) 3 3 ------------------ – ¸ , ¸ _ 53.33Kgm 2 = = I yy x 2 M d 5 – 5 ∫ x 2 ρ2 4m ( ) x d 5 – 5 ∫ 1Kgm 1 – x 3 3 ----- 5 – 5 = = = ∴ 1Kgm 1 – 5m ( ) 3 3 --------------- 5m – ( ) 3 3 ------------------ – ¸ , ¸ _ 83.33Kgm 2 = = J M I xx I yy + 53.33Kgm 2 83.33Kgm 2 + 136.67Kgm 2 = = = The centroid can now be shifted to the center of rotation using the parallel axis theorem. J M J M ˜ Mr 2 + 136.67Kgm 2 10Kg ( ) 2.5m – ( ) 2 1m – ( ) 2 + ( ) + 136.67Kgm 2 = = = page 166 Figure 127 Drill problem: Mass moment of inertia calculation The rectangular shape to the right is constrained to rotate about point A. The total mass of the object is 10kg. The given dimensions are in meters. Find the mass moment of inertia WITHOUT using the parallel axis theorem. 4 5 -5 -4 -2.5 -1 page 167 Figure 128 Drill problem: Find the velocity of the rotating shaft 5.2.2 Springs Twisting a rotational spring will produce an opposing torque. This torque increases as the deformation increases. A simple example of a solid rod torsional spring is shown in Figure 129. The angle of rotation is determined by the applied torque, T, the shear modu- lus, G, the area moment of inertia, JA, and the length, L, of the rod. The constant parame- ters can be lumped into a single spring coefficient similar to that used for translational springs. The 20cm diameter 10 kg cylinder to the left is sit- ting in a depression that is effectively friction- less. If a torque of 10 Nm is applied for 5 seconds, what will the angular velocity be? page 168 Figure 129 A solid torsional spring The spring constant for a torsional spring will be relatively constant, unless the material is deformed outside the linear elastic range, or the geometry of the spring changes significantly. When dealing with strength of material properties the area moment of inertia is required. The calculation for the area moment of inertia is similar to that for the mass moment of inertia. An example of calculating the area moment of inertia is shown in Fig- ure 130, and based on the previous example in Figure 126. The calculations are similar to those for the mass moments of inertia, except for the formulation of the integration ele- ments. Note the difference between the mass moment of inertia and area moment of inertia for the part. The area moment of inertia can be converted to a mass moment of inertia sim- ply by multiplying by the density. Also note the units. T J A G L ---------- ¸ , ¸ _ θ = L T θ T K S – ∆θ ( ) = (8) (9) Note: Remember to use radians for these calculations. In fact you are advised to use radians for all calculations. Don’t forget to set your calculator to radians also. Note: This calculation uses the area moment of inertia. page 169 Figure 130 Area moment of inertia J A I xx I yy + = I xx y 2 A d ∫ = I yy x 2 A d ∫ = (10) (8) (9) 4 5 -5 -4 -2.5 -1 First, the area moment of inertia is calculated about the cen- troid by integration. All dimensions are in m. Note: The basic definitions for the area moment of inertia are shown to the right. J A ˜ I xx I yy + 426.7 666.7 + ( )m 4 1093.4m 4 = = = I xx y 2 A d 4m – 4m ∫ y 2 2 5m ( ) y d 4m – 4m ∫ 10m y 3 3 ----- 4m – 4m 10m 4m ( ) 3 3 -------------- - 4m – ( ) 3 3 ------------------ – ¸ , ¸ _ 426.7m 4 = = = = = ∴ 1093.4m 4 4m 4m – ( ) – ( ) 5m 5m – ( ) – ( ) ( ) 1m – ( ) 2 2.5m – ( ) 2 + ( ) + = I yy x 2 A d 5m – 5m ∫ x 2 2 4m ( ) x d 5m – 5m ∫ 8m x 3 3 ----- 5m – 5m 8m 5m ( ) 3 3 -------------- - 5m – ( ) 3 3 ------------------ – ¸ , ¸ _ 666.7m 4 = = = = = Next, shift the area moment of inertia from the centroid to the other point of rotation. J A J A ˜ Ar 2 + = (11) J A J A ˜ Ar 2 + = ∴ 1673m 4 = Note: You may notice that when the area moment of inertia is multiplied by the den- sity of the material, the mass moment of inertia is the result. Therefore if you have a table of area moments of inertia, multiplying by density will yield the mass moment of inertia. Keep track of units when doing this. page 170 Figure 131 Drill problem: Find the torsional spring coefficient An example problem with torsional springs is shown in Figure 132. There are three torsional springs between two rotating masses. The right hand spring is anchored solidly in a wall, and will not move. A torque is applied to the left hand spring. Because the tor- sional spring is considered massless the tow will be the same at the other end of the spring, at mass J1. FBDs are drawn for both of the masses, and forces are summed. (Note: the similarity in the methods used for torsional, and for translational springs.) These equations are then rearranged into state variable equations, and finally put in matrix form. For a 1/2" 1020 steel rod that is 1 yard long, find the torsional spring coefficient. page 171 Figure 132 A rotational spring example Model the system above assuming that the center shaft is a torsional spring, and that a torque is applied to the leftmost disk. Leave the results in state variable form. τ J M 1 J M 2 K s1 K s2 K s3 J M 1 τ θ 1 K s2 θ 1 θ 2 – ( ) M ∑ τ K s2 θ 1 θ 2 – ( ) – J M 1 θ 1 '' = = + J M 2 K s3 θ 2 θ 2 K s2 θ 2 θ 1 – ( ) M ∑ K s2 θ 2 θ 1 – ( ) – K s3 θ 2 – J M 2 θ 2 '' = = + J M 1 θ 1 '' K s2 θ 1 – K s2 θ 2 τ + + = θ 1 ' ω 1 = ω 1 ' K – s2 J M 1 ----------- ¸ , ¸ _ θ 1 K s2 J M 1 -------- ¸ , ¸ _ θ 2 τ + + = (1) (2) θ 2 '' K s3 – K s2 – J M 2 --------------------------- ¸ , ¸ _ θ 2 K s2 J M 2 -------- ¸ , ¸ _ θ 1 + = θ 2 ' ω 2 = ω 2 ' K s3 – K s2 – J M 2 --------------------------- ¸ , ¸ _ θ 2 K s2 J M 2 -------- ¸ , ¸ _ θ 1 + = (3) (4) d dt ---- - θ 1 ω 1 θ 2 ω 2 0 1 0 0 K – s2 J M 1 ----------- 0 K s2 J M 1 -------- 0 0 0 0 1 K s2 J M 2 -------- 0 K s3 – K s2 – J M 2 --------------------------- 0 θ 1 ω 1 θ 2 ω 2 0 τ 0 0 + = page 172 5.2.3 Damping Rotational damping is normally caused by viscous fluids, such as oils, used for lubrication. It opposes angular velocity with the relationships shown in Figure 133. The first equation is used for a system with one rotating and one stationary part. The second equation is used for damping between two rotating parts. Figure 133 The rotational damping equation Figure 134 Drill problem: Find the deceleration The example in Figure 132 is extended to include damping in Figure 135. The pri- mary addition from the previous example is the addition of the damping forces to the FBDs. In this case the damping coefficients are indicated with ’B’, but ’Kd’ could have also been used. The state equations were developed in matrix form. Visual comparison of the final matrices in this and the previous example reveal that the damping terms are the T K – d ω = T K d ω 1 ω 2 – ( ) = If a wheel (JM=5kg m**2) is turning at 150 rpm and the damping coefficient is 1Nms/ rad, what is the deceleration? page 173 only addition. Figure 135 A System Example Model the system above assuming that the center shaft is a torsional spring, and that a torque is applied to the leftmost disk. Leave the results in state variable form. τ B 1 B 2 J M 1 J M 2 K s1 K s2 K s3 J M 1 τ θ 1 B 1 θ 1 ' K s2 θ 1 θ 2 – ( ) M ∑ τ K s2 θ 1 θ 2 – ( ) – B 1 θ 1 ' – J M 1 θ 1 '' = = + J M 2 K s3 θ 2 θ 2 B 2 θ 2 ' K s2 θ 2 θ 1 – ( ) M ∑ K s2 θ 2 θ 1 – ( ) – B 2 θ 2 ' – K s3 θ 2 – J M 2 θ 2 '' = = + J M 1 θ 1 '' B 1 θ 1 ' – K s2 θ 1 – K s2 θ 2 τ + + = θ 1 ' ω 1 = ω 1 ' B – 1 J M 1 --------- ¸ , ¸ _ ω 1 K – s2 J M 1 ----------- ¸ , ¸ _ θ 1 K s2 J M 1 -------- ¸ , ¸ _ θ 2 τ + + + = (1) (2) θ 2 '' B – 2 J M 2 --------- ¸ , ¸ _ θ 2 ' K s3 – K s2 – J M 2 --------------------------- ¸ , ¸ _ θ 2 K s2 J M 2 -------- ¸ , ¸ _ θ 1 + + = θ 2 ' ω 2 = ω 2 ' B – 2 J M 2 --------- ¸ , ¸ _ ω 2 K s3 – K s2 – J M 2 --------------------------- ¸ , ¸ _ θ 2 K s2 J M 2 -------- ¸ , ¸ _ θ 1 + + = (3) (4) d dt ---- - θ 1 ω 1 θ 2 ω 2 0 1 0 0 K – s2 J M 1 ----------- B – 1 J M 1 --------- K s2 J M 1 -------- 0 0 0 0 1 K s2 J M 2 -------- 0 K s3 – K s2 – J M 2 --------------------------- B – 2 J M 2 --------- θ 1 ω 1 θ 2 ω 2 0 τ 0 0 + = page 174 5.2.4 Levers The lever shown in Figure 136 can be used to amplify forces or motion. Although theoretically a lever arm could rotate fully, it typically has a limited range of motion. The amplification is determined by the ratio of arm lengths to the left and right of the center. • A lever is a simple device used to balance moments in a system. Figure 136 Force transmission with a level Figure 137 Drill problem: Find the required force δ 2 δ 1 F 1 F 2 d 1 d 2 d 1 d 2 ----- F 2 F 1 ------ δ 1 δ 2 ----- = = Note: As the lever rotates the length ratio will be maintained because of similar triangles. This allows the lever to work over a range of angles. The lever above would become ineffective if it was vertical. Given a lever set to lift a 1000 kg rock - if the lever is 2m long and the distance from the fulcrum to the rock is 10cm, how much force is required to lift it? page 175 5.2.5 Gears and Belts While levers amplify forces and motions over limited ranges of motion, gears can rotate indefinitely. Some of the basic gear forms are listed below. Spur - Round gears with teeth parallel to the rotational axis Rack - A straight gear (used with a small round gear called a pinion Helical - The teeth follow a helix around the rotational axis. Bevel - The gear has a conical shape, allowing forces to be transmitted at angles. Gear teeth are carefully designed so that they will ’mesh’ smoothly as the gears rotate. The forces on gears acts at a tangential distance from the center of rotation called the ’pitch diameter’. The ratio of motions and forces through a pair of gears is propor- tional to their radii, as shown in Figure 138. The number of teeth on a gear is proportional to the diameter. The gear ratio is used to measure the relative rotations of the shafts. For example a gear ratio of 20:1 would mean the input shaft of the gear box would have to rotate 20 times for the output shaft to rotate once. Figure 138 Basic Gear Relationships For lower gear rations a simple gear box with two gears can be constructed. For higher gear ratios more gears can be added. To do this compound gear sets are required. In a compound gear set two or more gears are connected on a single shaft, as shown in Figure 139. In this example the gear ratio on the left is 4:1, and the ratio for the set on the right is 4:1. Together they give a gear ratio of 16:1. T 1 F c r 1 = T 2 F – c r 2 = T – 1 T 2 --------- r 1 r 2 ---- n 1 n 2 ----- = = n 1 r 1 ----- n 2 r 2 ----- = V c ω 1 r 1 ω – 2 r 2 = = r 2 r 1 ---- ω – 1 ω 2 --------- α – 1 α 2 --------- ∆ – θ 1 ∆θ 2 ------------ n 2 n 1 ----- = = = = where, n = number of teeth on respective gears r = radii of respective gears Fc = force of contact between gear teeth Vc = tangential velocity of gear teeth T = torques on gears page 176 Figure 139 A compound gear set A manual transmission is shown in Figure 140. In the transmission the gear ratio is changed by sliding some of the gears to change the sequence of gears transmitting the force. Notice that when in reverse an additional compound gear set is added to reverse the direction of rotation. N 2 60 = N 3 15 = N 4 60 = N 5 15 = e N 2 N 4 N 3 N 5 ------------- 16 = = Input shaft Output shaft In this case the output shaft turns 16 times faster than the input shaft. If we reversed directions the output (former input) would now turn 1/16 of the input (former out- put) shaft speed. page 177 Figure 140 A manual transmission Rack and pinion gear sets are used for converting rotational to translation. A rack is a long straight gear that is driven by a small mating gear called a pinion. The basic rela- tionships are shown in Figure 141. Motor shaft clutch reverse idler 2 3 4 5 6 7 8 9 10 11 stem gear Speed (gear) 1 2 3 4 reverse Gear Train 2-3-6-9 2-3-5-8 2-3-4-7 bypass gear train 2-3-6-10-11-9 In this manual transmission the gear shifter will move the gears in and out of con- tact. At this point all of the needed gears will be meshed and turning. The final step is to engage the last gear in the gear train with the clutch (plate) and this couples the gears to the wheels. page 178 Figure 141 Relationships for a rack and pinion gear set Belt based systems can be analyzed with methods similar to gears (with the excep- tion of teeth). • A belt wound around a drum will act like a rack and pinion gear pair. • A belt around two or more pulleys will act like gears. T Fr = V c ωr = ∆l r∆θ = where, r = radius of pinion F = force of contact between gear teeth Vc = tangential velocity of gear teeth and velocity of rack T = torque on pinion A gear train has an input gear with 20 teeth, a center gear that has 100 teeth, and an output gear that has 40 teeth. If the input shaft is rotating at 5 rad/sec what is the rotation speed of the output shaft? What if the center gear is removed? page 179 Figure 142 Drill problem: Find the gear speed 5.2.6 Friction Friction between rotating components is a major source of inefficiency in machines. It is the result of contact surface materials and geometries. Calculating friction values in rotating systems is more difficult than translating systems. Normally rotational friction will be given as a static and kinetic friction torques. An example problem with rotational friction is shown in Figure 143. Basically these problems require that the problem be solved as if the friction sur- face is fixed. If the friction force exceeds the maximum static friction the mechanism is then solved using the dynamic friction torque. There is friction between the shaft and the hole in the wall. The friction force is left as a variable for the derivation of the state equa- tions. The friction value must be calculated using the appropriate state equation. The result of this calculation and the previous static or dynamic condition is then used to determine the new friction value. page 180 Figure 143 A friction system example The friction example in Figure 143 can be solved using the C program in Figure 144. For the purposes of the example some component values are selected and the system is assumed to be at rest initially. The program loops to integrate the state equations. Each loop the friction conditions are checked and then used for a first-order solution to the state equations. Model the system and consider the static and kinetic friction forces on the shaft on the right hand side. τ J M T s 10Nm ≤ K s T k 6Nm = J M τ θ F F K s θ M ∑ τ K s θ – T F – J M θ'' = = + J M θ'' τ K s θ – T F – = θ' ω = (2) (3) ω' τ T F – J M -------------- ¸ , ¸ _ K s J M ------ ¸ , ¸ _ θ + = J M ω' τ K s θ – T test – = (1) Next, the torque force must be calculated, and then used to determine the new torque force. T test τ K s θ – J M ω' – = T test 10Nm ≤ cases: T F T test = T test 10Nm > T F 6Nm = Not slipping previously Slipping previously T test 6Nm < T F T test = T test 6Nm ≥ T F 6Nm = (4) page 181 Figure 144 A C program for the friction example in Figure 143 5.2.7 Permanent Magnet Electric Motors DC motors create a torque between the rotor (inside) and stator (outside) that is related to the applied voltage or current. In a permanent magnet motor there are magnets int main(){ double h = 0.1, // time step theta, w, // the state variables acceleration, // the acceleration TF, // friction force Ttest, // the friction test force J = 10, // the moment of inertia (I picked the value) tau = 5, // the applied torque (I picked the value) Ks = 10; // the spring constant (I picked the value) int slip = 0; // the system starts with no slip FILE *fp; theta = 0; w = 0; // the initial conditions - starting at rest here TF = 0.0; // set the initial friction to 0.0; acceleration = 0.0; // set the initial acceleration to zero also if( ( fp = fopen("out.txt", "w")) != NULL){ // open a file to write the results to for( t = 0.0; t < 10.0; t += h ){ // loop Ttest = tau - Ks*theta - J*acceleration; if(slip == 0){ // not slipping if(Ttest >= 10){ TF = 6; slip = 1; } else { TF = Ttest;} } else { // slipping if(Ttest < 6){ TF = Ttest; slip = 0; } else { TF = 6;} } acceleration = (tau - TF + Ks*theta) / J; w = w + h * acceleration; theta = theta + h * w; fprintf(fp, "%f, %f, %f\n", t, theta, w); } } fclose(fp); } page 182 mounted on the stator, while the rotor consists of wound coils. When a voltage is applied to the coils the motor will accelerate. The differential equation for a motor is shown in Figure 145, and will be derived in a later chapter. The value of the constant ’K’ is a func- tion of the motor design and will remain fixed. The value of the coil resistance ’R’ can be directly measured from the motor. The moment of inertia ’J’ should include the motor shaft, but when a load is added this should be added to the value of ’J’. Figure 145 Model of a permanent magnet DC motor The speed response of a permanent magnet DC motor is first-order. The steady- state velocity will be a straight line function of the torque applied to the motor, as shown in Figure 146. In addition the line shifts outwards as the voltage applied to the motor increases. Figure 146 Torque speed curve for a permanent magnet DC motor 5.3 OTHER TOPICS The energy and power relationships for rotational components are given in Figure d dt ----- ¸ , ¸ _ ω ω K 2 JR ------ ¸ , ¸ _ + ∴ V s K JR ------ ¸ , ¸ _ T load J M ------------ – = where, ω the angular velocity of the motor = K the motor speed constant = J M the moment of inertia of the motor and attached loads = R the resistance of the motor coils = T load a torque applied to a motor shaft = ω ss T voltage/current increases page 183 147. These can be useful when designing a system that will store and release energy. Figure 147 Energy and power relations for rotation 5.4 DESIGN CASE A large machine is to be driven by a permanent magnet electric motor. A 20:1 gear box is used to reduce the speed and increase the torque of the motor. The motor drives a 10000kg mass in translation through a rack and pinion gear set. The pinion has a pitch diameter of 6 inches. A 10 foot long shaft is required between the gear box and the rack and pinion set. The mass moves on rails with static and dynamic coefficients of friction of .2 and .1 respectively. We want to select a shaft diameter that will keep the system criti- cally damped when a voltage step input of 20V is applied to the motor. To begin the analysis the velocity curve in Figure 148 was obtained experimentally by applying a voltage of 15V to the motor with no load attached. In addition the resistance of the motor coils was measured and found to be 40 ohms. The steady-state speed and time constant are used to determine the constants for the motor. E K J M ω 2 = P Tω = E P Tθ = E E K E P + = (5) (6) (7) (8) page 184 Figure 148 Motor speed curve and the derived differential equation The remaining equations describing the system are developed in Figure 149. These calculations are done with the assumption that the inertias of the gears and other compo- rpm 2400 0.5s d dt ----- ¸ , ¸ _ ω m ω m K 2 J M R ---------- ¸ , ¸ _ + V s K J M R ---------- ¸ , ¸ _ T load J M ------------ – = The steady-state velocity can be used to find the value of K. 0 ( ) 2400 rot min --------- ¸ , ¸ _ K 2 J M R ---------- ¸ , ¸ _ + 15V K J M R ---------- ¸ , ¸ _ 0 ( ) – = 2400 rot min --------- 1min 60s ------------- 2πrad 1rot ---------------- ¸ , ¸ _ K ( ) 15V = K 15V 120πrads 1 – ----------------------------- 39.8 10 3 – × Vs rad --------- = = The time constant can be used to find the remaining parameters. K 2 J M R ---------- 1 0.5s ---------- 2s 1 – = = ω m ' V s 50.3V 1 – s 2 – rad ω m 2s 1 – – 50505Kg 1 – m 2 – T load – = (1) θ m ' ω m = (2) d dt ----- ¸ , ¸ _ ω m ω m 2s 1 – + V s 50.3V 1 – s 2 – rad ( ) T load 19.8 10 6 – × Kgm 2 ------------------------------------------ – = R 40Ω = J 39.8 10 3 – × Vs rad --------- ¸ , ¸ _ 2 40Ω ( ) 2s 1 – ( ) --------------------------------------------- 0.198005 -4 ×10 19.8 10 6 – × Kgm 2 = = = page 185 nents are insignificant. Figure 149 Additional equations to model the machine The long shaft must now be analyzed. This will require that angles at both ends be defined, and the shaft be considered as a spring. θ gear ω gear , angular position and velocity of the shaft at the gear box = θ pinion ω pinion , angular position and velocity of the shaft at the pinion = T shaft K s θ gear θ pinion – ( ) = θ gear 1 20 ------θ m = ω gear 1 20 ----- -ω m = The rotation of the pinion is related to the displacement of the rack through the circum- ferential travel. This ratio can also be used to find the force applied to the mass. x mass θ pinion π6in = F mass ∑ F mass M mass x mass '' = = T shaft F mass 6in 2 -------- ¸ , ¸ _ = K s θ gear θ pinion – ( ) F mass 6in 2 -------- ¸ , ¸ _ = K s θ gear θ pinion – ( ) 6in 2 -------- ¸ , ¸ _ --------------------------------------------- M mass θ pinion '' π6in = θ pinion '' θ gear θ pinion – ( )1.768 10 6 – × in 2 – Kg 1 – K s = θ pinion '' 1 20 ------θ m θ pinion – ¸ , ¸ _ 1.768 10 6 – × in 2 – Kg 1 – K s 0.0254in 1.0m --------------------- ¸ , ¸ _ 2 = θ pinion '' 1 20 ------ θ m θ pinion – ¸ , ¸ _ 1.141 10 9 – × ( )m 2 – Kg 1 – K s = ω pinion ' 57.1 10 12 – × m 2 – Kg 1 – K s θ m 1.141 10 9 – × m 2 – Kg 1 – K s θ pinion – = θ pinion ' ω pinion = (3) (4) page 186 If the gear box is assumed to have relatively small inertia, then we can say that the torque load on the motor is equal to the torque in the shaft. This then allows the equation for the motor shaft to be put into a useful form, as shown in Figure 150. Having this differ- ential equation now allows the numerical analysis to proceed. The analysis involves itera- tively solving the equations and determining the point at which the system begins to overshoot, indicating critical damping. Figure 150 Numerical analysis of system response d dt ----- θ m ω m θ pinion ω pinion 0 1 0 0 2525 – K s 2 – 50505K s 0 0 0 0 1 57.1 10 12 – × K s 0 1.141 10 9 – × K s – 0 θ m ω m θ pinion ω pinion 0 V s 50.3 0 0 + = The Tload term is eliminated from equation (2) ω m ' V s 50.3V 1 – s 2 – rad ω m 2s 1 – – 50505Kg 1 – m 2 – K s θ gear θ pinion – ( ) – = ω m ' V s 50.3V 1 – s 2 – rad ω m 2s 1 – – 50505Kg 1 – m 2 – K s 1 20 ----- - θ m θ pinion – ¸ , ¸ _ – = ω m ' V s 50.3V 1 – s 2 – rad ( ) θ pinion 50505Kg 1 – m 2 – K s ( ) + = The state equations can then be put in matrix form for clarity. The units will be elimi- nated for brevity, but acknowledging that they are consistent. ω m 2 – s 1 – ( ) θ m 2525 – Kg 1 – m 2 – K s ( ) + + page 187 5.5 SUMMARY • The basic equations of motion were discussed. • Mass and area moment of inertia are used for inertia and springs. • Rotational dampers and springs. • A design case was presented. 5.6 PRACTICE PROBLEMS 1. Draw the FBDs and write the differential equations for the mechanism below. The right most shaft is fixed in a wall. θ 1 θ 2 K s1 K s2 B Τ J M 2 J M 1 + θ 2 θ 1 T K s1 θ 1 θ 2 – ( ) J M 1 J M 2 K s1 θ 1 θ 2 – ( ) Bθ 2 ' K s2 θ 2 M 1 ∑ T K s1 θ 1 θ 2 – ( ) – J M 1 θ 1 '' = = + M 2 ∑ K s1 θ 1 θ 2 – ( ) Bθ 2 ' – K s2 θ 2 – J M 2 θ 2 '' = = (ans. page 188 2. Draw the FBDs and write the differential equations for the mechanism below. 3. The system below consists of two masses hanging by a cable over mass ‘J’. There is a spring in the cable near M2. The cable doesn’t slip on ‘J’. a) Derive the differential equations for the following system. b) Convert the differential equations to state variable equations M 1 K d K s R 1 R 2 x 1 x 2 θ 1 θ 2 J M 1 J M 2 (ans. J M 2 M 1 J M 1 gM 1 T 1 T 1 T 2 T 2 K d x 1 ' T 1 K s x 2 x 1 – ( ) = F y ∑ T 1 gM 1 – M 1 x 2 '' = = θ 1 x 1 – R 2 -------- = θ 2 x 1 R 1 ------ = + + M 1 ∑ T 1 R 1 – T 2 R 1 + J M 1 θ 2 '' – = = + M 2 ∑ T 2 R 2 R 2 K d x 1 ' – J M 2 θ 1 '' – = = 6 equations, 6 unknowns page 189 J M K s1 θ F M 1 M 2 K s2 x 2 x 1 R RT θK s1 RK s2 x 2 θR – ( ) J M (ans. M 1 g T M 1 M 2 g K s2 x 2 θR – ( ) M 2 M J ∑ RT – θK s1 – RK s2 x 2 θR – ( ) + J M θ'' = = F M1 ∑ T M 1 g – F – M 1 x 1 '' – = = F M2 ∑ K s2 x 2 θR – ( ) M 2 g – M 2 x 2 '' – = = a) Rθ x 1 – = if(T < 0) T=0 if(T >= 0) R M 1 g F + ( ) – θ K s1 R 2 K s2 + ( ) – RK s2 ( )x 2 + J M R 2 M 1 – ( )θ'' = T M 1 x 1 '' – M 1 g F + + M 1 Rθ'' – M 1 g F + + = = (1) (2) F page 190 4. Write the state equations for the system to relate the applied force ’F’ to the displacement ’x’. 5. for the system pictured below a) write the differential equations (assume small angular deflec- tions) and b) put the equations in state variable form. 6. for the system pictured below a) write the differential equations (assume small angular deflec- F K d1 K s1 M x r J M K s2 K s3 θ K d2 M Ks1 Kd1 F1 x1 Two gears with fixed centers of rotation and lever arms. x2 x3 i) R1 R2 J M 1 N 1 , J M 2 N 2 , F 1 R 1 (ans. J M 1 R 2 K d1 D x 1 x 3 – ( ) J M 2 τ τ N 2 N 1 ------ K d1 D x 1 x 3 – ( ) K s1 x 1 x 3 – ( ) M Mg R 2 K s1 x 1 x 3 – ( ) θ 2 θ 1 θ 2 x 3 R 2 ------ = θ 1 N 1 θ 2 N 2 = page 191 tions) and b) put the equations in state variable form. 7. for the system pictured below a) write the differential equations (assume small angular deflec- x1 F1 A mass slides on a plane with dry kinetic friction (0.3). It is connected to a round mass that rolls and does not slip. ii) x2 Ks1 Ks2 Kd1 M2 M1 θ1 θ2 J M 1 R 1 , F1 (ans. M2 M1 θ1 J M 1 R 1 , K s1 x 1 K d1 Dx 1 K s2 x 1 x 2 – ( ) µ k N x 1 x 1 -------- N M 2 g θ 2 ( ) cos = M 2 g θ 2 ( ) sin K s2 x 1 x 2 – ( ) τ c θ 1 x 2 R 1 ------ = page 192 tions) and b) put the equations in state variable form. 8. for the system pictured below a) write the differential equations (assume small angular deflec- tions) and b) put the equations in state variable form. 9. for the system pictured below a) write the differential equations (assume small angular deflec- M1 Ks1 Kd1 F1 x1 A round drum with a slot. The slot drives a lever arm with a sus- pended mass. A force is applied to a belt over the drum. iii) R2 R3 R4 x2 θ1 J1 R1 M1 Ks1 Kd1 F x1 A lever arm has a force on one side, and a spring damper combination on the other side with a suspended mass. iv) x2 x3 J1 R1 R2 page 193 tions) and b) put the equations in state variable form. 10. for the system pictured below a) write the differential equations (assume small angular deflec- tions) and b) put the equations in state variable form. 11. for the system pictured below a) write the differential equations (assume small angular deflec- M1 N1 N2 Ks1 Kd1 T1 x1 J1 J2 Two gears have levers attached. On one side is a mass, the other side a spring damper pair. A torque is applied to one gear. v) x2 R1 R2 θ1 θ2 M3 Ks3 Kd3 F1 x3 A pulley system has the bottom pulley anchored. A mass is hung in the middle of the arrangement with springs and dampers on either side. vi) x2 Ks2 R2,J2,M2 R1,J1 θ1 page 194 tions) and b) put the equations in state variable form. 12. for the system pictured below a) write the differential equations (assume small angular deflec- tions) and b) put the equations in state variable form. M1 Ks2 Kd2 F1 x1 x3 A mass is suspended over a lever arm. Forces are applied to the lower side of the moment arm through a spring damper pair. vii) Ks1 Kd1 R1 R2 x2 M1 N1 N2 Ks1 Kd1 F1 x1 J1 J2 Two gears have a force on one side, and a mass on the other, both sus- pended from moment arms. There is a rota- tional damping on one of the gears. viii) x2 R1 R2 θ2 θ1 page 195 13. For both systems pictured below. a) Draw FBDs and write the differential equations for the individual masses. b) Combine the equations in input-output form with y as he output and F as the input. c) Write the equations in state variable matrix form. d) Use Runge-Kutta to find the system state after 1 second. 14. Find the polar moments of inertia of area and mass for a round cross section with known radius and mass per unit area. How are they related? 15. The rotational spring is connected between a mass ‘J’, and the wall where it is rigidly held. The mass has an applied torque ‘T’, and also experiences damping ‘B’. M 1 M 2 J,R K s1 K s2 K d1 K d2 θ·45 F M 1 M 2 J,R J,R J,R K s1 K s2 K d1 K d2 y y F µ k ·0.2 (ans. J area r 2 A d 0 R ∫ r 2 2πr r d ( ) 0 R ∫ 2π r 3 r d 0 R ∫ 2π r 4 4 ---- 0 R πR 4 2 --------- = = = = = ρ M A ----- M πR 2 --------- = = For area: J mass r 2 M d 0 R ∫ r 2 ρ2πr r d ( ) 0 R ∫ 2πρ r 3 r d 0 R ∫ 2πρ r 4 4 ---- 0 R ρ πR 4 2 --------- ¸ , ¸ _ MR 2 2 ----------- = = = = = = For mass: The mass moment can be found by multiplying the area moment by the area density. page 196 a) Derive the differential equation for the rotational system shown. b) Put the equation in state variable form (using variables) and then plot the posi- tion (not velocity) as a function of time for the first 5 seconds with your calcula- tor using the parameters below. Assume the system starts at rest. c) A differential equation for the rotating mass with a spring and damper is given below. Solve the differential equation to get a function of time. Assume the sys- tem starts at rest. B J K s θ T K s 10 Nm rad --------- = B 1 Nms rad ----------- = J M 1Kgm 2 = T 10Nm = θ'' 1s 1 – ( )θ' 10s 2 – ( )θ + + 10s 2 – = (ans. Bθ' K s θ T J M + M ∑ T K s θ – Bθ' – J M θ'' = = a) J M θ'' Bθ' K s θ + + T = b) θ' ω = ω' T J M ------ K s J M ------θ – B J M ------ω – = ω' 10Nm 1Kgm 2 ----------------- 10 Nm rad --------- 1Kgm 2 -----------------θ – 1 Nms rad ----------- 1Kgm 2 -----------------ω – = ω' Nm Kgm 2 -------------- 10 10θ rad --------- – s rad ---------ω – ¸ , ¸ _ = ω' Kgm s 2 ------------ ¸ , ¸ _ m Kgm 2 ---------------------- 10 10θ rad --------- – s rad ---------ω – ¸ , ¸ _ = ω' s 2 – 10 10θ rad --------- – s rad ---------ω – ¸ , ¸ _ = 5s 2 1 0 page 197 (c θ'' 1s 1 – ( )θ' 10s 2 – ( )θ + + 0 = homogeneous: θ h e At = guess: θ h ' Ae At = θ h '' A 2 e At = A 2 e At 1s 1 – ( )Ae At 10s 2 – ( )e At + + 0 = A 2 1s 1 – ( )A 10s 2 – + + 0 = A 1s 1 – – 1s 1 – ( ) 2 4 1 ( ) 10s 2 – ( ) – t 2 1 ( ) ------------------------------------------------------------------------------- = θ h C 1 e 0.5s 1 – t – 3.123s 1 – t C 2 + ( ) cos = A 1s 1 – – 1s 2 – 40s 2 – – t 2 1 ( ) ------------------------------------------------------- 0.5 – j3.123 t ( )s 1 – = = θ'' 1s 1 – ( )θ' 10s 2 – ( )θ + + 10s 2 – = particular: θ p A = guess: θ p ' 0 = θ p '' 0 = 0 ( ) 1s 1 – ( ) 0 ( ) 10s 2 – ( ) A ( ) + + 10s 2 – = A 10s 2 – 10s 2 – ------------- 1 = = θ p 1 = θ t ( ) C 1 e 0.5s 1 – t – 3.123s 1 – t C 2 + ( ) cos 1 + = Initial conditions: θ 0 ( ) C 1 e 0.5s 1 – 0 – 3.123s 1 – 0 C 2 + ( ) cos 1 + 0 = = C 1 C 2 ( ) cos 1 + 0 = θ' t ( ) 0.5s 1 – C 1 e 0.5s 1 – t – 3.123s 1 – t C 2 + ( ) cos – 3.123s 1 – C 1 e 0.5s 1 – t – 3.123s 1 – t C 2 + ( ) sin – = θ' 0 ( ) 0.5s 1 – C 1 1 ( ) C 2 ( ) cos – 3.123s 1 – C 1 1 ( ) C 2 ( ) sin – 0 = = 0.5 C 2 ( ) cos – 3.123 C 2 ( ) sin – 0 = C 2 ( ) sin C 2 ( ) cos -------------------- 0.5 – 3.123 ------------- C 2 ( ) tan = = C 2 0.159 – = C 1 0.159 – ( ) cos 1 + 0 = C 1 1 – 0.159 – ( ) cos ------------------------------ 1.013 – = = θ t ( ) 1.013 – e 0.5s 1 – t – 3.123s 1 – t 0.159 – ( ) cos 1 + = page 198 b) v 2 ' θ RK s2 M 2 ------------ ¸ , ¸ _ x 2 K s2 – M 2 ----------- ¸ , ¸ _ g + + = θ' ω = x 2 ' v 2 = ω' θ K s1 – R 2 K s2 – J M R 2 M 1 – ---------------------------------- ¸ , ¸ _ x 2 RK s2 J M R 2 M 1 – -------------------------- ¸ , ¸ _ RM 1 g – RF – J M R 2 M 1 – --------------------------------- ¸ , ¸ _ + + = K s2 x 2 θR – ( ) M 2 g – M 2 x 2 D 2 – = R M 1 g F + ( ) – θ K s1 R 2 K s2 + ( ) – RK s2 ( )x 2 + J M R 2 M 1 – ( )θD 2 = θ K s1 R 2 K s2 + ( ) J M R 2 M 1 – ( )D 2 – ( ) – x 2 RK s2 ( ) + R M 1 g F + ( ) = x 2 K s2 M 2 D 2 + ( ) θ RK s2 – ( ) + M 2 g = c) x 2 1 K s2 M 2 D 2 + ----------------------------- M 2 g ( ) θ RK s2 ( ) + ( ) = (3) (4) θ 1 RK s2 ------------ M 2 g – ( ) x 2 K s2 M 2 D 2 + ( ) + ( ) = for x2 put (4) into (5) (5) 1 K s2 ---------- M 2 g – ( ) x 2 K s2 M 2 D 2 + ( ) + ( ) , _ K s1 R 2 K s2 + ( ) J M R 2 M 1 – ( )D 2 – ( ) x 2 RK s2 ( ) + R M 1 g + ( = M 2 g x 2 K s2 M 2 D 2 + ( ) – ( ) K s1 R 2 K s2 + J M D 2 – D 2 R 2 M 1 + ( ) x 2 R 2 K s2 2 ( ) + R 2 K s2 M 1 g F + ( ) = x 2 K s2 – M 2 D 2 – ( ) K s1 R 2 K s2 + J M D 2 – D 2 R 2 M 1 + ( ) R 2 K s2 2 + ( ) R 2 K s2 M 1 g F + ( ) M 2 g K s1 R 2 K s2 + J M D 2 – D 2 R 2 M 1 + ( ) – = etc.... page 199 6. INPUT-OUTPUT EQUATIONS 6.1 INTRODUCTION To solve a set of differential equations we have two choices, solve it numerically or symbolically. For a symbolic solution the system of differential equations must be manipulated into a single differential equation. In this chapter we will look at methods for manipulating differential equations into useful forms. 6.2 THE DIFFERENTIAL OPERATOR The differential operator ’d/dt’ can be written in a number of forms. In this book there have been two forms used thus far, d/dt x and x’. For convenience we will add a third, ’D’. The basic definition of this operator, and related operations are shown in Figure 151. In basic terms the operator can be manipulated as if it is a normal variable. Multiply- ing by ’D’ results in a derivative, dividing by ’D’ results in an integral. The first-order axiom can be used to help solve a first-order differential equation. Topics: Objectives: • To be able to develop input-output equations for mechanical systems. • The differential operator, input-output equations • Design case - vibration isolation page 200 Figure 151 General properties of the differential operator Figure 152 Proof of the first-order axiom d dt ---- -x Dx = Dx Dy + D x y + ( ) = Dx Dy + Dy Dx + = Dx Dy Dz + ( ) + Dx Dy + ( ) Dz + = d n dt n ------- D n = 1 D ----x x t d ∫ = D n x D m --------- D n m – x = x D a + ( ) D a + ( ) --------------------- x = x t ( ) D a + ( ) ------------------ e at – x t ( )e at t d ∫ C + ( ) = first-order axiom basic definition algebraic manipulation simplification x' Ax + y t ( ) = xD Ax + y t ( ) = e At xD e At Ax + e At y t ( ) = d dt ---- - e at x ( ) e at d dt ----- x ae at x + = De at x e at Dx ae at x + = e At xD e At y t ( ) = e At xD e At y t ( ) = e At x e ∫ At y t ( )dt C + = x e A – t e ∫ At y t ( )dt C + ¸ , ¸ _ = xD Ax + y t ( ) = x D A + ( ) y t ( ) = x y t ( ) D A + -------------- = y t ( ) D A + -------------- e A – t e ∫ At y t ( )dt C + ¸ , ¸ _ = Note: page 201 Figure 153 contains an example of the manipulation of a differential equation using the ’D’ operator. The solution begins by replacing the ’d/dt’ terms with the ’D’ oper- ator. After this the equation is rearranged to simplify the expression. Notice that the manipulation follows the normal rules of algebra. Figure 153 An example of simplification with the differential operator An example of the solution of a first-order differential equation is given in Figure 154. This begins with replacing the differential operator and rearranging the equation. The first-order axiom is then used to obtain the solution. The initial conditions are then used to find the unknowns. d dt ----- ¸ , ¸ _ 2 x d dt -----x 5x + + 5t = x 5t D 2 D 5 + + -------------------------- = x D 2 D 5 + + ( ) 5t = D 2 x Dx 5x + + 5t = x t 5 D 2 D 5 + + -------------------------- ¸ , ¸ _ = page 202 Figure 154 An example of a solution for a first-order system 6.3 INPUT-OUTPUT EQUATIONS A typical system will be described by more than one differential equation. These equations can be solved to find a single differential equation that can then be integrated. The basic technique is to arrange the equations into an input-output form, such as that in Figure 155. These equations will have only a single output variable, and these are always shown on the left hand side. The input variables (there can be more than one) are all on the right hand side of the equation, and act as the non-homogeneous forcing function. d dt ----- x 5x + 3t = x e 5 – t e ∫ 5t 3tdt C + ¸ , ¸ _ = x 3t D 5 + ------------- = Dx 5x + 3t = x e 5 – t 3 te 5t e 5t – 5 --------------------- ¸ , ¸ _ C + ¸ , ¸ _ = Given, x 0 ( ) 10 = d dt ----- te 5t e 5t – ( ) 5te 5t e 5t e 5t – + = d dt ----- te 5t e 5t – ( ) 5e 5t t = guess, 5te 5t = te 5t e 5t – 5 --------------------- e 5t t t d ∫ = x 0 ( ) 1 ( ) 3 0 ( ) 1 ( ) 1 ( ) – 5 ----------------------------- ¸ , ¸ _ C + ¸ , ¸ _ 10 = = Initial conditions, C 10.6 = x 0.6 t 1 – ( ) 10.6e 5 – t + = x e 5 – t 3 te 5t e 5t – 5 --------------------- ¸ , ¸ _ 10.6 + ¸ , ¸ _ = x 0.6t 0.6 – 10.6e 5 – t + = page 203 Figure 155 Developing input-output equations An example of deriving an input-output equation from a system of differential equations is given in Figure 156. This begins by replacing the differential operator and combining the equations to eliminate one of the output variables. The solution ends by rearranging the equation to input-output form. Figure 156 An input output equation example 2y 1 ''' y 1 '' y 1 ' 4y 1 + + + u 1 ' u 1 3u 2 u 3 '' u 3 + + + + = y 2 '' 6y 2 ' y 2 + + u 1 3u 2 '' u 2 ' 0.5u 2 u 3 ' + + + + = e.g., where, y = outputs u = inputs Given the differential equations, Find the input-output equations. y 1 ' 3y 1 – 2y 2 u 1 2u 2 ' + + + = y 2 ' 2y 1 y 2 u 1 ' + + = Dy 1 3y 1 – 2y 2 u 1 2Du 2 + + + = Dy 2 2y 1 y 2 Du 1 + + = y 1 D 3 + ( ) ∴ 2y 2 u 1 2Du 2 + + = (1) (2) (1) y 2 ∴ y 1 D 3 + 2 ------------- ¸ , ¸ _ 0.5u 1 – Du 2 – = (2) y 2 D 1 – ( ) ∴ 2y 1 Du 1 + = y 1 D 3 + 2 ------------- ¸ , ¸ _ 0.5u 1 – Du 2 – ¸ , ¸ _ D 1 – ( ) ∴ 2y 1 Du 1 + = y 1 D 2 2D 3 – + 2 ----------------------------- 2 – ¸ , ¸ _ 0.5Du 1 – 0.5u 1 D 2 u 2 – Du 2 + + ∴ Du 1 = 0.5D 2 y 1 Dy 1 3.5y 1 – + ∴ Du 1 0.5Du 1 0.5u 1 – D 2 u 2 Du 2 – + + = 0.5y 1 '' y 1 ' 3.5y 1 – + ∴ u 1 ' 0.5u 1 ' 0.5u 1 – u 2 ' u 2 ' – + + = page 204 Figure 157 Drill problem: Find the second equation in the previous example 6.3.1 Converting Input-Output Eqautions to State Equations Find the second equation for the example in Figure 156 for the output y2. page 205 Figure 158 Writing an input-output equation as a differential equation K s F M 2 x 1 x 2 M 1 M 1 F K s x 2 x 1 – ( ) F x ∑ F K s x 2 x 1 – ( ) + M 1 D 2 x 1 = = x 1 M 1 D 2 K s + ( ) F K s x 2 + = M 2 K s x 2 x 1 – ( ) F x ∑ K – s x 2 x 1 – ( ) M 2 D 2 x 2 = = K s x 1 x 2 M 2 D 2 K s + ( ) = x 1 M 1 D 2 K s + ( ) F K s K s x 1 M 2 D 2 K s + -------------------------- - ¸ , ¸ _ + = The equations can be combined to eliminate x2. Equations of motion can be derived for these masses. x 1 M 1 D 2 K s + ( ) M 2 D 2 K s + ( ) K s 2 – ( ) F M 2 D 2 K s + ( ) = x 1 D 4 M 1 M 2 D 2 K s M 1 M 2 + ( ) K s 2 K s 2 – + + ( ) F M 2 D 2 K s + ( ) = x 1 D 4 M 1 M 2 D 2 K s M 1 M 2 + ( ) + ( ) F M 2 D 2 K s + ( ) = d dt ----- ¸ , ¸ _ 4 x 1 M 1 M 2 d dt ----- ¸ , ¸ _ 2 x 1 K s M 1 M 2 + ( ) + d dt ---- - ¸ , ¸ _ 2 FM 2 FK s + = This equation can’t be analyzed because of the derivatives on the right hand side. These can be eliminated by integrating the equation twice. d dt ----- ¸ , ¸ _ 2 x 1 M 1 M 2 x 1 K s M 1 M 2 + ( ) + FM 2 F t d ( ) t d ∫ ∫ ( )K s + = page 206 Figure 159 Writing a differential equation with differentials in the non-homogeneous part as a state equation 6.3.2 Integrating Input-Output Eqautions d dt ----- ¸ , ¸ _ v 1 M 1 M 2 x 1 K s M 1 M 2 + ( ) + FM 2 q 2 K s + = This can then be written in state variable form by creating dummy variables for integrating the function ’F’. d dt ----- ¸ , ¸ _ x 1 v 1 = d dt ----- x 1 q 2 q 1 v 1 0 0 0 1 0 0 1 0 0 0 0 0 K s M 1 M 2 + ( ) M 1 M 2 -------------------------------- – K s M 1 M 2 --------------- 0 0 x 1 q 2 q 1 v 1 0 0 F F M 1 ------- + = d dt ----- ¸ , ¸ _ q 2 q 1 = d dt ----- ¸ , ¸ _ q 1 F = d dt ----- ¸ , ¸ _ v 1 x – 1 K s M 1 M 2 + ( ) M 1 M 2 -------------------------------- F M 1 ------- q 2 K s M 1 M 2 --------------- + + = These equations can then be written in matrix form. page 207 Figure 160 Integrating an input-output equation d dt ----- ¸ , ¸ _ 2 x 1 M 1 M 2 x 1 K s M 1 M 2 + ( ) + 0 = The solution begins by evaluating the homogeneous equation. d dt ----- ¸ , ¸ _ 2 x 1 M 1 M 2 x 1 K s M 1 M 2 + ( ) + PM 2 P t d ( ) t d ∫ ∫ ( )K s + = A 2 M 1 M 2 K s M 1 M 2 + ( ) + 0 = A K s M 1 M 2 + ( ) M 1 M 2 --------------------------------j t = x 1 h C 1 K s M 1 M 2 + ( ) M 1 M 2 --------------------------------t C 2 + ¸ , ¸ _ cos = The particular solution can also be found, but in this case the input force must be speci- fied, and then integrated. For this example a step function of magnitude ’P’ is used. d dt ----- ¸ , ¸ _ 2 x 1 M 1 M 2 x 1 K s M 1 M 2 + ( ) + PM 2 P t 2 2 ----K s + = x 1 p At 2 Bt C + + = x 1 p ' 2At B + = x 1 p '' 2A = Guess, 2A ( )M 1 M 2 At 2 Bt C + + ( )K s M 1 M 2 + ( ) + PM 2 P t 2 2 ---- K s + = AK s M 1 M 2 + ( ) PK s 2 --------- - = A P 2 M 1 M 2 + ( ) ----------------------------- = BK s M 1 M 2 + ( ) 0 = B 0 = 2A ( )M 1 M 2 CK s M 1 M 2 + ( ) + PM 2 = CK s M 1 M 2 + ( ) PM 2 2 P 2 M 1 M 2 + ( ) ----------------------------- ¸ , ¸ _ M 1 M 2 – = C PM 2 K s M 1 M 2 + ( ) -------------------------------- 1 M 1 M 1 M 2 + ( ) -------------------------- – ¸ , ¸ _ = C PM 2 2 K s M 1 M 2 + ( ) 2 ---------------------------------- - = x 1 p P 2 M 1 M 2 + ( ) ----------------------------- ¸ , ¸ _ t 2 PM 2 2 K s M 1 M 2 + ( ) 2 ----------------------------------- ¸ , ¸ _ + = page 208 Figure 161 Integrating an input-output equation (cont’d) 6.4 DESIGN CASE The classic mass-spring-damper system is shown in Figure 162. In this example the forces are summed to provide an equation. The differential operator is replaced, and the equation is manipulated into transfer function form. The transfer function is given in two different forms because the system is reversible and the output could be either ’F’ or ’x’. The initial conditions can then be used to find the values of the coefficients. It will be assumed that the system starts undeflected and at rest. x 1 C 1 K s M 1 M 2 + ( ) M 1 M 2 --------------------------------t C 2 + ¸ , ¸ _ cos P 2 M 1 M 2 + ( ) ----------------------------- ¸ , ¸ _ t 2 PM 2 2 K s M 1 M 2 + ( ) 2 ----------------------------------- ¸ , ¸ _ + + = 0 C 1 C 2 ( ) cos PM 2 2 K s M 1 M 2 + ( ) 2 ----------------------------------- ¸ , ¸ _ + = d dt -----x 1 K s M 1 M 2 + ( ) M 1 M 2 --------------------------------C – 1 K s M 1 M 2 + ( ) M 1 M 2 --------------------------------t C 2 + ¸ , ¸ _ sin 2 P 2 M 1 M 2 + ( ) ----------------------------- ¸ , ¸ _ t + = 0 K s M 1 M 2 + ( ) M 1 M 2 --------------------------------C – 1 C 2 ( ) sin = C 2 0 = 0 C 1 0 ( ) cos PM 2 2 K s M 1 M 2 + ( ) 2 ---------------------------------- - ¸ , ¸ _ + = C 1 P – M 2 2 K s M 1 M 2 + ( ) 2 ----------------------------------- = The final equation can then be written. x 1 P – M 2 2 K s M 1 M 2 + ( ) 2 ----------------------------------- ¸ , ¸ _ K s M 1 M 2 + ( ) M 1 M 2 --------------------------------t ¸ , ¸ _ cos P 2 M 1 M 2 + ( ) ----------------------------- ¸ , ¸ _ t 2 PM 2 2 K s M 1 M 2 + ( ) 2 ---------------------------------- - ¸ , ¸ _ + + = page 209 Figure 162 A transfer function for a mechanical system Mass-spring-damper systems are often used when doing vibration analysis and design work. The first stage of such analysis involves finding the actual displacement for a given displacement or force. A system experiencing a sinusoidal oscillating force is given in Figure 163. Numerical values are substituted and the homogeneous solution to the equation is found. Kd Ks M x F M d 2 x dt 2 -------- K d dx dt ----- - K s x + + = F x --- MD 2 x K d Dx K s x + + = F Aside: An important concept that is ubiquitous yet largely unrecognized is the use of functional design. We look at parts of systems as self contained modules that use inputs to produce outputs. Some systems (such a mechanisms) are reversible, others are not (consider a internal combustion engine, turning the crank does not produce gasoline). An input is typically something we can change, an output is the resulting change in a system. For the example above ‘F’ over ‘x’ implies that we are chang- ing the input ‘x’, and there is some change in ‘F’. We know this could easily be reversed mathematically and practically. x F --- 1 MD 2 K d D K s + + ------------------------------------------ = OR F MD 2 x K d Dx K s x + + = F y ∑ F – K d dx dt ----- - K s x + + M d 2 x dt 2 -------- – = = Aside: Keep in mind that the mathematical expression ‘F/x’ is a ratio between input (displacement action) and output (reaction force). When shown with differentials it is obvious that the ratio is not simple, and is a function of time. Also keep in mind that if we were given a force applied to the system it would become the input (action force) and the output would be the displacement (resulting motion). To do this all we need to do is flip the numerators and denominators in the transfer func- tion. page 210 Figure 163 Explicit analysis of a mechanical system The solution continues in Figure 164 where the particular solution is found and put in phase shift form. M 1Kg = K s 2 N m ---- = K d 0.5 Ns m ------ = The differential equation for the mass-spring damper system can be written. Given the component values input force, F 5 6t ( ) sin N = 1Kg d 2 x dt 2 -------- 0.5 Ns m ------ ¸ , ¸ _ dx dt ------ 2 N m ---- ¸ , ¸ _ x + + 5 6t ( ) sin N = The homogeneous solution can be found. 1Kg d 2 x dt 2 -------- 0.5 Ns m ------ ¸ , ¸ _ dx dt ------ 2 N m ---- ¸ , ¸ _ x + + 0 = A 0.5 Ns m ------ – 0.5 Ns m ------ ¸ , ¸ _ 2 4 1Kg ( ) 2 N m ---- ¸ , ¸ _ – t 2 1Kg ( ) ------------------------------------------------------------------------------------------- = A 0.5 0.5 – 0.25 8 – t ( )s 1 – = A 0.25 – 1.392j t ( )s 1 – = x h C 1 e 0.25t – 1.392t C 2 + ( ) cos = page 211 Figure 164 Explicit analysis of a mechanical system (continued) The system is assumed to be at rest initially, and this is used to find the constants in the homogeneous solution in Figure 165. Finally the displacement of the mass is used to find the force exerted through the spring on the ground. In this case there are two force fre- quency components at 1.392rad/s and 6rad/s. The steady-state force at 6rad/s will have a magnitude of .2932N. The transient effects have a time constant of 4 seconds (1/0.25), and should be negligible within a few seconds of starting the machine. The particular solution can now be found with a guess. 1Kg d 2 x dt 2 -------- 0.5 Ns m ------ ¸ , ¸ _ dx dt ------ 2 N m ---- ¸ , ¸ _ x + + 5 6t ( ) sin N = x p A 6t sin B 6t cos + = x p ' 6A 6t cos 6B 6t sin – = x p '' 36 – A 6t sin 36B 6t cos – = 36 – A 6t sin 36B 6t cos – 0.5 6A 6t cos 6B 6t sin – ( ) 2 A 6t sin B 6t cos + ( ) + + 5 6t ( ) sin = 36A – 3B – 2A + 5 = 36B – 3A 2B + + 0 = A 34 3 ----- -B = 34 34 3 ------ B ¸ , ¸ _ – 3B – 5 = B 5 34 34 ( ) – 3 -------------------- 3 – ----------------------------- 0.01288 – = = A 34 3 ----- - 0.01288 – ( ) 0.1460 – = = x p 0.1460 – ( ) 6t sin 0.01288 – ( ) 6t cos + = x p 0.1460 – ( ) 2 0.01288 – ( ) 2 + 0.1460 – ( ) 2 0.01288 – ( ) 2 + ------------------------------------------------------------------- 0.1460 – ( ) 6t sin 0.01288 – ( ) 6t cos + ( ) = x p 0.1466 0.9961 – 6t sin 0.08788 – 6t cos ( ) = x p 0.1466 6t 0.9961 – 0.08788 – ---------------------- ¸ , ¸ _ atan + ¸ , ¸ _ sin = x p 0.1466 6t 1.483 + ( ) sin = page 212 Figure 165 Explicit analysis of a mechanical system (continued) A decision has been made to reduce the vibration transmitted to the ground to 0.1N. This can be done by adding a mass-spring isolator, as shown in Figure 166. In the figure the bottom mass-spring-damper combination is the original system. The mass and spring above have been added to reduce the vibration that will reach the ground. Values must be selected for the mass and spring. The design begins by developing the differential The particular and homogeneous solutions can now be combined. x x h x p + C 1 e 0.25t – 1.392t C 2 + ( ) cos 0.1466 6t 1.483 + ( ) sin + = = The initial conditions can be used to find the unknown constants. 0 C 1 e 0 0 C 2 + ( ) cos 0.1466 0 1.483 + ( ) sin + = x' 0.25C – 1 e 0.25t – 1.392t C 2 + ( ) cos 1.392 C 1 e 0.25t – 1.392t C 2 + ( ) sin ( ) – 6 0.1 ( + = 0 0.25C – 1 e 0 0 C 2 + ( ) cos 1.392 C 1 e 0 0 C 2 + ( ) sin ( ) – 6 0.1466 0 1.483 + ( ) cos ( + = C 1 C 2 ( ) cos 0.1460 – = 0 0.25C – 1 C 2 ( ) cos 1.392 C 1 C 2 ( ) sin ( ) – 0.07713 + = C 1 0.1460 – C 2 ( ) cos -------------------- = 0 0.25 0.1460 – C 2 ( ) cos -------------------- C 2 ( ) cos ¸ , ¸ _ – 1.392 0.1460 – C 2 ( ) cos -------------------- C 2 ( ) sin ¸ , ¸ _ – 0.07713 + = 0 0.0365 0.2032 ( ) C 2 ( ) tan 0.07713 + + = C 2 0.0365 0.07713 + 0.2032 – ------------------------------------------ ¸ , ¸ _ atan 0.5099 – = = C 1 0.1460 – 0.5099 – ( ) cos --------------------------------- 0.1673 – = = x 0.1673 – e 0.25t – 1.392t 0.5099 – ( ) cos 0.1466 6t 1.483 + ( ) sin + ( )m = The displacement can then be used to find the force transmitted to the ground, assuming the spring is massless. F K s x = F 2 N m ---- ¸ , ¸ _ 0.1673 – e 0.25t – 1.392t 0.5099 – ( ) cos 0.1466 6t 1.483 + ( ) sin + ( )m = F 0.3346 – e 0.25t – 1.392t 0.5099 – ( ) cos 0.2932 6t 1.483 + ( ) sin + ( )N = page 213 equations for both masses. Figure 166 Vibration isolation system For the design we are only interested in the upper spring, as it determines the force on the ground. An input-output equation for that spring is developed in Figure 167. The given values for the mass-spring-damper system are used. In addition a value for the upper mass is selected. This is arbitrarily chosen to be the same as the lower mass. This choice may need to be changed later if the resulting spring constant is not practical. x 1 F ∑ K s2 – x 2 K d x 2 ' x 1 ' – ( ) – K s1 x 2 x 1 – ( ) – M 2 x 2 '' = = x 2 M 1 M 2 K s1 K s2 K d F M 2 K s1 x 2 x 1 – ( ) K s2 – x 2 K d x 2 ' x 1 – ' ( ) M 1 K s1 x 2 x 1 – ( ) F K d x 2 ' x 1 ' – ( ) K s2 – x 2 K d x 2 D x 1 D – ( ) – K s1 x 2 x 1 – ( ) – M 2 x 2 D 2 = x 2 K s2 – K d D – K s1 – M 2 D 2 – ( ) x 1 K d D – K s1 – ( ) = x 1 x 2 K s2 K d D K s1 M 2 D 2 + + + K d D K s1 + ------------------------------------------------------------- ¸ , ¸ _ = F ∑ K d x 2 ' x 1 ' – ( ) K s1 x 2 x 1 – ( ) F – + M 1 x 1 '' = = K d x 2 D x 1 D – ( ) K s1 x 2 x 1 – ( ) F – + M 1 x 1 D 2 = x 1 K d D – K s1 – M 1 D 2 – ( ) x 2 K d D K s1 + ( ) + F = (1) (2) page 214 Figure 167 Developing an input output equation This particular solution of the differential equation will yield the steady-state dis- placement of the upper mass. This can then be used to find the needed spring coefficient. x 2 K s2 K d D K s1 M 2 D 2 + + + K d D K s1 + ------------------------------------------------------------- ¸ , ¸ _ K d D – K s1 – M 1 D 2 – ( ) x 2 K d D K s1 + ( ) + F = The solution begins by combining equations (1) and (2) and inserting the.numerical values for the lower mass, spring and damper. We can also limit the problem by selecting a mass value for the upper mass. M 1 1Kg = K s1 2 N m ---- = K d 0.5 Ns m ------ = x 2 K s2 0.5D 2 D 2 + + + 0.5D 2 + ------------------------------------------------- ¸ , ¸ _ 0.5D – 2 – D 2 – ( ) x 2 0.5D 2 + ( ) + F = x 2 D 4 1 – ( ) D 2 K s2 ( ) D 1 0.5K s2 – ( ) 2K s2 – ( ) + + + ( ) F 0.5D 2 + ( ) = x 2 D 2 0.5D 2 K s2 + + + ( ) D 2 0.5D – 2 – ( ) x 2 0.5D 2 + ( ) 2 + F 0.5D 2 + ( ) = M 2 1Kg = This can now be converted back to a differential equation and combined with the force. d dt ----- ¸ , ¸ _ – 4 x 2 K s2 d dt ----- ¸ , ¸ _ 2 x 2 0.5K s2 d dt ---- - ¸ , ¸ _ x 2 – 2K s2 x 2 – + 0.5 d dt ---- - ¸ , ¸ _ F 2F + = d dt ----- ¸ , ¸ _ – 4 x 2 K s2 d dt ----- ¸ , ¸ _ 2 x 2 0.5K s2 d dt ---- - ¸ , ¸ _ x 2 – 2K s2 x 2 – + 0.5 d dt ---- - ¸ , ¸ _ 5 6t ( ) sin 2 5 ( ) 6t ( ) sin + = d dt ----- ¸ , ¸ _ – 4 x 2 K s2 d dt ----- ¸ , ¸ _ 2 x 2 0.5K s2 d dt ---- - ¸ , ¸ _ x 2 – 2K s2 x 2 – + 15 6t ( ) cos 10 6t ( ) sin + = page 215 Figure 168 Finding the particular solution The particular solution begins with a guess. d dt ----- ¸ , ¸ _ – 4 x 2 K s2 d dt ----- ¸ , ¸ _ 2 x 2 0.5K s2 d dt ---- - ¸ , ¸ _ x 2 – 2K s2 x 2 – + 15 6t ( ) cos 10 6t ( ) sin + = x p A 6t sin B 6t cos + = d dt ----- ¸ , ¸ _ x p 6A 6t cos 6B 6t sin – = d dt ----- ¸ , ¸ _ 2 x p 36 – A 6t sin 36B 6t cos – = 6t ( ) sin 1296A – 36AK s2 – 0.5K s2 6B 2K s2 A – + ( ) 10 6t ( ) sin = d dt ----- ¸ , ¸ _ 3 x p 216 – A 6t cos 216B 6t sin + = d dt ----- ¸ , ¸ _ 4 x p 1296A 6t sin 1296B 6t cos + = 6t ( ) cos 1296B – 36BK s2 – 0.5 – ( )K s2 6A 2K s2 B – + ( ) 15 6t ( ) cos = A 1296 – 38K s2 – ( ) B 3K s2 ( ) + 10 = A 3K s2 – ( ) B 1296 – 38K s2 – ( ) + 15 = B 10 A 1296 38K s2 + ( ) + 3K s2 ------------------------------------------------------ = A 3K s2 – ( ) 10 A 1296 38K s2 + ( ) + 3K s2 ------------------------------------------------------ 1296 – 38K s2 – ( ) + 15 = A 9K s2 2 – ( ) 10 A 1296 38K s2 + ( ) + ( ) 1296 – 38K s2 – ( ) + 45K s2 = A 9K s2 2 – 1296 – 38K s2 – ( ) ------------------------------------------ ¸ , ¸ _ A 1296 38K s2 + ( ) + 45K s2 1296 – 38K s2 – ( ) ------------------------------------------ 10 – = A 45K s2 1296 – 38K s2 – ( ) ------------------------------------------ 10 – 9K s2 2 – 1296 – 38K s2 – ( ) ------------------------------------------ 1296 38K s2 + ( ) + -------------------------------------------------------------------------------------- = A 45K s2 10 1296 38K s2 + ( ) + 9K s2 2 – 1296 38K s2 + ( ) 1296 – 38K s2 – ( ) + ------------------------------------------------------------------------------------------------------- = A 425K 2s 12960 + 1453K 2s 2 – 98496K 2s – 1679616 – ---------------------------------------------------------------------------------- = page 216 Figure 169 Finding the particular solution (cont’d) Finally the magnitude of the particular solution is calculated and set to the desired amplitude of 0.1N. This is then used to calculate the spring coefficient. The value for B can then be found. B 10 425K 2s 12960 + 1453K 2s 2 – 98496K 2s – 1679616 – ---------------------------------------------------------------------------------- ¸ , ¸ _ 1296 38K s2 + ( ) + 3K s2 ------------------------------------------------------------------------------------------------------------------------------------------ = B 10 1453K 2s 2 – 98496K 2s – 1679616 – ( ) 425K 2s 12960 + ( ) 1296 38K s2 + ( ) + 3K s2 1453K 2s 2 – 98496K 2s – 1679616 – ( ) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- = B 1620K 2s 2 2.097563 8 ×10 K 2s + 3K s2 1453K 2s 2 – 98496K 2s – 1679616 – ( ) --------------------------------------------------------------------------------------------------- = B 540K 2s 69918768 + 1453K 2s 2 – 98496K 2s – 1679616 – ---------------------------------------------------------------------------------- = amplitude A 2 B 2 + = 0.1 425K 2s 12960 + 1453K 2s 2 – 98496K 2s – 1679616 – ---------------------------------------------------------------------------------- ¸ , ¸ _ 2 540K 2s 69918768 + 1453K 2s 2 – 98496K 2s – 1679616 – ---------------------------------------------------------------------------------- ¸ , ¸ _ 2 + = A value for the spring coefficient was then found using Mathcad to get a value of 662N/m. page 217 Figure 170 Calculation of the spring coefficient 6.5 SUMMARY • The differential operator can be manipulated algebraically • Equations can be manipulated into input-output forms and solved as normal dif- ferential equations 6.6 PRACTICE PROBLEMS 1. Develop the input-output equation for the mechanical system below. There is viscous damping between the block and the ground. A force is applied to cause the mass the accelerate. 2. Find the input-output form for the following equations. 3. The following differential equations were converted to the matrix form shown. Use Cramer’s rule to find ‘y’. M B x F (ans. x'' M ( ) x' B ( ) + F = x 1 '' x 1 ' 2x 1 x 2 ' – x 2 – + + 0 = x 1 ' – x 1 – x 2 '' x 2 ' x 2 + + + F = y'' 2x + F 10 ------ = 7y' 4y 9x'' 3x + + + 0 = D 2 ( ) 2 ( ) 7D 4 + ( ) 9D 2 3 + ( ) y x F 10 ----- - 0 = page 218 4. Find the input-output equations for the systems below. Here the input is the torque on the left hand side. 5. Write the input-output equations for the mechanical system below. The input is force ‘F’, and the outputs are ‘y’ and the angle theta. Include the inertia of both masses, and gravity for mass y F 10 ------ 2 ( ) 0 9D 2 3 + ( ) D 2 ( ) 2 ( ) 7D 4 + ( ) 9D 2 3 + ( ) -------------------------------------------------------- F 10 ----- - 9D 2 3 + ( ) D 2 9D 2 3 + ( ) 2 7D 4 + ( ) – -------------------------------------------------------------- F 0.9D 2 0.3 + ( ) 9D 4 3D 2 + 14D – 8 – ---------------------------------------------------- = = = (ans. y 9D 4 3D 2 + 14D – 8 – ( ) F 0.9D 2 0.3 + ( ) = d dt ----- ¸ , ¸ _ 4 y 9 ( ) d dt ----- ¸ , ¸ _ 2 y 3 ( ) d dt ----- ¸ , ¸ _ 1 y 14 – ( ) y 8 – ( ) + + + d dt ----- ¸ , ¸ _ 2 F 0.9 ( ) F 0.3 ( ) + = τ B 1 B 2 J 1 J 2 K s1 K s2 θ 1 θ 2 page 219 ‘M’. K K y F M R θ J M page 220 (ans. θ R K θR ( ) ( ) R K y – θR – ( ) ( ) y F+Mg M K y – θR – ( ) M ∑ R K θR ( ) ( ) – R K y – θR – ( ) ( ) + J M θ'' = = R 2 Kθ RKy R 2 Kθ + + J M – θ'' = θ 2R 2 K J M D 2 + RK – ---------------------------------- ¸ , ¸ _ y = F ∑ K y – θR – ( ) F – Mg – My'' = = K y θR + ( ) F Mg + + M – yD 2 = θ KR ( ) F Mg + + y MD 2 – K – ( ) = θ KR ( ) y MD 2 K + ( ) + F – Mg – = θ KR ( ) θ 2R 2 K J M D 2 + RK – ---------------------------------- ¸ , ¸ _ MD 2 K + ( ) + F – Mg – = for the theta output equation; θ K – 2 R 2 ( ) θ 2R 2 K J M D 2 + ( ) MD 2 K + ( ) + FKR MgKR + = θ K – R 2RMD 2 2RK J M MD 4 KR ------------------- J M D 2 R ------------- + + + + ¸ , ¸ _ F Mg + = d dt ----- ¸ , ¸ _ 4 θ J M M KR ------------ ¸ , ¸ _ d dt ----- ¸ , ¸ _ 4 θ 2RM J M R ------ + ¸ , ¸ _ θ KR ( ) + + FKR MgKR + = for the y output equation; y RK – 2R 2 K J M D 2 + ---------------------------------- ¸ , ¸ _ KR ( ) y MD 2 K + ( ) + F – Mg – = y 2R 2 MD 2 J M D 4 M K ------------------- K2R 2 J M D 2 R 2 K – + + + ¸ , ¸ _ F 2R 2 J M D 2 K ------------- + ¸ , ¸ _ – Mg 2R 2 JMD 2 K --------------- + ¸ , ¸ _ – = d dt ---- - ¸ , ¸ _ 4 y J M M K ------------ ¸ , ¸ _ d dt ----- ¸ , ¸ _ 2 y 2R 2 M J M + ( ) y R 2 K ( ) + + d dt ----- ¸ , ¸ _ 2 F J M K ------ ¸ , ¸ _ F 2R 2 ( ) 2 – MgR 2 ( ) + + = J M page 221 6. The applied force ‘F’ is the input to the system, and the output is the displacement ‘x’. a) What is the steady-state response for an applied force F(t) = 10cos(t + 1) N ? b) Find x(t), given F(t) = 10N for t >= 0 seconds. 6.7 REFERENCES Irwin, J.D., and Graf, E.R., Industrial Noise and Vibration Control, Prentice Hall Publishers, 1979. Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition, John Wiley and Sons, Inc., 1995. K 1 = 500 N / m K 2 = 1000 N / m x M = 10kg F w page 222 7. ELECTRICAL SYSTEMS 7.1 INTRODUCTION A voltage is a pull or push acting on electrons. The voltage will produce a current when the electrons can flow through a conductor. The more freely the electrons can flow, the lower the resistance of a material. Most electrical components are used to control this flow. 7.2 MODELING Kirchoff’s voltage and current laws are shown in Figure 171. The node current law holds true because the current flow in and out of a node must total zero. If the sum of cur- rents was not zero then electrons would be appearing and disappearing at that node, thus violating the law of conservation of matter. The loop voltage law states that the sum of all rises and drops around a loop must total zero. Figure 171 Kirchoff’s laws The simplest form of circuit analysis is for DC circuits, typically only requiring algebraic manipulation. In AC circuit analysis we consider the steady-state response to a Topics: Objectives: • To apply analysis techniques to circuits • Basic components; resistors, power sources, capacitors, inductors and op-amps • Device impedance • Example circuits I node ∑ 0 = V loop ∑ 0 = node current loop voltage page 223 sinusoidal input. Finally the most complex is transient analysis, often requiring integra- tion, or similar techniques. • DC (Direct Current) - find the response for a constant input. • AC (Alternating Current) - find the steady-state response to an AC input. • Transient - find the initial response to changes. There is a wide range of components used in circuits. The simplest are passive, such as resistors, capacitors and inductors. Active components are capable of changing their behaviors, such as op-amps and transistors. A list of components that will be dis- cussed in this chapter are listed below. • resistors - reduce current flow as described with ohm’s law • voltage/current sources - deliver power to a circuit • capacitors - pass current based on current flow, these block DC currents • inductors - resist changes in current flow, these block high frequencies • op-amps - very high gain amplifiers useful in many forms 7.2.1 Resistors Resistance is a natural phenomenon found in all materials except superconductors. A resistor will oppose current flow as described by ohm’s law in Figure 172. The resis- tance value is assumed to be linear, but in actuality it varies with conductor temperature. Figure 172 Ohm’s law The voltage divider example in Figure 173 illustrates the methods for analysis of circuits using resistors. In this circuit an input voltage is supplied on the left hand side. The output voltage on the right hand side will be some fraction of the input voltage. If the output resistance is very large, no current will flow, and the ratio of output to input volt- ages is determined by the ratio of the resistance between R1 and R2. To prove this the cur- + - V I V IR = R I V R --- = page 224 rents into the center node are summed and set equal to zero. The equations are then manipulated to produce the final relationship. Figure 173 A voltage divider circuit If two resistors are in parallel or series they can be replaced with a single equiva- lent resistance, as shown in Figure 174. Vi Vo + - + - R1 R2 I 2 I 1 I 3 I 1 I 2 I 3 + + 0 = V i V o – R 1 ----------------- ¸ , ¸ _ ∴ I 2 0 V o – R 2 --------------- ¸ , ¸ _ + + 0 = Assume the output resistance is large, so I2 is negligible. V i V o – R 1 ----------------- ¸ , ¸ _ ∴ V o – R 2 --------- ¸ , ¸ _ + 0 = V ∴ o 1 R 1 ------ 1 R 2 ------ + ¸ , ¸ _ V i 1 R 1 ------ ¸ , ¸ _ = V ∴ o R 1 R 2 + R 1 R 2 ------------------ ¸ , ¸ _ V i 1 R 1 ------ ¸ , ¸ _ = V o V i ------ ∴ R 2 R 1 R 2 + ------------------ = page 225 Figure 174 Equivalent resistances for resistors in parallel and series 7.2.2 Voltage and Current Sources A voltage source will supply a voltage to a circuit, by varying the current as required. A current source will supply a current to a circuit, by varying the voltage as required. The schematic symbols for voltage and current sources are shown in Figure 175. The supplies with ’+’ and ’-’ symbols provide DC voltages, with the symbols indicating polarity. The symbol with two horizontal lines is a battery. The circle with a sine wave is an AC voltage supply. The last symbol with an arrow inside the circle is a current supply. The arrow indicates the direction of positive current flow. R 2 R 1 R eq R 1 R 2 + = R 2 R 1 1 R eq -------- 1 R 1 ------ 1 R 2 ------ + = R eq 1 1 R 1 ------ 1 R 2 ------ + ------------------- = R eq R 1 R 2 R 1 R 2 + ------------------ = series resistors parallel resistors page 226 Figure 175 Voltage and current sources A circuit containing a voltage source and resistors is shown in Figure 176. The cir- cuit is solved using the node voltage method. Figure 176 A circuit calculation + V - + V - + V - I V R1 R2 R3 + Vo - Vi + - Find the output voltage Vo. Examining the circuit there are two loops, but only one node, so the node current meth- ods is the most suitable for calculations. The currents into the upper right node, Vo, will be solved. I ∑ V o V i – R 1 ----------------- V o R 2 ------ V o R 3 ------ + + 0 = = Aside: when doing node-cur- rent methods, select cur- rents out of a node as positive, and in negative. This will reduce the chances of careless mis- takes. V o 1 R 1 ------ 1 R 2 ------ 1 R 3 ------ + + ¸ , ¸ _ V i 1 R1 ------- ¸ , ¸ _ = V o R 1 R 2 R 3 + + R 1 R 2 R 3 ------------------------------- ¸ , ¸ _ V i 1 R1 ------- ¸ , ¸ _ = V o V i R 2 R 3 R 1 R 2 R 3 + + ------------------------------- ¸ , ¸ _ = page 227 Figure 177 Drill problem: Mesh solution of voltage divider Solve the circuit in Figure 176 using the loop voltage method. page 228 Figure 178 Drill problem: Mesh solution of voltage divider Dependant (variable) current and voltage sources are shown in Figure 179. The voltage and current values of these supplies are determined by their relationship to some other circuit voltage or current. The dependant voltage source will be accompanied by a ’+’ and ’-’ symbol, while the current source has an arrow inside. Figure 179 Dependant voltage sources Solve the voltage divider problem in Figure 173 using the loop current method. Hint: Put a voltage supply on the left, and an output resistor on the right. Remember that the output resistance should be infinite. + - V f( ) = I f( ) = page 229 Figure 180 Drill problem: Find the currents in the circuit above 7.2.3 Capacitors Capacitors are composed of two isolated metal plates very close together. When a voltage is applied across the capacitor, electrons will be forced into one plate, and pulled out of the other plate. Temporarily this creates a small current flow until the plates reach equilibrium. So, any voltage change will result in some current flow. In practical terms this means that the capacitor will block any DC voltages, except for transient effects. But, high frequency AC currents will be pass through the device. The equation for a capacitor and schematic symbols are given in Figure 181. What if the input current is 1sin(2t)A? 1A 2ohm + V1 - + - V=f(V1) 3ohm I f(V) = 3V Find the output current, I. page 230 Figure 181 Capacitors The symbol on the left is for an electrolytic capacitor. These contain a special fluid that increases the effective capacitance of the device but requires that the positive and neg- ative sides must be observed in the circuit. (Warning: reversing the polarity on an electro- lytic capacitor can make them explode.) The other capacitor symbol is for a regular capacitor. Figure 182 Drill problem: Find the current through the capacitor + C C I C d dt ----- ¸ , ¸ _ V CDV = = I + V - Find the current as a function of time. V= I + - 5cos(10t)V C=1uF page 231 7.2.4 Inductors While a capacitor will block a DC current, and inductor will pass it. Inductors are basically coils of wire. When a current flows through the coils, a magnetic field is gener- ated. If the current through the inductor changes then the magnetic field must change, oth- erwise the field is maintained without effort (i.e., voltage). Therefore the inductor resists changes in the current. The schematic symbol and relationship for an inductor are shown in Figure 183. Figure 183 An inductor An inductor is normally constructed by wrapping wire in loops about a core. The core can be hollow, or be made of ferrite to increase the inductance. Inductors usually cost more than capacitors. In addition, inductors are susceptible to interference when metals or other objects disturb their magnetic fields. When possible, designers normally try to avoid using inductors in circuits. I + V - L V L d dt ---- - ¸ , ¸ _ I LDI = = page 232 Figure 184 Drill problem: Find the current through the inductor 7.2.5 Op-Amps The ideal model of an op-amp is shown in Figure 185. On the left hand side are the inverting and non-inverting inputs. Both of these inputs are assumed to have infinite impedance, and so no current will flow. Op-amp application circuits are designed so that the inverting and non-inverting inputs are driven to the same voltage level. The output of the op-amp is shown on the right. In circuits op-amps are used with feedback to perform standard operations such as those listed below. • adders, subtractors, multipliers, and dividers - simple analog math operations • amplifiers - increase the amplitude of a signal • impedance isolators - hide the resistance of a circuit while passing a voltage Find the current as a function of time. V= I + - 5cos(10t)V L=1mH page 233 Figure 185 An ideal op-amp A simple op-amp example is given in Figure 186. As expected the voltages on both of the op-amp inputs are the same. This is a function of the circuit design. (Note: most op- amp circuits are designed to force both inputs to have the same voltage, so it is always rea- sonable to assume they are the same.) The non-inverting input is connected directly to ground, so it will force both of the inputs to 0V. When the currents are summed at the inverting input, an equation with both the input and output voltages is obtained. The final equation shows the system is a simple multiplier, or amplifier. The gain of the amplifier is determined by the ratio of the input and feedback resistors. + - V- V+ I+ I- Vo I - I + 0 = = V - V + = Note: for analysis use, page 234 Figure 186 A simple inverting operational amplifier configuration An op-amp circuit that can subtract signals is shown in Figure 187. - + + Vi - + Vo - R1 R2 The voltage at the non-inverting input will be 0V, by design the voltage at the invert- ing input will be the same. V + 0V = V - V + 0V = = The currents at the inverting input can be summed. I V- ∑ V - V i – R 1 ---------------- V - V o – R 2 ----------------- + 0 = = 0 V i – R 1 -------------- 0 V o – R 2 --------------- + 0 = V o R 2 V i – R 1 -------------- = V o R 2 – R 1 --------- ¸ , ¸ _ V i = page 235 Figure 187 Op-amp example For ideal op-amp problems the node voltage method is normally the best choice. The equations for the circuit in Figure 187 and derived in Figure 188. The general approach to this solution is to sum the currents into the inverting and non-inverting input nodes. Notice that the current into the op-amp is assumed to be zero. Both the inverting and non-inverting input voltages are then set to be equal. After that algebraic manipulation results in a final expression for the op-amp. Notice that if all of the resistor values are the same then the circuit becomes a simple subtractor. Find the input/output ratio, + - + Vi - + Vo - + Vref - R1 R2 R3 R4 R5 page 236 Figure 188 Op-amp example (continued) An op-amp (operational amplifier) has an extremely high gain, typically 100,000 times. The gain is multiplied by the difference between the inverting and non-inverting terminals to form an output. A typical op-amp will work for signals from DC up to about V ref R 4 R 4 R 5 + ------------------ ¸ , ¸ _ V i R 2 R 1 R 2 + ------------------ ¸ , ¸ _ V o R 1 R 1 R 2 + ------------------ ¸ , ¸ _ + = Now the equations can be combined. V - V + = V o R 1 R 1 R 2 + ------------------ ¸ , ¸ _ V i R 2 R 1 R 2 + ------------------ ¸ , ¸ _ V ref R 4 R 4 R 5 + ------------------ ¸ , ¸ _ – = V o V i R 2 R 1 ------ ¸ , ¸ _ V ref R 4 R 1 R 2 + ( ) R 1 R 4 R 5 + ( ) ------------------------------ ¸ , ¸ _ – = Note: normally node voltage methods work best with op-amp circuits, although others can be used if the non-ideal op-amp model is used. First sum the currents at the inverting and non-inverting op-amp terminals. I V+ ∑ V + V i – R 1 ----------------- V + V o – R 2 ------------------ + 0 = = I V- ∑ V - V ref – R 5 -------------------- V - R 4 ------ + 0 = = V + 1 R 1 ------ 1 R 2 ------ + ¸ , ¸ _ V i 1 R 1 ------ ¸ , ¸ _ V o 1 R 2 ------ ¸ , ¸ _ + = V - 1 R 4 ------ 1 R 5 ------ + ¸ , ¸ _ V ref 1 R 5 ------ ¸ , ¸ _ = V + R 1 R 2 + R 1 R 2 ------------------ ¸ , ¸ _ V i 1 R 1 ------ ¸ , ¸ _ V o 1 R 2 ------ ¸ , ¸ _ + = V + V i R 2 R 1 R 2 + ------------------ ¸ , ¸ _ V o R 1 R 1 R 2 + ------------------ ¸ , ¸ _ + = V - V ref R 4 R 4 R 5 + ------------------ ¸ , ¸ _ = (1) (2) page 237 100KHz. When the op-amp is being used for high frequencies or large gains, the model of the op-amp in Figure 189 should be used. This model includes a large resistance between the inverting and non-inverting inputs. The voltage difference drives a dependent voltage source with a large gain. The output resistance will limit the maximum current that the device can produce. Figure 189 A non-ideal op-amp model 7.3 IMPEDANCE Circuit components can be represented in impedance form as shown in Figure 190. When represented this way the circuit solutions can focus on impedances, ’Z’, instead of resistances, ’R’. Notice that the primary difference is that the differential operator has been replaced. In this form we can use impedances as if they are resistances. Figure 190 Impedances for electrical components + - V + V – r n r o A V + V - – ( ) V o r n 1MΩ > typically, A 10 5 > r o 100Ω < V t ( ) RI t ( ) = Resistor V t ( ) 1 C ---- I t ( ) t d ∫ = Capacitor V t ( ) L d dt ----- I t ( ) = Inductor Time domain Device Z R = Z 1 DC -------- = Z LD = Impedance Note: Impedance is like resistance, except that it includes time vari- ant features also. V ZI = page 238 When representing component values with impedances the circuit solution is done as if all circuit components are resistors. An example of this is shown in Figure 191. Notice that the two impedances at the right (resistor and capacitor) are equivalent to two resistors in parallel, and the overall circuit is a voltage divider. The impedances are written beside the circuit elements. Figure 191 A impedance example for a circuit 50VDC + - DL 1/DC R + Vo - t=0sec Treat the circuit as a voltage divider, V o 50V R 1 DCR + ---------------------- ¸ , ¸ _ DL R 1 DCR + ---------------------- ¸ , ¸ _ + ------------------------------------------ 50V R D 2 RLC DL R + + ------------------------------------------- ¸ , ¸ _ = = 50VDC + - 1 1 1 DC -------- ¸ , ¸ _ -------------- 1 R --- + ------------------------ 1 DC 1 R --- + ------------------ R RCD 1 + ---------------------- = = DL Find the equivalent for the capacitor and resistor in parallel. page 239 7.4 EXAMPLE SYSTEMS The list of instructions can be useful when approaching a circuits problem. The most important concept to remember is that a minute of thinking about the solution approach will save ten minutes of backtracking and fixing mistakes. 1. Look at the circuit to determine if it is a standard circuit type such as a voltage divider, current divider or an op-amp inverting amplifier. If so, use the standard solution to solve the problem. 2. Otherwise, consider the nodes and loops in the circuit. If the circuit contains fewer loops, select the current loop method. If the circuit contains fewer nodes, select the node voltage method. Before continuing, verify that the select method can be used for the circuit. 3. For the node voltage method define node voltages and current directions. For the current loop method define current loops and indicate voltage rises or drops by adding ’+’ or ’-’ signs. 4. Write the equations for the loops or nodes. 5. Identify the desired value and eliminate unwanted values using algebra tech- niques. 6. Use numerical values to find a final answer. The circuit in Figure 192 could be solved with two loops, or two nodes. An arbi- trary decision is made to use the current loop method. The voltages around each loop are summed to provide equations for each loop. page 240 Figure 192 Example problem The equations in Figure 192 are manipulated further in Figure 193 to develop an input-output equation for the second current loop. This current can be used to find the cur- rent through the output resistor R2. The output voltage can then be found by multiplying the R2 and I2. + V - R1 L C R2 + Vo - First, sum the voltages around the loops and then eliminate I1. I 1 I 2 V L1 ∑ V – R 1 I 1 L DI 1 DI 2 – ( ) + + 0 = = Note: when summing voltages in a loop remember to deal with sources that increase the voltage by flipping the sign. V L2 ∑ L DI 2 DI 1 – ( ) I 2 CD -------- R 2 I 2 + + 0 = = R 1 LD + ( )I 1 V LD ( )I 2 + = L DI 2 DI 1 – ( ) I 2 CD -------- R 2 I 2 + + 0 = I 1 V R 1 LD + -------------------- LD R 1 LD + -------------------- ¸ , ¸ _ I 2 + = DL ( )I 1 LD 1 CD -------- R 2 + + ¸ , ¸ _ I 2 = (1) (4) I 1 1 1 CLD 2 -------------- R 2 LD -------- + + ¸ , ¸ _ I 2 = (2) (3) page 241 Figure 193 Example problem (continued) The equations can also be manipulated into state equations, as shown in Figure 194. In this case a dummy variable is required to replace the two first derivatives in the first equation. The dummy variable is used in place of I1, which now becomes an output variable. In the remaining state equations I1 is replaced by q1. In the final matrix form the state equations are in one matrix, and the output variable must be calculated separately. First, sum the voltages around the loops and then eliminate I1. I 1 V R 1 LD + -------------------- LD R 1 LD + -------------------- ¸ , ¸ _ I 2 + 1 1 CLD 2 -------------- R 2 LD ------- - + + ¸ , ¸ _ I 2 = = V R 1 LD + -------------------- 1 1 CLD 2 -------------- R 2 LD ------- - LD R 1 LD + -------------------- – + + ¸ , ¸ _ I 2 = V R 1 LD + -------------------- CLD 2 1 CDR 2 + + ( ) R 1 LD + ( ) CL 2 D 3 – CLD 2 --------------------------------------------------------------------------------------------------- ¸ , ¸ _ I 2 = I 2 CLD 2 R 1 LD + ( ) CLD 2 1 CDR 2 + + ( ) R 1 LD + ( ) CL 2 D 3 – ( ) ---------------------------------------------------------------------------------------------------------------------------------- ¸ , ¸ _ V = I 2 CLD 2 CL R 1 R 2 + ( )D 3 L CR 1 2 2CR 1 R 2 L + + ( )D 2 R 1 CR 1 R 2 2L + ( )D R 1 2 ( ) + + + ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ¸ , ¸ _ V = Convert it to a differential equation. CL R 1 R 2 + ( )I 2 ''' L CR 1 2 2CR 1 R 2 L + + ( )I 2 '' R 1 CR 1 R 2 2L + ( )I 2 ' R 1 2 ( )I 2 + + + CLV'' = page 242 Figure 194 Example problem (continued) State equations can also be developed using equations (1) and (3). R 1 I 1 LI 1 ' + V LI 2 ' + = LI 2 '' LI 1 '' – I 2 C ---- R 2 I 2 ' + + 0 = (1) becomes (3) becomes I 1 ' I 2 ' – V L --- R 1 L ------ I 1 – = q 1 ' V L --- R 1 L ------ I 1 – = q 1 I 1 I 2 – = d dt ----- q 1 I 2 R 1 L ------ – R 1 L ------ – R 1 – R 1 – 1 C ---- + q 1 I 2 V L --- V + = (12) (10) (13) LI 1 ' LI 2 ' – V R 1 I 1 – = V R 1 I 1 – I 2 C ---- R 2 I 2 ' + + 0 = q 1 ' V L --- R 1 L ------ q 1 I 2 + ( ) – = V R 1 q 1 I 2 + ( ) – I 2 C ---- + R 2 I 2 ' – = I 2 ' I 2 R 1 – 1 C ---- + ¸ , ¸ _ q 1 R 1 – ( ) V + + = q 1 ' q 1 R 1 L ------ – ¸ , ¸ _ I 2 R 1 L ------ – ¸ , ¸ _ + V L --- + = These can be put in matrix form, I 1 q 1 I 2 + = (11) I 1 1 1 q 1 I 2 = page 243 Figure 195 Drill problem: Use the node voltage method solve the problem in Figure 192 using the node voltage method. page 244 Figure 196 Drill problem: Find the state equation Find the equation relating the output and input voltages, - + Ri Rf C Vin Vout page 245 The circuit in Figure 197 can be solved as a voltage divider when the capacitor is represented as an impedance. In this case the result is a first-order differential equation. Figure 197 Circuit solution using impedances The first-order differential equation in Figure 197 is continued in Figure 198 where the equation is integrated. The solution is left in variable form, except for the supply volt- age. t=0 C R + - + Vo - V s 3 t cos = V o V s Z R Z R Z C + ------------------- ¸ , ¸ _ = As normal we relate the source voltage to the output voltage. The we find the values for the various terms in the frequency domain. Z R R = Z C 1 DC -------- = Next, we may combine the equations, and convert it to a differential equation. V o V s R R 1 DC -------- + ------------------ ¸ , ¸ _ = where, V o V s CRD CRD 1 + ---------------------- ¸ , ¸ _ = V o CRD 1 + ( ) V s CRD ( ) = V o ' CR ( ) V o + V s ' CR ( ) = V o ' V o 1 CR -------- ¸ , ¸ _ + V s ' = page 246 Figure 198 Circuit solution using impedances (continued) First write the homogeneous solution using the known relationship. V o ' V o 1 CR -------- ¸ , ¸ _ + 0 = V h C 1 e t CR -------- – = Next, the particular solution can be determined, starting with a guess. V o ' V o 1 CR -------- ¸ , ¸ _ + d dt ----- ¸ , ¸ _ 3 t cos ( ) 3 t sin – = = V p A t sin B t cos + = yields V p ' A t cos B t sin – = A t cos B t sin – ( ) A t sin B t cos + ( ) 1 CR -------- ¸ , ¸ _ + 3 t sin – = A B 1 CR -------- ¸ , ¸ _ + 0 = A B 1 – CR -------- ¸ , ¸ _ = B – A 1 CR -------- ¸ , ¸ _ + 3 – = B – B 1 – CR -------- ¸ , ¸ _ 1 CR -------- ¸ , ¸ _ + 3 – = B 1 C 2 R 2 ------------ 1 + ¸ , ¸ _ 3 = B 3C 2 R 2 1 C 2 R 2 + ---------------------- = A 3C 2 R 2 1 C 2 R 2 + ---------------------- ¸ , ¸ _ 1 – CR ------- - ¸ , ¸ _ 3 – CR 1 C 2 R 2 + ---------------------- = = V 0 V h V p + C 1 e t CR -------- – A 2 B 2 + t B A --- ¸ , ¸ _ atan + ¸ , ¸ _ sin + = = V p A 2 B 2 + t B A --- ¸ , ¸ _ atan + ¸ , ¸ _ sin = The homogeneous and particular solutions can now be combined. The system will be assumed to be at rest initially. 0 C 1 e 0 A 2 B 2 + 0 B A --- ¸ , ¸ _ atan + ¸ , ¸ _ sin + = C 1 A 2 B 2 + – 0 B A --- ¸ , ¸ _ atan + ¸ , ¸ _ sin = page 247 7.5 PERMANENT MAGNET DC MOTORS DC motors apply a torque between the rotor and stator that is related to the applied voltage/current. When a voltage is applied the torque will cause the rotor to accelerate. For any voltage and load on the motor there will tend to be a final angular velocity due to fric- tion and drag in the motor. And, for a given voltage the ratio between steady-state torque and speed will be a straight line, as shown in Figure 199. Figure 199 Torque speed curve for a permanent magnet DC motor The basic equivalent circuit model is shown in Figure 200, includes the rotational inertia of the rotor and any attached loads. On the left hand side is the resistance of the motor and the ’back emf’ dependent voltage source. On the right hand side the inertia components are shown. The rotational inertia J1 is the motor rotor, and the second inertia is an attached disk. ω T voltage/current increases page 248 Figure 200 The torque and inertia in a basic motor model These basic equations can be manipulated into the first-order differential equation in Figure 201. Figure 201 The first-order model of a motor + - R Voltage + - Supply J 2 J 1 I Vs T ω , V m Next, consider the power in the motor, P V m I Tω KIω = = = Because a motor is basically wires in a magnetic field, the electron flow (current) in the wire will push against the magnetic field. And, the torque (force) generated will be proportional to the current. T m KI = V m ∴ Kω = M ∑ T m T load – J d dt ---- - ¸ , ¸ _ ω = = Consider the dynamics of the rotating masses by summing moments. T m ∴ J d dt ---- - ¸ , ¸ _ ω T load + = I ∴ T m K ------ = The current-voltage relationship for the left hand side of the equation can be writ- ten and manipulated to relate voltage and angular velocity. I V s V m – R ------------------ = T m K ------ ∴ V s Kω – R -------------------- = J d dt ----- ¸ , ¸ _ ω T load + K ------------------------------------ ∴ V s Kω – R -------------------- = d dt ----- ¸ , ¸ _ ω ω K 2 JR ------ ¸ , ¸ _ + ∴ V s K JR ------ ¸ , ¸ _ T load J ------------ – = page 249 7.6 INDUCTION MOTORS • The equivalent circuit for an AC motor is given below. Figure 202 Basic model of an induction motor • The torque relationships are given below, V L s R s L r R r L m R L R L 1 f – f ----------R r = I L page 250 7.7 BRUSHLESS SERVO MOTORS - the motors use a permanent magnet on the rotor, and coils on the stator. M ∑ T rotor T load – J d dt ---- -ω = = First the torques on the motor are summed, page 251 Figure 203 The construction of a brushless servo motor N S permanent windings on stator magnet rotor V a V b V c V t R m d dt -----L + ¸ , ¸ _ I m E + = E K e ω = T K t I m = where, V t terminal voltage across mot orwi ndi ngs = R m resistance of a motor winding = L phase to phase inductance = I m current in winding = E back e.m.f. of motor = K e motor speed constant = ω motor speed = K t motor torque constant = T motor torque = page 252 Figure 204 Basic relationships for a brushless motor Figure 205 An advanced model of a brushless servo motor Figure 206 Typical supply voltages V t R m d dt -----L + ¸ , ¸ _ T K t ----- K e ω + = M ∑ T T load – J d dt -----ω = = where, J combined moments of inertia for the rotor and external loads = T load the applied torque in the syste m = V t R m d dt ----- L + ¸ , ¸ _ J d dt -----ω T load + K t ------------------------------- K e ω + = T J d dt -----ω T load + = V t JR m K t ---------- d dt ----- ω LJ K t ------ d dt ----- ¸ , ¸ _ 2 ω R m K t ------- T load L K t ----- d dt ---- - T load K e ω + + + + = LJ ( ) d dt ----- ¸ , ¸ _ 2 ω JR m ( ) d dt -----ω K e K t ω + + K t V t L d dt -----T load – R m T load – = d dt ----- ¸ , ¸ _ 2 ω R m L ------- d dt -----ω K e K t LJ ------------ω + + K t V t LJ ---------- 1 J --- d dt ---- -T load – R m T load LJ ------------------- – = V t t(ms) page 253 7.8 OTHER TOPICS The relationships in Figure 207 can be used to calculate the power and energy in a system. Notice that the power calculations focus on resistance, as resistances will dissipate power in the form of heat. Other devices, such as inductors and capacitors, store energy, but don’t dissipate it. Figure 207 Electrical power and energy 7.9 SUMMARY • Basic circuit components are resistors, capacitors, inductors op-amps. • node and loop methods can be used to analyze circuits. • Capacitor and inductor impedances can be used as resistors in calculations. 7.10 PRACTICE PROBLEMS 1. Find the combined values for resistors, capacitors and inductors in series and parallel. 2. Consider the following circuit. a) Develop a differential equation for the circuit. b) Put the equation in state variable matrix form. P IV I 2 R V 2 R ------ = = = E Pt = R L C V i V o + - + - page 254 3. Develop differential equations and the input-output equation for the electrical system below. 4. Consider the following circuit. Develop a differential equation for the circuit. 5. Find the input-output equation for the circuit below, and then find the natural frequency and damping coefficient. + - V i R 1 L C R 2 V o + - R 3 L C V i V o + - + - R 1 R 2 Vi L C R2 R1 Vo + - + - (ans. a) V o '' C ( ) V o ' 1 R 1 ------ 1 R 2 ------ + ¸ , ¸ _ V o 1 L --- ¸ , ¸ _ + + V i ' 1 R 1 ------ ¸ , ¸ _ = b) ω n 1 LC ------- = ζ L R 1 R 2 + ( ) 2 CR 1 R 2 ------------------------------- = page 255 6. a) Find the differential equation for the circuit below where the input is Vi, and the output is Vo. b) Convert the equation to an input-output equation. c) Solve the differential equation found in part b) using the numerical values given below. Assume at time t=0, the circuit has the voltage Vo and the first derivative shown below. + - + - Vi Vo L C R (ans. I V o ∑ V o V i – ( ) DL ---------------------- V o ( )DC V o ( ) R ---------- - + + 0 = = Sum currents at node Vo V o V i – V o D 2 LC V o DL R -------------- + + 0 = V o '' LC ( ) V o ' L R --- ¸ , ¸ _ V o + + V i = V o '' LC ( ) V o ' L R --- ¸ , ¸ _ V o + + V i = (ans. L 10mH = C 1µF = R 1KΩ = V i 10V = V o 2V = V o ′ 3 V s --- = at t=0s page 256 7. a) Write the differential equations for the system pictured below. V o '' LC ( ) V o ' L R --- ¸ , ¸ _ V o + + V i = (ans. V o '' 10 2 – 10 6 – ( ) V o ' 10 2 – 10 3 ---------- ¸ , ¸ _ V o + + 10 = V o '' 10 8 – ( ) V o ' 10 5 – ( ) V o + + 10 = V o '' V o ' 10 3 ( ) V o 10 8 ( ) + + 10 9 ( ) = homogeneous; A 2 e At Ae At 10 3 ( ) e At 10 8 ( ) + + 0 = A 2 A 10 3 ( ) 10 8 ( ) + + 0 = A 10 3 – 10 3 ( ) 2 4 10 8 ( ) – t 2 ------------------------------------------------------------- - 500 – 9987j t = = V h C 1 e 500t – 9987t C 2 + ( ) cos = particular; guess V p A = 0 ( ) 0 ( ) 10 3 ( ) A ( ) 10 8 ( ) + + 10 9 ( ) = A 10 = V p 10 = for initial conditions, V o C 1 e 500t – 9987t C 2 + ( ) cos 10 + = 2 C 1 e 500 0 ( ) – 9987 0 ( ) C 2 + ( ) cos 10 + = for t=0, Vo=2V 8 – C 1 C 2 ( ) cos = V o ' 500C – 1 e 500t – 9987t C 2 + ( ) cos 9987C 1 e 500t – 9987t C 2 + ( ) sin – = for t=0, Vo’=3V (1) 3 500C – 1 C 2 ( ) cos 9987C 1 C 2 ( ) sin – = 3 500C – 1 C 2 ( ) cos 9987C 1 C 2 ( ) sin – = 3 4000 – 9987 8 – C 2 ( ) cos -------------------- ¸ , ¸ _ C 2 ( ) sin – = 4003 8 9987 ( ) -------------------- C 2 ( ) sin C 2 ( ) cos -------------------- C 2 ( ) tan = = C 2 0.050 = C 1 8 – C 2 ( ) cos -------------------- 8.01 – = = V o 8.01 – e 500t – 9987t 0.050 + ( ) cos 10 + = page 257 b) Put the equations in input-output form. 8. Given the circuit below, find the ratio between the output and the input. Simplify the results. 9. Develop the differential equation(s) for the system below, and use them to find the response to - + R1 R2 C Vi Vo ans. a) V i 1 – R 1 ------ ¸ , ¸ _ V i ' C – ( ) V o 1 – R 2 ------ ¸ , ¸ _ + + 0 = b) V i 1 – R 1 ------ ¸ , ¸ _ V i ' C – ( ) + V o 1 R 2 ------ ¸ , ¸ _ = + - Vi Vo R1 R2 C ans. V o V i ------ R 2 – R 1 sR 1 R 2 C + -------------------------------- = page 258 the following inputs. Assume that the circuit is off initially. 10. Examine the following circuit and then derive the differential equation. R3 R1 R2 R4 C Vi Vo + - + - R1=R2=R3=R4=1Kohm C=1uF a) V i 5 100t ( ) sin = b) V i 5 1000000t ( ) sin = c) V i 5 = R 1 R 2 L + - V i V o + - + - page 259 11. Examine the following circuit and then derive the differential equation. 12. a) Find the differential equation for the circuit below. R 1 R 2 L + - V i V o + - + - + - Vi + - + - Vo 0.001H 1000Ω 10Ω 1000Ω 1µF page 260 b) Put the differential equation in state variable form and use your calculator to produce a detailed sketch of the output voltage Vo. Assume the system starts at rest, and the input is Vi=5V. 13. a) Write the differential equations for the system pictured below. b) Put the equations in state variable form. c) Use mathcad to find the ratio between input and output voltages for a range of frequencies. The general method is put in a voltage such as Vi=1sin(___t), and see what the magnitude of the output is. Divide the magnitude of the output sine wave by the input magnitude. Note: This should act as a high pass or low pass Create a node between the inductor and resistor Va, and use the node voltage method (ans. I V A ∑ V A V i – ( ) 0.001D ---------------------- V A V – – ( ) 1000 -------------------------- + 0 = = I V – ∑ V – V A – ( ) 1000 -------------------------- V – V o – ( ) 1000 ------------------------- V – V o – ( ) 0.000001D ( ) + + 0 = = 1000000 V A V i – ( ) V A D + 0 = V – V + 0V = = V A V i 1000000 1000000 D + ------------------------------- ¸ , ¸ _ = 1 – ( ) 1000 ------------V i 1000000 1000000 D + ------------------------------- ¸ , ¸ _ V o – ( ) 1000 -------------- V o – ( ) 0.000001D ( ) + + 0 = V o 1 – 0.001D – ( ) V i 1000000 1000000 D + ------------------------------- ¸ , ¸ _ = V o 1000000 – D – 1000D – 0.001D 2 – ( ) 1000000V i = V o '' 10 9 – – ( ) V o ' 1.001 10 3 – ( ) – ( ) V o 1 – ( ) + + V i = XXXXADD UNITSXXXXX d dt -----V o V o ' = d dt -----V o ' 1000000000V i – 1001000V o ' – 1000000000V o – = (ans. page 261 filter. d) Plot a graph of gain against the frequency of the input. 14. Write the differential equation for the following circuit. - + R1 R2 C Vi Vo C=1uF R1=1K R2=1K Vi L R C Vo + - + - page 262 8. FEEDBACK CONTROL SYSTEMS 8.1 INTRODUCTION Every engineered component has some function. A function can be described as a transformation of inputs to outputs. For example this could be an amplifier that accepts a signal from a sensor and amplifies it. Or, consider a mechanical gear box with an input and output shaft. A manual transmission has an input shaft from the motor and from the shifter. When analyzing systems we will often use transfer functions that describe a sys- tem as a ratio of output to input. 8.2 TRANSFER FUNCTIONS Transfer functions are used for equations with one input and one output variable. An example of a transfer function is shown below in Figure 208. The general form calls for output over input on the left hand side. The right hand side is comprised of constants and the ’D’ operator. In the example ’x’ is the output, while ’F’ is the input. Figure 208 A transfer function example Topics: Objectives: • To be able to represent a control system with block diagrams. • To be able to select controller parameters to meet design objectives. • Transfer functions, block diagrams and simplification • Feedback controllers • Control system design output input ----------------- f D ( ) = The general form x F --- 4 D + D 2 4D 16 + + --------------------------------- = An example page 263 If both sides of the example were inverted then the output would become ’F’, and the input ’x’. This ability to invert a transfer function is called reversibility. In reality many systems are not reversible. There is a direct relationship between transfer functions and differential equations. This is shown for the second-order differential equation in Figure 209. The homogeneous equation (the left hand side) ends up as the denominator of the transfer function. The non- homogeneous solution ends up as the numerator of the expression. Figure 209 The relationship between transfer functions and differential equations for a mass-spring-damper example The transfer function for a first-order differential equation is shown in Figure 210. As before the homogeneous and non-homogeneous parts of the equation becomes the denominator and the numerator of the transfer function. x'' 2ζω n x' ω n 2 x + + f M ---- - = xD 2 2ζω n xD ω n 2 x + + f M ---- - = x D 2 2ζω n D ω n 2 + + ( ) f M ---- - = x f -- 1 M ----- ¸ , ¸ _ D 2 2ζω n D ω n 2 + + -------------------------------------------- = particular homogeneous ω n ξ Natural frequency of system, approximate frequency of control system oscillations. Damping factor of system. If < 1 underdamped, and system will oscillate. If =1 critically damped. If < 1 overdamped, and never any oscillation (more like a first-order system). As damping factor approaches 0, the first peak becomes infinite in height. page 264 Figure 210 A first-order system response 8.3 CONTROL SYSTEMS Figure 211 shows a transfer function block for a car. The input, or control variable is the gas pedal angle. The system output, or result, is the velocity of the car. In standard operation the gas pedal angle is controlled by the driver. When a cruise control system is engaged the gas pedal must automatically be adjusted to maintain a desired velocity set- point. To do this a control system is added, in this figure it is shown inside the dashed line. In this control system the output velocity is subtracted from the setpoint to get a system error. The subtraction occurs in the summation block (the circle on the left hand side). This error is used by the controller function to adjust the control variable in the system. Negative feedback is the term used for this type of controller. x' 1 τ ---x + f = xD 1 τ --- x + f = x D 1 τ --- + ¸ , ¸ _ f = x f -- 1 D 1 τ --- + ------------- = page 265 Figure 211 An automotive cruise control system There are two main types of feedback control systems: negative feedback and pos- itive feedback. In a positive feedback control system the setpoint and output values are added. In a negative feedback control the setpoint and output values are subtracted. As a rule negative feedback systems are more stable than positive feedback systems. Negative feedback also makes systems more immune to random variations in component values and inputs. The control function in Figure 211 can be defined many ways. A possible set of rules for controlling the system is given in Figure 212. Recall that the system error is the difference between the setpoint and actual output. When the system output matches the setpoint the error is zero. Larger differences between the setpoint and output will result in larger errors. For example if the desired velocity is 50mph and the actual velocity 60mph, the error is -10mph, and the car should be slowed down. The rules in the figure give a gen- eral idea of how a control function might work for a cruise control system. INPUT (e.g. θgas) SYSTEM (e.g. a car) OUTPUT (e.g. velocity) Control variable v desired v error + _ control car v actual θgas Note: The arrows in the diagram indicate directions so that outputs and inputs are unambiguous. Each block in the diagram represents a transfer function. function page 266 Figure 212 Example control rules In following sections we will examine mathematical control functions that are easy to implement in actual control systems. 8.3.1 PID Control Systems The Proportional Integral Derivative (PID) control function shown in Figure 213 is the most popular choice in industry. In the equation given the ’e’ is the system error, and there are three separate gain constants for the three terms. The result is a control variable value. Figure 213 A PID controller equation Figure 214 shows a basic PID controller in block diagram form. In this case the potentiometer on the left is used as a voltage divider, providing a setpoint voltage. At the output the motor shaft drives a potentiometer, also used as a voltage divider. The voltages from the setpoint and output are subtracted at the summation block to calculate the feed- back error. The resulting error is used in the PID function. In the proportional branch the error is multiplied by a constant, to provide a longterm output for the motor (a ballpark guess). If an error is largely positive or negative for a while the integral branch value will become large and push the system towards zero. When there is a sudden change occurs in the error value the differential branch will give a quick response. The results of all three branches are added together in the second summation block. This result is then amplified to drive the motor. The overall performance of the system can be changed by adjusting the gains in the three branches of the PID function. Human rules to control car (also like expert system/fuzzy logic): 1. If v error is not zero, and has been positive/negative for a while, increase/decrease θ gas 2. If v error is very big/small increase/decrease θ gas 3. If v error is near zero, keep θ gas the same 4. If v error suddenly becomes bigger/smaller, then increase/decrease θ gas . 5. etc. u K p e K i edt ∫ K d de dt ------ ¸ , ¸ _ + + = page 267 Figure 214 A PID control system There are other variations on the basic PID controller shown in Figure 215. A PI controller results when the derivative gain is set to zero. Recall the second order response - this controller is generally good for eliminating long term errors, but it is prone to over- shoot. I a P controller only the proportional gain in non-zero. This controller will generally work, but often cannot eliminate errors. The PD controller does not deal with longterm errors, but is very responsive to system changes. Figure 215 Some other control equations V V + - amp motor + + + proportional integral derivative K i e ∫ ( ) K p e ( ) K d d dt -----e ¸ , ¸ _ PID function u e +V -V θ gas K p v error K i v error dt ∫ + = θ gas K p v error = θ gas K p v error K d dv error dt ---------------- ¸ , ¸ _ + = For a PI Controller For a P Controller For a PD Controller page 268 8.3.2 Manipulating Block Diagrams A block diagram for a system is not unique, meaning that it may be manipulated into new forms. Typically a block diagram will be developed for a system. The diagram will then be simplified through a process that is both graphical and algebraic. For exam- ple, equivalent blocks for a negative feedback loop are shown in Figure 216, along with an algebraic proof. Figure 216 A negative feedback block reduction Block diagram equivalencies for other block diagram forms are shown in Figure 217 to Figure 223. In all cases these operations are reversible. Proofs are provided, except for the cases where the equivalence is obvious. Aside: The manual process for tuning a PID controlled is to set all gains to zero. The pro- portional gain is then adjusted until the system is responding to input changes without excessive overshoot. After that the integral gain is increased until the longterm errors disappear. The differential gain will be increased last to make the system respond faster. is equal to r r c c + - G D ( ) H D ( ) G D ( ) 1 G D ( )H D ( ) + ------------------------------------- c G D ( )e = c G D ( ) r H D ( )c – ( ) = c 1 G D ( )H D ( ) + ( ) G D ( )r = c G D ( ) 1 G D ( )H D ( ) + ------------------------------------- ¸ , ¸ _ r = page 269 Figure 217 A positive feedback block reduction Figure 218 Reversal of function blocks Figure 219 Moving branches before blocks is equal to r r c c + + G D ( ) H D ( ) G D ( ) 1 G D ( )H D ( ) – ------------------------------------- c G D ( )e = c G D ( ) r H D ( )c + ( ) = c 1 G D ( )H D ( ) – ( ) G D ( )r = c G D ( ) 1 G D ( )H D ( ) – ------------------------------------- ¸ , ¸ _ r = is equal to r c r c G D ( ) 1 G D ( ) ------------- c G D ( )r = r c 1 G D ( ) ------------- ¸ , ¸ _ = is equal to r c G D ( ) c r c c G D ( ) G D ( ) page 270 Figure 220 Combining sequential function blocks Figure 221 Moving branches after blocks Figure 222 Moving summation functions before blocks is equal to r r b b G D ( ) H D ( ) G D ( )H D ( ) x G D ( )r = b H D ( )x = b H D ( )G D) ( )r = x is equal to r c G D ( ) r r c r 1 G D ( ) ------------- G D ( ) is equal to r G D ( ) b e r G D ( ) c 1 G D ( ) ------------- b e e G t D ( )r b t = t t t t e G D ( ) r t b G t D ( ) ----------------- t ¸ , ¸ _ = page 271 Figure 223 Moving summation function past blocks Recall the example of a cruise control system for an automobile presented in Fig- ure 211. This example is extended in Figure 224 to include mathematical models for each of the function blocks. This block diagram is first simplified by multiplying the blocks in sequence. The feedback loop is then reduces to a single block. Notice that the feedback line doesn’t have a function block on it, so by default the function is ’1’ - everything that goes in, comes out. is equal to r c G D ( ) d r c G D ( ) G D ( ) d c G D ( ) R d t t ( ) = c R G D ( ) ( ) d G D ( ) ( ) t t = page 272 Figure 224 An example of simplifying a block diagram The function block is further simplified in Figure 225 to a final transfer function for the whole system. e.g. The block diagram of the car speed control system K p K i D ----- K d D + + 10 F θ gas v actual v desired v error + - 1 MD --------- K p K i D ----- K d D + + θ gas v actual v desired v error + - 10 MD --------- K p K i D ----- K d D + + ¸ , ¸ _ 10 MD --------- ¸ , ¸ _ v actual v desired v error + - = G(D) H(D) = 1 K p K i D ----- K d D + + ¸ , ¸ _ 10 MD --------- ¸ , ¸ _ 1 K p K i D ----- K d D + + ¸ , ¸ _ 10 MD --------- ¸ , ¸ _ 1 ( ) + -------------------------------------------------------------------------- v actual v desired page 273 Figure 225 An example of simplifying a block diagram (continued) 8.3.3 A Motor Control System Example Consider the example of a DC servo motor controlled by a computer. The purpose of the controller is to position the motor. The system in Figure 226 shows a reasonable control system arrangement. Some elements such as power supplies and commons for voltages are omitted for clarity. K p K i D ----- K d D + + ¸ , ¸ _ Ms 10 ------- K p K i D ----- K d D + + ¸ , ¸ _ + ------------------------------------------------------- ¸ , ¸ _ v actual v desired D 2 K d ( ) D K p ( ) K i ( ) + + D 2 M 10 ------ K + d ¸ , ¸ _ D K p ( ) K i ( ) + + ---------------------------------------------------------------------- ¸ , ¸ _ v actual v desired v actual v desired ----------------- D 2 K d ( ) D K p ( ) K i ( ) + + D 2 M 10 ------ K + d ¸ , ¸ _ D K p ( ) K i ( ) + + ---------------------------------------------------------------------- ¸ , ¸ _ = page 274 Figure 226 A motor feedback control system The feedback controller can be represented with the block diagram in Figure 227. Figure 227 A block diagram for the feedback controller +5V -5V 5K potentiometer 12Vdc motor shafts are coupled - + LM675 op-amp 2.2K 1K P C I - 1 2 0 0 d a t a a c q u i s i t i o n c a r d f r o m N a t i o n a l I n s t r u m e n t s Computer Running Labview - + desired position voltage Vd gain Kp X desired position voltage + - potentiometer gain Kp op-amp motor shaft Vd page 275 The transfer functions for each of the blocks are developed in Figure 228. Two of the values must be provided by the system user. The op-amp is basically an inverting amplifier with a fixed gain of -2.2 times. The potentiometer is connected as a voltage divider and the equation relates angle to voltage. Finally the velocity of the shaft is inte- grated to give position. Figure 228 Transfer functions for the power amplifier, potentiometer and motor shaft The basic equation for the motor is derived in Figure 229 using experimental data. In this case the motor was tested with the full inertia on the shaft, so there is no need to calculate ’J’. Given or selected values: - desired potentiometer voltage Vd - gain K For the op-amp: I V+ ∑ V + V i – 1K ----------------- V + V o – 2.2K ------------------ + 0 = = V + V - 0V = = V i – 1K -------- V o – 2.2K ----------- + 0 = V o V i ------ 2.2 – = V o 5V θ 5 2π ( ) -------------- ¸ , ¸ _ = For the potentiometer assume that the potentiometer has a range of 10 turns and 0 degrees is in the center of motion. So there are 5 turns in the negative and positive direction. V o θ ------ 0.159Vrad 1 – = For the shaft, it integrates the angular velocity into position: ω d dt ----- θ = θ ω ---- 1 D ---- = page 276 Figure 229 Transfer function for the motor The individual transfer functions for the system are put into the system block dia- gram in Figure 230. The block diagram is then simplified for the entire system to a single transfer function relating the desired voltage (setpoint) to the angular position (output). The transfer function contains the unknown gain value ’Kp’. For the motor use the differential equation and the speed curve when Vs=10V is applied: d dt ----- ¸ , ¸ _ ω K 2 JR ------ ¸ , ¸ _ ω + K JR ------ ¸ , ¸ _ V s = 1s 2s 3s 1400 RPM d dt ----- ¸ , ¸ _ ω 0 = For steady-state ω 1400RPM 146.6rads 1 – = = 0 K 2 JR ------ ¸ , ¸ _ 146.6 + K JR ------ ¸ , ¸ _ 10 = K 0.0682 = 1s τ 0.8s ≈ K 2 JR ------ ¸ , ¸ _ 0.8s = 0.0682 K JR ------ ¸ , ¸ _ 0.8s = K JR ------ 11.73 = Dω 0.8ω + 11.73V s = ω V s ----- 11.73 D 0.8 + ------------------ = page 277 Figure 230 The system block diagram, and simplification The value of ’Kp’ can be selected to ’tune’ the system performance. In Figure 231 the gain value is calculated to give the system an overall damping factor of 1.0, or criti- cally damped. This is done by recognizing that the bottom (homogeneous) part of the transfer function is second-order and then extracting the damping factor and natural fre- quency. The final result of ’Kp’ is negative, but this makes sense when the negative gain on the op-amp is considered. + - Kp -2.2 Vd 0.159 11.73 D 0.8 + ------------------ 1 D ---- θ + - Vd 0.159 25.81Kp – D 0.8 + ( )D --------------------------- θ Vd 25.81Kp – D 0.8 + ( )D --------------------------- 1 0.159 ( ) 25.81Kp – D 0.8 + ( )D --------------------------- + -------------------------------------------------------- θ Vd 25.81Kp – D 0.8 + ( )D 4.108Kp – ------------------------------------------------------- θ Vd 25.81Kp – D 2 0.8 + D 4.108Kp – ---------------------------------------------------- θ page 278 Figure 231 Calculating a gain K 8.3.4 System Error System error is often used when designing control systems. The two common types of error are system error and feedback error. The equations for calculating these errors are shown in Figure 232. If the feedback function ’H’ has a value of ’1’ then these errors will be the same. Figure 232 Controller errors An example of calculating these errors is shown in Figure 233. The system is a D 2 0.8 + D 0.0717K – x'' 2ξω n x' ω n 2 x + + = The denominator of the system transfer function can be compared to the standard second-order response. 0.8 2ξω n = ξ 1.0 = We have specified, or been given the damping coefficient as a design objective. 0.0717K – ω n 2 = 0.8 2 1.0 ( )ω n = ω n 0.4 = 0.0717K – 0.4 2 = K 2.232 – = r e c b G H + - System error, Feedback error, S r c – = e r b – = page 279 simple integrator, with a unity feedback loop. The overall transfer function for the system is calculated and then used to find the system response. The response is then compared to the input to find the system error. In this case the error will go to zero as time approaches infinity. Figure 233 System error calculation example for a step input G D ( ) K p D ------ = H D ( ) 1 = c r -- ∴ G 1 GH + ------------------ K p D K p + ----------------- = = Given, S r c – = c' K p c + ∴ K p r = r A = c h C 1 e K p t – = The homogeneous solution is, c p C 2 = The particular solution is found with a guess, c p ' 0 = 0 K p C 2 + K p A = C 2 A = c c h c p + C 1 e K p t – A + = = The solutions can be combined and the remaining unknown found for the system at rest initially. 0 C 1 e 0 A + = C 1 A – = c A – e K p t – A + = The error can now be calculated. S A A – e K p t – A + ( ) – Ae K p t – = = page 280 Figure 234 Drill problem: Calculate the system error for a ramp input Solve the previous problem for a ramp input, r At = page 281 Figure 235 Drill problem: Calculate the errors G D ( ) 1 D 2 4D 5 + + ------------------------------ = r 4t = H D ( ) 5 = Find the system error ’e’ for the given ramp input, R. page 282 8.3.5 Controller Transfer Functions The PID controller, and simpler variations were discussed in earlier sections. A more complete table is given in Figure 236. Figure 236 Standard controller types 8.3.6 State Variable Control Systems State variable matrices were introduced before. These can also be used to form a control system, as shown in Figure 237. Type Transfer Function Proportional (P) Proportional-Integral (PI) Proportional-Derivative (PD) Proportional-Integral-Derivative (PID) Lead Lag Lead-Lag G c K = G c K 1 1 τD ------- + ¸ , ¸ _ = G c K 1 τD + ( ) = G c K 1 1 τD ------- τD + + ¸ , ¸ _ = G c K 1 τ 1 D + 1 ατ 1 D + ----------------------- ¸ , ¸ _ 1 ατ 2 D + 1 τ 2 D + ----------------------- ¸ , ¸ _ = α 1 > G c K 1 τD + 1 ατD + -------------------- ¸ , ¸ _ = G c K 1 ατD + 1 τD + -------------------- ¸ , ¸ _ = α 1 > α 1 > τ 1 τ 2 > page 283 Figure 237 A state variable control system 8.3.7 Feedforward Controllers When a model of a system is well known it can be used to improve the perfor- mance of a control system by adding a feedforward function, as pictured in Figure 238. The feedforward function is basically an inverse model of the process. When this is used together with a more traditional feedback function the overall system can outperform more traditional controllers function, such as PID. Figure 238 A feed forward controller d dt ----- X AX BU + = Y CX D + = d dt -----X Y D A 1 D ---- C B U + + + + X process feedforward function feedback function page 284 8.3.8 Cascade Controllers When controlling a multistep process a cascade controller can allow refined con- trol of sub-loops within the larger control system. Figure 239 A cascade controller 8.4 SUMMARY • Transfer functions can be used to model the ratio of input to output. • Block diagrams can be used to describe and simplify systems • Controllers can be designed to meet criteria, such as damping ratio and natural frequency. • System errors can be used to determine the long term stability and accuracy of a controlled system. • Other control types are possible for more advanced systems. 8.5 PRACTICE PROBLEMS 1. Develop differential equations and then transfer functions for the mechanical system below. There is viscous damping between the block and the ground. A force is applied to cause the Gc1 Gc2 Gp1 Gp2 page 285 mass the accelerate. 2. Develop a transfer function for the system below. The input is the force ‘F’ and the output is the voltage ‘Vo’. The mass is suspended by a spring and a damper. When the spring is undeflected y=0. The height is measured with an ultrasonic proximity sensor. When y = 0, the output Vo=0V. If y=20cm then Vo=2V and if y=-20cm then Vo=-2V. Neglect gravity. 3. Find the transfer functions for the systems below. Here the input is a torque, and the output is the angle of the second mass. M B x F K d K s M K s 10 N m ---- = K d 5N s m ---- = Ultrasonic y Proximity Sensor M 0.5Kg = F τ B 1 B 2 J 1 J 2 K s1 K s2 θ 1 θ 2 page 286 4. Find the transfer functions for the system below where Vi is the input and Vo is the output. 5. Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t). 6. Given the transfer function below, develop a mechanical system that it could be for. (Hint: Dif- ferential Equations). 7. Given a mass supported by a spring and damper, find the displacement of the supported mass over time if it is released from neutral at t=0sec, and gravity pulls it downward. a) find the transfer function x/F. b) find the input function F. c) solve the input output equation symbolicaly to find the position as a function of time for Ks = 10N/m, Kd = 5Ns/m, M=10kg. d) solve part c) numerically. 8. a) What is a Setpoint, and what is it used for? b) What does feedback do in control systems? 9. Simplify the block diagram below. R 1 R 2 C L V i V o + + - - G 4 D 2 + ------------- Y X --- = = X t ( ) 20 = When t >= 0 x D ( ) F D ( ) ------------- 1 10 20s + --------------------- = x = displacement F = force where: A Vn C + + + - Vi Vo page 287 10. Simplify the following block diagram. 11. The block diagram below is for a servo motor position control system. The system uses a pro- portional controller. a) Convert the system to a transfer function. b) draw a sketch of what the actual system might look like. Identify components. 12. Simplify the block diagram below to a transfer function. 13. Find the system error when the input is a ramp with the function r(t) = 0.5t. Sketch the system G 3 G 2 G 4 G 6 G 5 G 1 R C + + + - - - K 2 10 D 1 + ------------- 1 D ---- θ d V d V e V m ω θ a V a 2 A B C + - + - + + x y page 288 error as a function of time. 14. Given the block diagram below, select a system gain K that will give the overall system a damping ratio of 0.7 (for a step input). What is the resulting undamped natural frequency of the system? 15. The following system is a feedback controller for an elevator. It uses a desired height ‘d’ pro- vided by a user, and the actual height of the elevator ‘h’. The difference between these two is called the error ‘e’. The PID controller will examine the value ‘e’ and then control the speed of the lift motor with a control voltage ‘c’. The elevator and controller are described with transfer functions, as shown below. all of these equations can be combined into a single system transfer R D ( ) R D ( ) 5 D D 1 + ( ) ----------------------- 1 0.2D + + - 2 D 2 3D 2 + + ------------------------------ K + - page 289 equation as shown. a) Find the response of the final equation to a step input. The system starts at rest on the ground floor, and the input (desired height) changes to 20 as a step input. b) Write find the damping coefficient and natural frequency of the results in part a). c) verify the solution using the initial and final value theorems. 16. a) Develop an equation for the system below relating the two inputs to the output. (Hint: think of a summation block.) e d h – = c e -- K p K i D ----- K d D + + 2D 1 D 2 + + D ------------------------------ = = h c -- - 10 D 2 D + ----------------- = PID controller elevator c e -- ¸ , ¸ _ h c -- - ¸ , ¸ _ h e -- - 2D 1 D 2 + + D ------------------------------ 10 D 2 D + ----------------- D 1 + ( ) 2 D --------------------- 10 D D 1 + ( ) ----------------------- 10 D 1 + ( ) D 2 ------------------------ = = = = error h d h – ------------ 10 D 1 + ( ) D 2 ------------------------ = h 10 D 1 + ( ) D 2 ------------------------ ¸ , ¸ _ d h – ( ) = h 1 10 D 1 + ( ) D 2 ------------------------ + ¸ , ¸ _ 10 D 1 + ( ) D 2 ------------------------ ¸ , ¸ _ d ( ) = h d --- 10 D 1 + ( ) D 2 ------------------------ 1 10 D 1 + ( ) D 2 ------------------------ + ---------------------------------- ¸ , ¸ _ 10D 10 + D 2 10D 10 + + ------------------------------------ = = combine the transfer functions eliminate ‘e’ system transfer function V f V d + - R R R R V e page 290 b) Develop an equation for the system below relating the input to the output. c) The equation below can be used to model a permanent magnet DC motor with an applied torque. An equivalent block diagram is given. Prove that the block diagram is equivalent to the equation. d) Write the transfer function for the system below relating the input torque to the output angle theta2. Then write the transfer function for the angular velocity of mass 2. e) The system below is a combination of previous components, and a tachometer V e + - 1K 1K 1K V s R P d dt ----- ¸ , ¸ _ ω ω K 2 J R R M ------------- ¸ , ¸ _ + V s K J R R M ------------- ¸ , ¸ _ T load J R ------------ – = V s K R M ------- T load ω R M J R R M D K 2 + ------------------------------- + - τ B J 1 J 2 K s1 K s2 θ 2 θ 1 page 291 for velocity feedback. Simplify the block diagram. K R M ------- ω R M J M R M D K 2 + -------------------------------- + - 2R P R P 1K + -------------------- V d K s2 D 3 J 1 J 2 ( ) D 2 BJ 1 ( ) D K s2 J 1 J 2 + ( ) ( ) BK s2 ( ) + + + ------------------------------------------------------------------------------------------------------------------------ K T + - (ans. V + V d R R R + ------------- ¸ , ¸ _ 0.5V d = = I V - ∑ V - V f – R ---------------- V - V e – R ----------------- + 0 = = V e 2V - V f – = V e 2 0.5V d ( ) V f – = V e V d V f – = V e V d V f a) page 292 (ans. I V - ∑ V - 0 – 1K -------------- V - V s – 1K ----------------- + 0 = = V s V e V - 0.5V s = (1) I V + ∑ V + V e – 1K ------------------ V + 0 – R P --------------- + 0 = = V + 1 1K ------- 1 R P ------ + ¸ , ¸ _ V e 1K ------- = substitute in (1) 0.5V s R P 1K + R P 1K ( ) -------------------- ¸ , ¸ _ V e 1K ------- = V s V e ----- 2R P R P 1K + -------------------- = 2R P R P 1K + -------------------- note: a constant set by the variable resistor Rp b) d dt ----- ¸ , ¸ _ ω ω K 2 J R R M ------------- ¸ , ¸ _ + V s K J R R M ------------- ¸ , ¸ _ T load J R ------------ – = (ans. ω D K 2 J R R M ------------- + ¸ , ¸ _ V s K J R R M ------------- ¸ , ¸ _ T load J R ------------ – = ω JR M J R R M D K 2 + ------------------------------- ¸ , ¸ _ V s K J R R M ------------- ¸ , ¸ _ T load J R ------------ – ¸ , ¸ _ = ω R M J R R M D K 2 + ------------------------------- ¸ , ¸ _ V s K R M ------- ¸ , ¸ _ T load – ¸ , ¸ _ = c) page 293 (ans. K s2 θ 1 θ 2 – ( ) τ J 1 K s2 θ 1 θ 2 – ( ) Bθ 2 D J 2 M ∑ τ K s2 θ 1 θ 2 – ( ) – J 1 θ 1 D 2 = = + M ∑ K s2 θ 1 θ 2 – ( ) Bθ 2 D – J 2 θ 2 D 2 = = + τ K s2 θ 1 θ 2 – ( ) – J 1 θ 1 D 2 = K s2 θ 1 θ 2 – ( ) Bθ 2 D – J 2 θ 2 D 2 = θ 1 J 1 D 2 K s2 + ( ) θ 2 K s2 – ( ) + τ = (1) θ 2 J 2 D 2 K s2 BD + + ( ) θ 1 K s2 ( ) = θ 1 θ 2 J 2 D 2 K s2 BD + + K s2 ----------------------------------------- ¸ , ¸ _ = (2) substitute (2) into (1) θ 2 J 2 D 2 BD K s2 + + K s2 ----------------------------------------- ¸ , ¸ _ J 1 D 2 K s2 + ( ) θ 2 K s2 – ( ) + τ = θ 2 D 4 J 1 J 2 ( ) D 3 BJ 1 ( ) D 2 K s2 J 1 J 2 + ( ) ( ) D BK s2 ( ) + + + K s2 ------------------------------------------------------------------------------------------------------------------------------- ¸ , ¸ _ τ = θ 2 τ ----- K s2 D 4 J 1 J 2 ( ) D 3 BJ 1 ( ) D 2 K s2 J 1 J 2 + ( ) ( ) D BK s2 ( ) + + + ------------------------------------------------------------------------------------------------------------------------------- = ω 2 τ ------ K s2 D 3 J 1 J 2 ( ) D 2 BJ 1 ( ) D K s2 J 1 J 2 + ( ) ( ) BK s2 ( ) + + + ------------------------------------------------------------------------------------------------------------------------ = ω 2 Dθ 2 = d) page 294 9. PHASOR ANALYSIS 9.1 INTRODUCTION When a system is stimulated by an input it will respond. Initially there is a substan- tial transient response, that is eventually replaced by a steady state response. Techniques for finding the combined steady state and transient responses were covered in earlier chap- ters. These include the integration of differential equations, and numerical solutions. Pha- sor analysis can be used to find the steady state response only. These techniques involve using the Fourier transform on the system transfer function, input and output. 9.2 FOURIER TRANSFORMS FOR STEADY-STATE ANALYSIS When considering the differential operator we can think of it as a complex number, as in Figure 240. The real component of the number corresponds to the natural decay (e- to-the-t) of the system. But, the complex part corresponds to the oscillations of the system. In other words the real part of the number will represent the transient effects of the system, while the complex part will represent the sinusoidal steady-state. Therefore to do a steady- state sinusoidal analysis we can replace the ’D’ operator with , this is the Fourier trans- form. Figure 240 Transient and steady-state parts of the differential operator Topics: Objectives: • To be able to analyze steady state responses using the Fourier transform • The Fourier transform • Complex and polar calculation of steady state system responses • Vibration analysis jω D σ jω + = where, D differential operator = σ decay constant = ω oscillation frequency = D jω = Fourier transform page 295 An example of the Fourier transform is given in Figure 241. We start with a trans- fer function for a mass-spring-damper system. In this example numerical values are assumed to put the equation in a numerical form. The differential operator is replaced with ’jw’, and the equation is simplified to a complex number in the denominator. This equa- tion then described the overall response of the system to an input based upon the fre- quency of the input. A generic form of sinusoidal input for the system is defined, and also converted to phasor (complex) form. (Note: the frequency of the input does not show up in the complex form of the input, but it will be used later.) The general of the system is then obtained by multiplying the transfer function by the input, to obtain the output. Figure 241 A Fourier transform example To continue the example in Figure 241 values for the sinusoidal input force are assumed. After this the method only requires the simplification of the complex expression. In particular having a complex denominator makes analysis difficult and is undesirable. To simplify this expression it is multiplied by the complex conjugate. After this, the expression is quickly reduced to a simple complex number. The complex number is then converted to polar form, and then finally back into a function of time. x D ( ) F D ( ) ------------- 1 MD 2 K d D K s + + ------------------------------------------ 1 1000D 2 3000D 2000 + + ------------------------------------------------------------ = = x ω ( ) F ω ( ) ------------ 1 1000j 2 ω 2 3000jω 2000 + + ------------------------------------------------------------------ 1 2000 1000ω 2 – ( ) j 3000ω ( ) + ----------------------------------------------------------------------- = = A given input function can also be converted to Fourier (phasor) form. F t ( ) A ω input t θ input + ( ) sin = F ω ( ) A θ input cos j θ input sin + ( ) = Note: the frequency is not used when converting an oscillating signal to complex form. But it is needed for the transfer function. F ω ( ) A θ input cos jA θ input sin + = x ω ( ) x ω ( ) F ω ( ) ------------ F ω ( ) 1 2000 1000ω 2 – ( ) j 3000ω ( ) + ----------------------------------------------------------------------- A θ input cos jA θ input sin + ( ) = = The response of the steady state output ’x’ can now be found for the given input. M 1000kg = K s 2000 N m ---- = K d 3000 Ns m ------ = A Fourier transform can be applied to a transfer function for a mass-spring-damper system. Some component values are assumed. page 296 Figure 242 A Fourier transform example (cont’d) Assume the input to the system is, F t ( ) 10 100t 0.5 + ( )N sin = A 10N = ω 100 rad s --------- = θ input 0.5rad = x ω ( ) 1 2000 1000 100 ( ) 2 – ( ) j 3000 100 ( ) ( ) + ------------------------------------------------------------------------------------------- 10 0.5 cos j10 0.5 sin + ( ) = These can be applied to find the steady state output response, x ω ( ) 1 9998000 – ( ) j 300000 ( ) + ------------------------------------------------------------ 8.776 j4.794 + ( ) = x ω ( ) 8.776 j4.794 + 9998000 – j300000 + --------------------------------------------------- 9998000 – j300000 – ( ) 9998000 – j300000 – ( ) -------------------------------------------------------- = x ω ( ) 86304248 – ( ) j 50563212 – ( ) + 1.0005 14 ×10 ------------------------------------------------------------------------ = x t ( ) 0.9999 -6 ×10 100t 3.671 + ( )m sin = This can then be converted to a function of time. Note: This is known as the complex conjugate 1. The value is obviously 1 so it does not change the value of the expression 2. The complex component is now negative 3. Only the denominator is used top and bottom x ω ( ) 0.863 -6 ×10 – ( ) 2 0.505 -6 ×10 – ( ) 2 + 0.505 -6 ×10 – 0.863 -6 ×10 – ------------------------------ ¸ , ¸ _ π + ¸ , ¸ _ atan ∠ = Note: the signs of the components indicate that the angle is in the bottom left quad- rant of the complex plane, so the angle should be between 180 and 270 degrees. To correct for this pi radians are added to the result of the calculation. x ω ( ) 0.863 -6 ×10 – ( ) j 0.505 -6 ×10 – ( ) + = x ω ( ) 0.9999 -6 ×10 3.671 ∠ = page 297 Figure 243 Calculations in polar notation The cartesian form of complex numbers seen in the last section are well suited to operations where complex numbers are added and subtracted. But, when complex num- bers are to be multiplied and divided these become tedious and bulky. The polar form for complex numbers simplifies many calculations. The previous example started in Figure 241 is redone using polar notation in Figure 244. In this example the input is directly con- verted to polar form, without the need for calculation. The input frequency is substituted into the transfer function and it is then converted to polar form. After this the output is found by multiplying the transfer function by the input. The calculations for magnitudes involve simple multiplications. The angles are simply added. After this the polar form of A jB + C jD + ---------------- A 2 B 2 + B A --- ¸ , ¸ _ atan ∠ C 2 D 2 + D C ---- ¸ , ¸ _ atan ∠ ------------------------------------------------- A 2 B 2 + C 2 D 2 + ----------------------- B A --- ¸ , ¸ _ atan D C ---- ¸ , ¸ _ atan – ¸ , ¸ _ ∠ = = Note: when dividing and multiplying complex numbers in polar for the magnitudes can be multiplied or divided, and the angles added or subtracted. XXXXX Unfortunately when the numbers are only added or subtracted they need to be converted back to cartesian form to perform the operations. This method eliminates the need to multiply by the complex conjugate. A θ 1 ∠ B θ 2 ∠ -------------- A B --- θ 1 θ 2 – ( ) ∠ = A θ 1 ∠ ( ) B θ 2 ∠ ( ) AB θ 1 θ 2 + ( ) ∠ = For example, 2 0.7854 ∠ 5 0.4636 ∠ 25 0.9273 ∠ ------------------------------- = 1 j + ( ) 2 j + 3 4j + -------------- ¸ , ¸ _ 2 5 25 -------------- 0.7854 0.4636 0.9273 – + ∠ = 0.6325 0.3217 ∠ = 0.6 j0.2 + = page 298 the result is converted directly back to a function of time. Figure 244 Correcting quadrants for calculated angles Consider the circuit analysis example in Figure 245. In this example the compo- nent values are converted to their impedances, and the input voltage is converted to phasor form. (Note: this is a useful point to convert all magnitudes to powers of 10.) After this the three output impedances are combined to a single impedance. In this case the calculations x ω ( ) F ω ( ) ------------ 1 2000 1000 100 ( ) 2 – ( ) j 3000 100 ( ) ( ) + ------------------------------------------------------------------------------------------- 1 9998000 – j300000 + --------------------------------------------------- = = F t ( ) 10 100t 0.5 + ( )N sin = F ω ( ) 10 0.5 ∠ = Consider the input function from the previous example in polar form it becomes, The transfer function can also be put in polar form. x ω ( ) F ω ( ) ------------ 1 0 ∠ 9998000 – ( ) 2 300000 ( ) 2 + 300000 9998000 – ------------------------ ¸ , ¸ _ atan π + ¸ , ¸ _ ∠ -------------------------------------------------------------------------------------------------------------------------------- = x ω ( ) F ω ( ) ------------ 1 0 ∠ 10002500 3.112 ∠ ------------------------------------------ 1 10002500 ----------------------- - 0 3.112 – ( ) ∠ 0.9998 -7 ×10 3.112 – ∠ = = = x ω ( ) x ω ( ) F ω ( ) ------------F ω ( ) 0.9998 -7 ×10 3.112 – ∠ ( ) 10 0.5 ∠ ( ) = = The output can now be calculated. x ω ( ) 0.9998 -7 ×10 10 ( ) 3.112 – 0.5 + ( ) ∠ 0.9998 -6 ×10 2.612 – ∠ = = x ω ( ) 0.9998 -6 ×10 100t 2.612 – ( ) sin = The output function can be written from this result. Note: recall that but the function in calculators and software only returns values between - 90 to 90 degrees. To compensate for this the sign of the real and imaginary components must be considered to determine where the angle lies. If it lies beyond the -90 to 90 degree range the correct angle can be obtained by adding or subtracting 180 degrees. θ tan Re Im ------ = θ atan real imaginary +/+ +/- -/+ -/- page 299 were simpler in the cartesian form. Figure 245 Phasor analysis of a circuit The analysis continues in Figure 246 as the output is found using a voltage divider. In this case a combination of cartesian and polar forms are used to simplify the calcula- + - V o + - Given the circuit, V i 5 10 6 t 0.3 + ( ) sin = 10KΩ 10KΩ 100nF 1mH + - V o + - 5 0.3 ∠ 10 4 10 4 1 10 7 – 10 6 j --------------------- 10 3 – 10 6 j the impedances and input voltage can be written in phasor form. The three output impedances in parallel can then be combined. + - V o + - 5 0.3 ∠ 10 4 Z eq 1 Z eq -------- 1 10 3 – 10 6 j --------------------- 1 1 10 7 – 10 6 j --------------------- ¸ , ¸ _ --------------------------- 1 10 4 -------- + + = 1 Z eq -------- 10 – 3 – j 10 1 – j 10 4 – + + 10 4 – ( ) j 0.099 ( ) + = = Z eq 1 10 4 – ( ) j 0.099 ( ) + ------------------------------------------ = page 300 tions. The final result is then converted back from phasor form to a function of time. Figure 246 Phasor analysis of a circuit (cont’d) Phasor analysis is applicable to systems that are linear. This means that the princi- ple of superposition applies. Therefore, if an input signal has more than one frequency component then the system can be analyzed for each component, and then the results sim- ply added. The example considered in Figure 241 is extended in Figure 247. In this exam- ple the input has a static component, as well as frequencies at 0.5 and 20 rad/s. The transfer function is analyzed for each of these frequencies components. The output com- ponents are found by multiplying the inputs by the response at the corresponding fre- quency. The results are then converted back to functions of time, and added together. The output can be found using the voltage divider form. V o ω ( ) 5 0.3 ∠ ( ) Z eq 10 4 Z eq + ---------------------- ¸ , ¸ _ = V o ω ( ) 5 0.3 ∠ ( ) 1 10 4 – ( ) j 0.099 ( ) + ------------------------------------------ ¸ , ¸ _ 10 4 1 10 4 – ( ) j 0.099 ( ) + ------------------------------------------ ¸ , ¸ _ + --------------------------------------------------------------- ¸ , ¸ _ = V o ω ( ) 5 0.3 ∠ ( ) 1 10 4 ( ) 10 4 – ( ) j 0.099 ( ) + ( ) 1 + ---------------------------------------------------------------------- ¸ , ¸ _ = V o ω ( ) 5 0.3 ∠ ( ) 1 2 j990 + -------------------- ¸ , ¸ _ 5 0.3 ∠ 2 2 990 2 + 990 2 -------- - atan ∠ ---------------------------------------------------- 5 0.3 ∠ 990 1.5687761 ∠ --------------------------------------- = = = V o ω ( ) 5 990 --------- 0.3 1.5687761 – ( ) ∠ 5.05 10 3 – × 1.269 – ∠ = = Finally, the output voltage can be written. V o t ( ) 5.05 10 6 t 1.269 – ( ) sin mV = page 301 Figure 247 A example for a signal with multiple frequency components (based on the example in Figure 241) 9.3 VIBRATIONS Oscillating displacements and forces in mechanical systems will cause vibrations. In some cases these become a nuisance, or possibly lead to premature wear and failure in mechanisms. A common approach to dealing with these problems is to design vibration isolators. The equations for transmissibility and isolation is shown in Figure 248. These equations can compare the ratio of forces or displacements through an isolator. The calcu- lation is easy to perform with a transfer function or Bode plot. x ω ( ) F ω ( ) ------------ 1 2000 1000ω 2 – ( ) j 3000ω ( ) + ----------------------------------------------------------------------- = F t ( ) 1000 20 20t ( ) sin 10 0.5t ( ) N ( ) ( ) sin + + = Given the transfer function for the system, and an input with multiple frequency components, the transfer function for each frequency can be calculated, x 0 ( ) F 0 ( ) ----------- 1 2000 1000 0 ( ) 2 – ( ) j 3000 0 ( ) ( ) + ------------------------------------------------------------------------------- 1 2000 ----------- - 0.0005 0 ∠ = = = x 0.5 ( ) F 0.5 ( ) ---------------- 1 2000 1000 0.5 ( ) 2 – ( ) j 3000 0.5 ( ) ( ) + ---------------------------------------------------------------------------------------- 1 1750 j1500 + -------------------------------- 1 0 ∠ 2305 0.709 ∠ ------------------------------ = = = x 20 ( ) F 20 ( ) -------------- 1 2000 1000 20 ( ) 2 – ( ) j 3000 20 ( ) ( ) + ------------------------------------------------------------------------------------- 1 398000 – j60000 + --------------------------------------------- 1 0 ∠ 402497 2.992 ∠ ------------------------------------ = = = These can then be multiplied by the input components to find output components. x 0 ( ) 0.0005 0 ∠ ( )1000 0 ∠ 0.5 0 ∠ = = x 0.5 ( ) 1 0 ∠ 2305 0.709 ∠ ------------------------------ ¸ , ¸ _ 10 0 ∠ 4.34 10 3 – × 0.709 – ∠ = = x 20 ( ) 1 0 ∠ 402497 2.992 ∠ ------------------------------------ ¸ , ¸ _ 20 0 ∠ 0.497 -4 ×10 2.992 – ∠ = = Therefore the output is, x t ( ) 0.5 49.7 10 6 – × 20t 2.992 – ( ) sin 4.34 10 3 – × 0.5t 0.709 – ( ) sin + + = Note: these are gains and phase shifts that will be used heavily in Bode plots later. page 302 Figure 248 Transmissibility Figure 249 Drill problem: Select a K value Given a vibration force in, to a force out, T F out ω ( ) F in ω ( ) ------------------- x out ω ( ) x in ω ( ) ------------------ = = The gain of a transfer function gives transmissibility %I 1 T – ( )100% = Given the transfer function for a vibration isolator below, find a value of K that will give 50% isolation for a 10Hz vibration. x out x in --------- 5D 10 + 4D 2 20KD 4 + + ----------------------------------------- = page 303 9.4 SUMMARY • Fourier transforms and phasor representations can be used to find the steady state response of a system to a given input. • Vibration analysis determines frequency components in mechanical systems. 9.5 PRACTICE PROBLEMS 1. Develop a transfer function for the system pictured below and then find the response to an input voltage of Vi = 10cos(1,000,000 t) using Fourier transforms. Vi + - Vo + - 1KΩ 1KΩ 1KΩ 1mH 1KΩ page 304 2. A single d.o.f. model with a weight of 1.2 kN and a stiffness of 340 N/m has a steady-state har- monic excitation force applied at 95 rpm (revolutions per minute). What damper value will (ans. I Va ∑ V a V i – 1KΩ ----------------- V a 1KΩ ------------ V a 1KΩ ------------ V a V o – 0.001D ------------------ + + + 0 = = I Vo ∑ V o V a – 0.001D ------------------ V o 1KΩ ------------ + 0 = = V a 3 1KΩ ------------ 1 0.001D ------------------ + ¸ , ¸ _ V i 1 – 1KΩ ------------ ¸ , ¸ _ + V o 1 0.001D ------------------ ¸ , ¸ _ = V o 1 0.001D ------------------ 1 1KΩ ------------ + ¸ , ¸ _ V a 1 0.001D ------------------ ¸ , ¸ _ = Vi + - Vo + - 1KΩ 1KΩ 1KΩ 1mH 1KΩ Va (1) V o 0.001D 1KΩ + 1KΩ ------------------------------------ ¸ , ¸ _ V a = (2) substitute (2) into (1) V o 0.001D 1KΩ + 1KΩ ------------------------------------ ¸ , ¸ _ 3 1KΩ ------------ 1 0.001D ------------------ + ¸ , ¸ _ V i 1 – 1KΩ ------------ ¸ , ¸ _ + V o 1 0.001D ------------------ ¸ , ¸ _ = V o V i ------ 1 1KΩ ------------ 0.001D 1KΩ + 1KΩ ------------------------------------ ¸ , ¸ _ 3 1KΩ ------------ 1 0.001D ------------------ + ¸ , ¸ _ 1 0.001D ------------------ ¸ , ¸ _ – ------------------------------------------------------------------------------------------------------------------- = for the given input of Vi = 10cos(1,000,000 t). V o 10 0j + ----------------- 1 1KΩ ------------ 0.001j10 6 1KΩ + 1KΩ ------------------------------------------- ¸ , ¸ _ 3 1KΩ ------------ 1 0.001 j10 6 ( ) ----------------------------- + ¸ , ¸ _ 1 0.001 j10 6 ( ) ----------------------------- ¸ , ¸ _ – ----------------------------------------------------------------------------------------------------------------------------------------------- = V o 10 j10 3 1KΩ + ( ) 3 1 j --- + ¸ , ¸ _ 1 j -- - ¸ , ¸ _ – ------------------------------------------------------------------- 10j j10 3 1KΩ + ( ) 3j 1 + ( ) 1 ( ) – ------------------------------------------------------------------- = = V o 10j 2001 – ( ) j 4000 ( ) + --------------------------------------------- 10 1.570795 ∠ 4472.6 2.035 ∠ ---------------------------------- 0.00224 0.464 – ∠ = = = V o 2.24 1 000 000t , , 0.464 – ( )mV cos = page 305 give a vibration isolation of 92%? (ans. M Ks Kd y F y ∑ K s – y K d yD – F – MyD 2 = = F y F --- 1 – D 2 M DK d K s + + ------------------------------------------ = F floor K s y K d yD + = F floor y ------------- K s K d D + = F floor F ------------- F floor y ------------- ¸ , ¸ _ y F --- ¸ , ¸ _ K s K d D + ( ) – D 2 M DK d K s + + ------------------------------------------ = = F floor F ------------- K s K d ωj + ( ) – ω 2 – M ωjK d K s + + ---------------------------------------------- = F floor F ------------- K s 2 K d ω ( ) 2 + K s ω 2 M – ( ) 2 ωK d ( ) 2 + ------------------------------------------------------------ = page 306 3. Four helical compression springs are used at each corner of a piece of equipment. The spring rate is 240 N/m for each spring and the vertical static deflection of the equipment is 10mm. Calculate the weight of the equipment and determine the amount of isolation the springs would afford if the equipment operating frequency is twice the natural frequency of the system. (ans. cont’d For 92% isolation, there is 100-92 = 8% transmission, at 95rpm. 0.08 340 N m ---- ¸ , ¸ _ 2 K d 9.95 rad s --------- ¸ , ¸ _ 2 + 340 N m ---- 9.95 rad s --------- ¸ , ¸ _ 2 122kg – ¸ , ¸ _ 2 9.95 rad s ---------K d ¸ , ¸ _ 2 + --------------------------------------------------------------------------------------------------------------------- = ω 95 rev min --------- ¸ , ¸ _ 1min 60sec -------------- ¸ , ¸ _ 2πrad rev ---------------- ¸ , ¸ _ 9.95 rad s --------- = = K s 340 N m ---- = M 1200N 9.81 N kg ----- - ----------------- 122kg = = 340 N m ---- 9.95 rad s --------- ¸ , ¸ _ 2 122kg – ¸ , ¸ _ 2 9.95 rad s -------- - K d ¸ , ¸ _ 2 + 340 N m ---- ¸ , ¸ _ 2 K d 9.95 rad s --------- ¸ , ¸ _ 2 + 0.08 2 --------------------------------------------------------------- = 1.377878 8 ×10 ( ) N 2 m 2 ------ 99.0025 rad 2 s 2 -----------K d 2 + 115600 0.0064 ----------------- - N 2 m 2 ------ K d 299.0025 0.0064 ------------------- rad 2 s 2 ----------- + = 1.197253 8 ×10 15370.138 ---------------------------------- ¸ , ¸ _ N 2 s 2 m 2 rad 2 ------------------ K d 2 = K d 88.3 Ns m ------ = page 307 10. BODE PLOTS 10.1 INTRODUCTION When a Fourier transform is applied to a transfer function the result can be expressed as a magnitude and angle that are functions of frequency. The magnitude is the gain, and the angle is the phase shift. In the previous chapter these values were calculated for a single frequency and then multiplied by the input values to get an output value. At different frequencies the transfer function value will change. The transfer function gain and phase angle can be plotted as a function of frequency to give an overall picture of sys- tem response. Topics: Objectives: • To be able to describe the response of a system using Bode plots • Bode plots page 308 Figure 250 Commonly seen Bode plot The mass-spring-damper transfer function from the previous chapter is expanded in Figure 251. In this example the transfer function is multiplied by the complex conjugate to eliminate the complex number in the denominator. The magnitude of the resulting trans- fer function is the gain, and the phase shift is the angle. Note that to correct for the quad- rant of the phase shift angles pi radians is subtracted for certain frequency values. Aside: Consider a ’graphic equalizer’ commonly found on home stereo equipment. The spectrum can be adjusted so that high or low tones are emphasized or muted. The position of the sliders adjusts the envelope that the audio signal is filtered through. The sliders trace out a Bode gain plot. In theoretical terms the equalizer can be described with a transfer function. As the slides are moved the transfer function is changed, and the bode plot shifts. In the example below the slides are positioned to pass more of the lower frequencies. The high frequencies would not be passed clearly, and might sound somewhat muffled. 40-120 120-360 360-1K 1K-3.2K 3.2K-9.7K 9.7K-20K gain f(Hz) page 309 Figure 251 A Fourier transform example The results in Figure 251 are normally left in variable form so that they may be analyzed for a range of frequencies. An example of this type of analysis is done in Figure 252. A set of frequencies is used for calculations. These need to be converted from Hz to rad/s before use. For each one of these the gain and phase angle is calculated. The gain gives a ratio between the input sine wave and output sine wave of the system. The magni- tude of the output wave can be calculated by multiplying the input wave magnitude by the gain. (Note: recall this example was used in the previous chapter) The phase angle can be added to the input wave to get the phase of the output wave. Gain is normally converted to ’dB’ so that it may cover a larger range of values while still remaining similar numerically. Also note that the frequencies are changed in multiples of tens, or magnitudes. x ω ( ) F ω ( ) ------------ 1 j 3000ω ( ) 2000 1000ω 2 – ( ) + ----------------------------------------------------------------------- = x ω ( ) F ω ( ) ------------ 1 j 3000ω ( ) 2000 1000ω 2 – ( ) + ----------------------------------------------------------------------- j – ( ) 3000ω ( ) 2000 1000ω 2 – ( ) + j – ( ) 3000ω ( ) 2000 1000ω 2 – ( ) + ------------------------------------------------------------------------------- = x ω ( ) F ω ( ) ------------ 2000 1000ω 2 – ( ) j 3000ω ( ) – 2000 1000ω 2 – ( ) 2 3000ω ( ) 2 + -------------------------------------------------------------------------- = x ω ( ) F ω ( ) ------------ 2000 1000ω 2 – ( ) 2 3000ω ( ) 2 + 2000 1000ω 2 – ( ) 2 3000ω ( ) 2 + ------------------------------------------------------------------------------ 1 2000 1000ω 2 – ( ) 2 3000ω ( ) 2 + ------------------------------------------------------------------------------ = = θ 3000ω – 1000ω 2 – 2000 + ----------------------------------------- ¸ , ¸ _ atan 3ω – 2 ω 2 – ------------- ¸ , ¸ _ atan = = for ω 2 ≤ ( ) θ 3ω – 2 ω 2 – ------------- ¸ , ¸ _ π – ¸ , ¸ _ atan = for ω 2 > ( ) page 310 Figure 252 A Fourier transform example (continued) In this example gain is defined as x/F. Therefore F is the input to the system, and x is the resulting output. The gain means that for each unit of F in, there will be gain*F=x out. The input and output are sinusoidal and there is a difference in phase between the input and output wave of θ (the phase angle). This is shown in Figure 253, where an input waveform is supplied with three sinusoidal components. For each of the frequencies a gain and phase shift are calculated. These are then used to calculate the resulting output wave. The resulting output represents the steady-state response to the sinusoidal output. Note: the gain values will cover many magnitudes of values. To help keep the graphs rational we will "compress" the values by converting them to dB (decibels) using the following formula. gain db 20 gain ( ) log = Note: negative phase angles mean that the mass motion lags the force. Gain Gain (dB) θ (rad.) (rad/sec) 0 0.006283 0.06283 0.6283 6.283 62.83 628.3 6283 f(Hz) 0 0.001 0.01 0.1 1 10 100 1000 Note: The frequencies chosen should be chosen to cover the points with the greatest amount of change. θ (deg.) page 311 Figure 253 A Fourier transform example (continued) 10.2 BODE PLOTS In the previous section we calculated a table of gains and phase angles over a range of frequencies. Graphs of these values are called Bode plots. These plots are normally done on semi-log graph paper, such as that seen in Figure 254. Along the longer axis of this paper the scale is base 10 logarithmic. This means that if the paper started at 0.1 on one side, the next major division would be 1, then 10, then 100, and finally 1000 on the other side of the paper. The basic nature of logarithmic scales prevents the frequency from being zero. Along the linear axis (the short one) the gains and phase angles are plotted, normally with two graphs side-by-side on a single sheet of paper. Assuming there is excitation from two sinusoidal sources in addition to the static load, as defined by the equation, F t ( ) 1000 20 20t ( ) sin 10 0.5t ( ) sin N ( ) + + = The result for each component can be evaluated separately x t ( ) 1000 _________ · ( ) 0t ______ 2π 360 -------- - ¸ , ¸ _ + ¸ , ¸ _ sin = 20 _________ ( ) 20t _______ 2π 360 -------- - ¸ , ¸ _ + ¸ , ¸ _ sin + 10 __________ ( ) 0.5t ________ 2π 360 -------- - ¸ , ¸ _ – ¸ , ¸ _ sin + gain from calculations or Bode plot phase angle from calculations or Bode plot x t ( ) 0.5 ______ 20t _____ + ( ) sin _______ 0.5t ______ + ( ) sin + + = page 312 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 page 313 Figure 254 4 cycle semi-log graph paper Figure 255 Drill problem: Plot the points from Figure 252 on graph paper Figure 256 Drill problem: Plot the points from Figure 251 with a computer Plot the points from Figure 252 in the semi-log graph paper in Figure 254. The general layout is pictured below. 0.1 1 10 100 1000 f(Hz) -40dB/dec gain phase (deg) (dB) Use computer software, such as Mathcad or a spreadsheet, to calculate the points in Fig- ure 251, and then draw Bode plots. Most software will offer options for making one axis use a log10 scale. page 314 Figure 257 Drill problem: Draw the Bode plot for gain and phase Draw the Bode plot for the transfer function by hand or with computer. D 3 + D 2 10000D 10000 + + ------------------------------------------------------ page 315 An approximate technique for constructing a gain Bode plot is shown in Figure 258. This method involves looking at the transfer function and reducing it to roots in the numerator and denominator. Once in that form a straight line approximation for each term can be drawn on the graph. An initial gain is also calculated to shift the results up or down. When done, the straight line segments are added to produce a more complex straight line curve. A smooth curve is then drawn over top of this curve. Figure 258 The method for Bode graph straight line gain approximation Bode plots for transfer functions can be approximated with the following steps. 1. Plot the straight line pieces. a) The gain at 0rad/sec is calculated and used to find an initial off- set. For example this transfer function starts at 10(D+1)/ (D+1000)=10(0+1)/(0+1000)=0.01=-40dB. b) Put the transfer function in root form to identify corner frequen- cies. For example (D+1)/(D+1000) will have corner frequencies at 1 and 1000 rad/sec. c) Curves that turn up or down are drawn for each corner frequency. At each corner frequency a numerator term causes the graph to turn up, each term in the dominator causes the graph to turn down. The slope up or down is generally +/- 20dB/decade for each term. Also note that squared (second-order) terms would have a slope of +/-40dB/decade. 2. The effect of each term is added up to give the resulting straight line approximation. 3. When the smooth curve is drawn, there should commonly be a 3dB dif- ference at the corner frequencies. In second-order systems the damping coefficient make may the corner flatter or peaked. page 316 Figure 259 Why the straight line method works Note: Some of the straight line approximation issues are discussed below. Why is there 3dB between a first order corner and the smooth plot, and the phase angle is 45 degrees of the way to +/- 90 degrees?? G jω ( ) 1 ω c jω + ------------------ = ω c ω = at the corner frequency Why does a first order pole go down at 20dB/dec? G jω ( ) 1 ω c jω c + --------------------- 1 ω c 2 π 4 --- ∠ ---------------------- 1 ω c 2 ------------- π 4 --- – ∠ = = = G 0 ( ) 1 ω c j0 + ----------------- 1 ω c ------ = = the initial gain is Therefore the difference is diff G jω ( ) G 0 ( ) --------------- 1 2 ------- π 4 --- – ∠ 20 1 2 ------- ¸ , ¸ _ π 4 --- – ∠ log 3.01dB π 4 --- – ∠ – = = = = G jω ( ) 1 ω c jω + ------------------ = before the corner frequency, ω c jω > G jω ( ) 1 ω c ------ 20 ω c 1 – ( ) log 20 ω c ( ) log – = = = after the corner frequency, ω c jω < G jω ( ) 1 jω ------ 20 ω 1 – ( ) log 20 ω ( ) log – = = = each time the frequency increases by a multiple of 10, the log value becomes 1 larger, thus resulting in a gain change of -20 dB. page 317 Figure 260 Why the straight line method works (cont’d) Why does a pole make the phase angle move by -90deg after the corner frequency? G jω ( ) 1 ω c jω + ------------------ 1 0 ∠ ω c 2 ω 2 + ω ω c ------ ¸ , ¸ _ atan ∠ --------------------------------------------------- 1 ω c 2 ω 2 + ----------------------- ω ω c ------ ¸ , ¸ _ atan – ∠ = = = before the corner frequency, ω c jω > after the corner frequency, ω c jω < angle G jω ( ) ( ) ω ω c ------ ¸ , ¸ _ atan – 0 ω c ------ ¸ , ¸ _ atan – 0 = = = angle G jω ( ) ( ) ω ω c ------ ¸ , ¸ _ atan – ∞ ( ) atan – π 2 --- – = = = page 318 Figure 261 Drill problem: Slope of second order transfer functions. An example of the straight line plotting technique is shown in Figure 262. In this example the transfer function is first put into a root form. In total there are three roots, 1, 10 and 100 rad/sec. The single root in the numerator will cause the curve to start upward with a slope of 20dB/dec after 1rad/sec. The two roots will cause two curves downwards at -20dB/dec starting at 10 and 100 rad/sec. The initial gain of the transfer function is also calculated, and converted to decibels. The frequency axis is rad/sec by default, but if Hz are used then it is necessary to convert the values. Show that the second order transfer function below would result in a slope of +/- 40 dB/decade. G jω ( ) 1 ω c jω + ( ) 2 -------------------------- = page 319 Figure 262 An approximate gain plot example The example is continued in Figure 263 where the straight line segments are added to produce a combined straight line curve. G D ( ) 100D 100 + 0.01D 2 0.11D 10 + + --------------------------------------------------- 10 4 D 1 + ( ) D 10 + ( ) D 100 + ( ) ---------------------------------------------- = = D 1 + 0dB Gain (dB) freq.(rad/sec) (could be Hz also) 1 D 10 + ---------------- 1 D 100 + ------------------- 1 10 100 GAIN 0 10 4 1 ( ) 10 ( ) 100 ( ) ------------------------- 10 20dB = = = Step 1: Draw lines for each of the terms in the transfer function, 20dB/dec. -20dB/dec. -20dB/dec. (the equation is put in root form) page 320 Figure 263 An approximate gain plot example (continued) Finally a smooth curve is fitted to the straight line approximation. When drawing the curve imagine that there are rubber bands at the corners that pull slightly and smooth out. For a simple first-order term there is a 3dB gap between the sharp corner and the func- tion. Higher order functions will be discussed later. 0dB Gain (dB) freq.(rad/sec) 1 10 100 Step 2: Sum the individual lines, and get the straight line approximation, 20dB 40dB 0dB Gain (dB) freq.(rad/sec) 1 10 100 Step 3: Draw the smooth curve (leaving 3dB at the corners), 20dB 40dB 3dB page 321 Figure 264 An approximate gain plot example (continued) The process for constructing phase plots is similar to that of gain plots, as seen in Figure 266. The transfer function is put into root form, and then straight line phase shifts are drawn for each of the terms. Each term in the numerator will cause a positive shift of 90 degrees, while terms in the denominator cause negative shifts of 90 degrees. The phase shift occur over two decades, meaning that for a center frequency of 100, the shift would start at 10 and end at 1000. If there are any lone ’D’ terms on the top or bottom, they will each shift the initial value by 90 degrees, otherwise the phase should start at 0degrees. Figure 265 The method for Bode graph straight line gain approximation The previous example started in Figure 262 is continued in Figure 266 to develop a phase plot using the approximate technique. There are three roots for the transfer function. None of these are zero, so the phase plot starts at zero degrees. The root in the numerator causes a shift of positive 90 deg, starting one decade before 1rad/sec and ending one decade later. The two roots in the denominator cause a shift downward. Gain plots for transfer functions can be approximated with the following steps. 1. Plot the straight line segments. a) Put the transfer function in root form to identify center frequen- cies. For example (D+1)/(D+1000) will have center frequencies at 1 and 1000 rad/sec. This should have already been done for the gain plot. b) The phase at 0rad/sec is determined by looking for any individ- ual D terms. Effectively they have a root of 0rad/sec. Each of these in the numerator will shift the starting phase angle up by 90deg. Each in the denominator will shift the start down by 90 deg. For example the transfer function 10(D+1)/(D+1000) would start at 0 deg while 10D(D+1)/(D+1000) would start at +90deg. c) Curves that turn up or down are drawn around each center fre- quency. Again terms in the numerator cause the curve to go up 90 deg, terms in the denominator cause the curves to go down 90 deg. Curves begin to shift one decade before the center fre- quency, and finish one decade after. 2. The effect of each term is added up to give the resulting straight line approximation. 3. The smooth curve is drawn. page 322 Figure 266 An approximate phase plot example The straight line segments for the phase plot are added in Figure 267 to produce a straight line approximation of the final plot. A smooth line approximation is drawn using the straight line as a guide. Again, the concept of an rubber band will smooth the curve. G D ( ) 10 4 D 1 + ( ) D 10 + ( ) D 100 + ( ) ---------------------------------------------- = D 1 + 0 Phase angle (deg.) freq.(rad/sec) 1 D 10 + ---------------- 1 D 100 + ------------------- 0.1 1 10 Step 1: Draw lines for each of the terms in the transfer function 100 1000 +90 +45 -45 -90 page 323 Figure 267 An approximate phase plot example (continued) The previous example used a transfer function with real roots. In a second-order system with double real roots (overdamped) the curve can be drawn with two overlapping straight line approximations. If the roots for the transfer function are complex (under- damped the corner frequencies will become peaked. This can be handled by determining the damping coefficient and natural frequency as shown in Figure 268. The peak will occur at the damped frequency. The peaking effect will become more pronounced as the damping coefficient goes from 0.707 to 0 where the peak will be infinite. 0 Phase angle (deg.) freq.(rad/sec) 0.1 1 10 100 1000 +90 +45 -45 -90 0 Phase angle (deg.) freq.(rad/sec) 0.1 1 10 100 1000 +90 +45 -45 -90 page 324 Figure 268 Resonant peaks The approximate techniques do decrease the accuracy of the final solution, but they can be calculated quickly. In addition these curves provide an understanding of the system that makes design easier. For example, a designer will often describe a system with a Bode plot, and then convert this to a desired transfer function. Gain dB = A =0.5 =0.1 -40dB/decade ξ 0.707 = ω d Resonant Peak freq M n A D 2 2ξω n ( )D ω n ( ) 2 + + -------------------------------------------------------- ω d 1 ξ 2 – ω n = Note: If ζ is less than 1 the roots become complex, and the Bode plots get a peak. This can be seen mathematically because the roots of the transfer function become complex. page 325 Figure 269 Drill problem: Draw the straight line approximation Draw the straight line approximation for the transfer function. D 3 + D 2 10000D 10000 + + ------------------------------------------------------ page 326 10.3 SIGNAL SPECTRUMS If a vibration signal is measured and displayed it might look like Figure 270. The overall sinusoidal shape is visible, along with a significant amount of ’noise’. When this is considered in greater detail it can be described with the given function. To determine the function other tools are needed to determine the frequencies, and magnitudes of the fre- quency components. Figure 270 A vibration signal as a function of time A signal spectrum displays signal magnitude as a function of frequency, instead of time. The time based signal in Figure 270 is shown in the spectrum in Figure 271. The three frequency components are clearly identifiable spikes. The height of the peaks indi- cates the relative signal magnitude. frequency 1 t (ms) 5 freq. 2 freq. 3 A x(t) displacement x t ( ) A 2π 0.01 ---------- t ¸ , ¸ _ sin 0.3A 2π 0.005 ------------- t ¸ , ¸ _ sin 0.01A 2π 0.0005 ---------------- t ¸ , ¸ _ sin + + = page 327 Figure 271 The spectrum for the signal in Figure 270 10.4 SUMMARY • Bode plots show gain and phase angle as a function of frequency. • Bode plots can be constructed by calculating point or with straight line approxi- mations. • A signal spectrum shows the relative strengths of components at different fre- quencies. 10.5 PRACTICE PROBLEMS 1. Draw a Bode Plot for both of the transfer functions below. log(freq.) (Hz or rads.) Amplitude A 1 0.01 ---------- 1 0.005 ------------- 1 0.0005 ---------------- =100Hz =200Hz =2000Hz D 1 + ( ) D 1000 + ( ) D 100 + ( ) 2 ---------------------------------------------- 5 D 2 ------ AND page 328 2. Given the transfer function below, a) draw the straight line approximation of the bode and phase shift plots. b) determine the steady-state output if the input is x(t) = 20 sin(9t+0.3). -20dB 0dB 90deg -45deg (ans. -180deg -40dB/dec y D ( ) x D ( ) ------------ D 10 + ( ) D 5 + ( ) D 5 + ( ) 2 ---------------------------------------- = page 329 (ans. y D ( ) x D ( ) ------------ D 10 + ( ) D 5 + ( ) D 5 + ( ) 2 ---------------------------------------- D 10 + ( ) D 5 + ( ) --------------------- = = 6dB 0dB 1.6 0.8 90 -90 1.6 0.8 x t ( ) 20 9t 0.3 + ( ) cos = y x -- D 10 + ( ) D 5 + ( ) --------------------- 9j 10 + 9j 5 + ----------------- ¸ , ¸ _ 5 9j – 5 9j – -------------- ¸ , ¸ _ 50 81 45j – + 25 81 + -------------------------------- 1.236 0.425j – = = = = Aside: the numbers should be obtained from the graphs, but I have calculated them y x -- 1.236 2 0.425 2 + 0.425 – 1.236 ---------------- ¸ , ¸ _ atan ∠ 1.307 0.3312rad – ∠ = = y x -- 2.33dB 9.49° – ∠ = y t ( ) 20 1.307 ( ) 9t 0.3 0.3312 – ( ) + + ( ) sin = y t ( ) 26.1 9t 0.031 – ( ) sin = y x -- D 10 + ( ) D 5 + ( ) --------------------- 9j 10 + 9j 5 + ----------------- ¸ , ¸ _ 5 9j – 5 9j – -------------- ¸ , ¸ _ 50 81 45j – + 25 81 + -------------------------------- 1.236 0.425j – = = = = Aside: This can also be done entirely with phasors in cartesian notation y 19.1 5.91j + ----------------------------- 1.236 0.425j – ( ) 19.1 5.91j + ( ) 26.1 0.813j – 26.1 0.031 – ∠ = = = x 20 0.3rad ( ) cos j 0.3rad ( ) sin + ( ) 19.1 5.91j + = = y t ( ) 26.11 9t 0.031 – ( ) sin = page 330 3. For the transfer functions below, draw the root locus plots, and draw an approximate time response for each. 4. Use the straightline approximation techniques to draw the Bode plot for the transfer function below. (ans. cont’d y x -- D 10 + ( ) D 5 + ( ) --------------------- 9j 10 + 9j 5 + ----------------- ¸ , ¸ _ 13.45 0.733 ∠ 10.30 1.064 ∠ ------------------------------- 13.45 10.30 ------------- 0.733 1.064 – ∠ 1.31 0.331 – ∠ = = = = = Aside: This can also be done entirely with phasors in polar notation x 20 0.3 ∠ = y t ( ) 26.2 9t 0.031 – ( ) sin = y 20 0.3 ∠ ------------------ 1.31 0.331 – ∠ = y 1.31 20 ( ) 0.331 – 0.3 + ( ) ∠ 26.2 0.031 – ∠ = = 1 D 1 + ------------- 1 D 2 1 + ---------------- 1 D 1 + ( ) 2 --------------------- 1 D 2 2D 2 + + ------------------------------ G F x --- D 1000 + D 2 5D 100 + + ------------------------------------ = = page 331 5. The applied force ‘F’ is the input to the system, and the output is the displacement ‘x’. b) What is the steady-state response for an applied force F(t) = 10cos(t + 1) N ? c) Give the transfer function if ‘x’ is the input. d) Draw the bode plots. e) Find x(t), given F(t) = 10N for t >= 0 seconds. 6. The following differential equation is supplied, with initial conditions. a) Write the equation in state variable form. b) Solve the differential equation numerically. c) Solve the differential equation using calculus techniques. d) Find the frequency response (gain and phase) for the transfer function using the Fourier transform. Roughly sketch the bode plots. 7. You are given the following differential equation for a spring damper pair. a) Write the transfer function for the differential equation if the input is F. b) Apply the Fourier transform to the transfer function to find magnitude and phase as functions of frequency. c) Draw a Bode plot for the system using either approximate or exact techniques on semi-log graph paper .d) Use the Bode plot to find the response to; e) Put the differential equation in state variable form and use a calculator to find K 1 = 500 N / m K 2 = 1000 N / m x M = 10kg F a) find the transfer function. y'' y' 7y + + F = y 0 ( ) 1 = y' 0 ( ) 0 = F t ( ) 10 = t 0 > 5x d dt ----- ¸ , ¸ _ x + F = F t ( ) 10 100t ( ) sin = F t ( ) 10 100t ( ) sin = page 332 values in time for the given input. f) Give the expected ‘x’ response of this first-order system to a step function input for force F = 1N for t > 0 if the system starts at rest. Hint: Use the canonical form. t 0.0 0.002 0.004 0.006 0.008 0.010 F 10 100t ( ) sin = x page 333 (ans. x F --- 1 5 D + ------------- = a) x F --- 1 5 D + ------------- 1 5 jω + --------------- 1 0 ∠ 5 2 ω 2 + ω 5 ---- ¸ , ¸ _ atan ∠ ------------------------------------------------ 1 5 2 ω 2 + ---------------------- ω 5 ---- ¸ , ¸ _ atan – ∠ = = = = b) c) initial gain 20 1 5 0 + ------------ ¸ , ¸ _ log 14dB – = = corner freq. 5 2π ------ 0.8Hz = = -20dB/dec -14dB 45° – 0.8Hz 0° 90° – 0.08Hz 8Hz gain(dB) phase(deg) d) f 100 2π --------- 16Hz = = From the Bode plot, gain 40dB – 0.01 = = phase 90° – π 2 --- rad – = = x t ( ) 10 0.01 ( ) 100t π 2 --- – ¸ , ¸ _ sin = Verified by calculations, x t ( ) 0.0999 100t 1.521 – ( ) sin = x 10 0 ∠ ------------- 1 5 2 100 2 + --------------------------- 100 5 -------- - ¸ , ¸ _ atan – ∠ 0.00999 1.521 – ∠ = = x 10 0 ∠ ( ) 0.00999 1.521 – ∠ ( ) 0.0999 1.521 – ∠ = = page 334 10.6 LOG SCALE GRAPH PAPER Please notice that there are a few sheets of 2 and 4 cycle log paper attached, make additional copies if required, and if more cycles are required, sheets can be cut and pasted together. Also note that better semi-log paper can be purchased at technical bookstores, as well at most large office supply stores. t 0.0 0.002 0.004 0.006 0.008 0.010 x 0 9.98e-4 5.92e-3 0.015 0.026 0.041 0 0.5 1 0.2 0 0.2 0.186 0.099 − X i 0.999 0 i h ⋅ e) g) x 1 5 --- e 5t – 5 --------- – = page 335 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 page 336 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 page 336 11. ROOT LOCUS ANALYSIS 11.1 INTRODUCTION The system can also be checked for general stability when controller parameters are varied using root-locus plots. 11.2 ROOT-LOCUS ANALYSIS In a engineered system we may typically have one or more design parameters, adjustments, or user settings. It is important to determine if any of these will make the sys- tem unstable. This is generally undesirable and possibly unsafe. For example, think of a washing machine that vibrates so much that it ‘walks’ across a floor, or a high speed air- craft that fails due to resonant vibrations. Root-locus plots are used to plot the system roots over the range of a variable to determine if the system will become unstable. Recall the general solution to a homogeneous differential equation. Complex roots will result in a sinusoidal oscillation. If the roots are real the result will be e-to-the-t terms. If the real roots are negative then the terms will tend to decay to zero and be stable, while positive roots will result in terms that grow exponentially and become unstable. Consider the roots of a second-order homogeneous differential equation, as shown in Figure 272 to Figure 278. These roots are shown on the complex planes on the left, and a time response is shown to the right. Notice that in these figures (negative real) roots on the left hand side of the complex plane cause the response to decrease while roots on the right hand side cause it to increase. The rule is that any roots on the right hand side of the plane make a system unstable. Also note that the complex roots cause some amount of oscillation. Topics: Objectives: • To be able to predict and control system stability. • Root-locus plots page 337 Figure 272 Negative real roots make a system stable Figure 273 Complex roots make a system oscillate Figure 274 Negative real and complex roots cause decaying oscillation -A -B jw sigma x0 x(t) t R A – B – , = A -A jw sigma x(t) t R Aj t = -A B jw sigma x(t) t R A – Bj t = -B page 338 Figure 275 More negative real and complex roots cause a faster decaying oscillation Figure 276 Overlapped roots are possible Figure 277 Positive real roots cause exponential growth and are unstable -A B jw sigma x(t) t R A – Bj t = -B -A,-A jw sigma x(t) t R A – A – , = A,A jw sigma x(t) t R A A , = page 339 Figure 278 Complex roots with positive real parts have growing oscillations and are unstable Next, recall that the denominator of a transfer function is the homogeneous equa- tion. By analyzing the function in the denominator of a transfer function the general sys- tem response can be found. An example of root-locus analysis for a mass-spring-damper system is given in Figure 279. In this example the transfer function is found and the roots of the equation are written with the quadratic equation. At this point there are three unspecified values that can be manipulated to change the roots. The mass and damper val- ues are fixed, and the spring value will be varied. The range of values for the spring coef- ficient should be determined by practical and design limitations. For example, the spring coefficient should not be zero or negative. A B jw sigma x(t) t R A Bj t = -B page 340 Figure 279 A mass-spring-damper system equation The roots of the equation can then be plotted to provide a root locus diagram. These will show how the values of the roots change as the design parameter is varied. If any of these roots pass into the right hand plane we will know that the system is unstable. In addition complex roots will indicate oscillation. Ks Kd M x D ( ) F D ( ) ------------- 1 MD 2 K d D K s + + ------------------------------------------ = A D B + ( ) D C + ( ) --------------------------------------- Note: We want x D ( ) F D ( ) ------------- 1 M ----- D 2 K d M ------ D K s M ----- + + ------------------------------------- = ax 2 bx c + + x A + ( ) x B + ( ) = B C , K d – M --------- K d 2 M 2 ------- 4 K s M ----- – t 2 ------------------------------------------- = A B , b – b 2 4ac – t 2a -------------------------------------- = Aside: the form below M 0 Kd 0 Ks 0 B 0 C 0 100 100 100 100 100 100 100 1000 10000 page 341 Figure 280 Drill problem: Plot the calculated roots on the axes above A feedback controller with a variable control function gain is shown in Figure 281. The variable gain ’K’ calls for determining controller stability over the range of values. This analysis begins by developing a transfer function for the overall system. The root of the denominator is then calculated and plotted for a range of ’K’ values. In this case all of the roots are in the left side of the plane, so the system is stable and doesn’t oscillate. Keep in mind that gain values near zero put the control system close to the right hand plane. In real terms this will mean that the controller becomes unresponsive, and the system can go where it pleases. It would be advisable to keep the system gain greater than zero to avoid this region. Real Imaginary page 342 Figure 281 Root-locus analysis in controller design 1 K 1 D ---- + - G D ( ) K D ---- = H D ( ) 1 = Note: This controller has adjustable gain. After this design is built we must anticipate that all values of K will be used. It is our responsibility to make sure that none of the possible K values will lead to instability. First, we must develop a transfer function for the entire control system. G S D ( ) G D ( ) 1 G D ( )H D ( ) + ------------------------------------- K D ---- ¸ , ¸ _ 1 K D ---- ¸ , ¸ _ 1 ( ) + --------------------------- K D K + -------------- = = = D K + 0 = K 0 1 2 3 etc... root -0 -1 -2 -3 Next, we use the characteristic equation of the denominator to find the roots as the value of K varies. These can then be plotted on a complex plane. Note: the value of gain ’K’ is normally found from 0 to +infinity. σ jω K ∞ → K 0 = Note: This system will always be stable because all of the roots for all values of K are negative real, and it will always have a damped response. Also, larger values of K, make the system more stable. page 343 • Consider the example, Figure 282 Drill problem: Complete the root-locus analysis G D ( ) K D 2 3D 2 + + ------------------------------ = H D ( ) 1 = First, find the characteristic equation,. and an equation for the roots, Given the system elements (assume a negative feedback controller), 1 K D 2 3D 2 + + ------------------------------ ¸ , ¸ _ 1 ( ) + 0 = D 2 3D 2 K + + + 0 = roots 3 – 9 4 2 K + ( ) – t 2 ------------------------------------------------ 1.5 – 1 4K – 2 -------------------- t = = Next, find values for the roots and plot the values, K 0 1 2 3 roots σ jω Note: For a negative feedback controller the denominator is, 1 G D ( )H D ( ) + page 344 Figure 283 Drill problem: Draw a root locus plot 11.3 SUMMARY • Root-locus plots show the roots of a transfer function denominator to determine stability G D ( )H D ( ) K D 5 + ( ) D D 2 4D 8 + + ( ) --------------------------------------- = page 345 11.4 PRACTICE PROBLEMS 1. Draw the root locus diagram for the system below. specify all points and values. K d D 3.0 1 D 1 + ( ) 2 --------------------- + - + - page 346 2. For each of the systems below, (ans. K d D 3.0 1 D 1 + ( ) 2 --------------------- + - + - 3.0 D 1 + ( ) 2 K d D + -------------------------------------- + - 3.0 D 2 D K d 2 + ( ) 4.0 + + ---------------------------------------------------- D 2 D K d 2 + ( ) 4.0 + + 0 = D K d – 2 – K d 2 + ( ) 2 4 4.0 ( ) – t 2 --------------------------------------------------------------------------- = Kd -10 -6 -2 -1 0 1 2 5 10 100 1000 roots 7.464, 0.536 2.000, 2.000 0 +/- 2.000j -0.5 +/- 1.936j -1 +/- 1.732j -1.5 +/- 1.323j -2.000, -2.000 -0.628, -6.372 -0.343, -11.657 -0.039, -102.0 -0.004, -1000 D K d – 2 – K d 2 4K d 12 – + t 2 ----------------------------------------------------------------- = The roots becomes positive when 0 K d – 2 K d 2 4K d 12 – + t – > The roots becomes complex when 0 K d 2 4K d 12 – + > K d 4 – 16 4 12 – ( ) – t 2 ----------------------------------------------- = K d 6 2 , – = Gains larger than -2 will result in a stable system. Any gains between -4 and -2 will result in oscillations. Critical points: (this is simple for a quadratic) 2 K d + K d 2 4K d 12 – + t > 16 0 > 0 K d – 2 – > K d 2 – > page 347 a) write the differential equation and convert it to a transfer function. b) If the input force is a step function of magnitude 1N, convert the input to a trans- fer function, and use it to find the time response for ‘y’ by solving a differential equation. c) Draw the poles on a real-complex plane. d) Apply the Fourier transform function and make it a function of frequency. Plot the Gain and magnitude as a function of frequency. M = 1 kg Kd = 1 Ns/m Ks = 1 N/m F y Kd1 = 1 Ns/m Ks1 = 1 N/m M = 1kg y F page 348 3. The block diagram below is for a motor position control system. The system has a proportional controller with a variable gain K. a) Simplify the block diagram to a single transfer function. b) Draw the Root-Locus diagram for the system (as K varies). Use either the approximate or exact techniques. ans. (the same for both) y F --- 1 D 2 D 1 + + -------------------------- = a) y 1 e 0.5t – 0.75t ( ) cos 1 0.5 1 ( ) – 0.75 ------------------------ ¸ , ¸ _ 0.75t ( ) sin + – = b) Note: a similar answer can be found with a single sin or cos c) 0.866 -0.866 -0.5 Re Im y F --- 1 1 ω 2 – ω 4 + -------------------------------- = d) θ angle 1 ω 2 – ω – , ( ) = 1 D ---- K + - 2 2 100 D 2 + ------------- θ d θ a V d V a V e V s ω ans. 200K D 2 2D 200K + + ---------------------------------------- page 349 c) Select a K value that will result in an overall damping coefficient of 1. State if the Root-Locus diagram shows that the system is stable for the chosen K. 4. Given the system transfer function below. a) Draw the root locus diagram and state what values of K are acceptable. b) Select a gain value for K that has either a damping factor of 0.707 or a natural frequency of 3 rad/sec. c) Given a gain of K=10 find the steady-state response to an input step of 1 rad. d) Given a gain of K=0.01 find the response of the system to an input step of 0.1rad. ans. roots 2 – 4 4 200K ( ) – t 2 ------------------------------------------------ 1 – 1 200K – t = = K 0 0.001 0.005 0.1 1 5 10 roots 0,-2 -0.1,-1.9 -1,-1 etc. -1 -2 K=0.005 Re Im ans. D 2 2D 200K + + D 2 2ζω n D ω n 2 + + = ω n ∴ 1 = K ∴ 0.005 = From the root locus graph this value is critically stable. θ o θ d ----- 20K D 2 D 20K + + ---------------------------------- = page 350 D 2 D 20K + + 0 = (ans. D 1 – 1 4 20K ( ) – t 2 --------------------------------------------- = K -10 -1 0 1/80 1 10 1000 roots 13.65, -14.65 4.000, -5.000 0.000, -1.000 -0.500, -0.500 -0.5 +/- 4.444j -0.5 +/- 14.13j -0.5 +/- 141.4j For complex roots 1 80K – 0 < K 1 80 ----- - > For negative real roots (stable) 1 – 1 80K – t 2 ------------------------------------- 0 < 1 80K – t 1 < K 0 > a) b) 2ω n ξ 1 = ω n 2 20K = Matching the second order forms, The gain can only be used for the natural frequency K 20 ω n 2 ------ 20 3 2 ------ 2.22 = = = page 351 θ o θ d ----- 20 10 ( ) D 2 D 20 10 ( ) + + ----------------------------------------- = c) θ o '' θ d ' θ d 200 + + 200θ d = Homogeneous: A 2 A 200 + + 0 = A 1 – 1 4 200 ( ) – t 2 -------------------------------------------- = A 0.5 – 14.1j t = θ o t ( ) C 1 e 0.5t – 14.1t C 2 + ( ) sin = Particular: θ A = 0 0 A200 + + 200 1rad ( ) = A 1rad = θ o t ( ) 1rad = Initial Conditions (assume at rest): θ o t ( ) C 1 e 0.5t – 14.1t C 2 + ( ) sin 1rad + = θ o 0 ( ) C 1 1 ( ) 14.1 0 ( ) C 2 + ( ) sin 1rad + 0 = = C 1 C 2 ( ) sin 1rad – = (1) θ' o t ( ) 0.5C – 1 e 0.5t – 14.1t C 2 + ( ) sin 14.1C 1 e 0.5t – 14.1t C 2 + ( ) cos – = 0 0.5C – 1 C 2 ( ) sin 14.1C 1 C 2 ( ) cos – = 14.1 C 2 ( ) cos 0.5 C 2 ( ) sin – = 14.1 0.5 – ---------- C 2 ( ) tan = C 2 1.54 – = C 1 1rad – C 2 ( ) sin ------------------- 1rad – 1.54 – ( ) sin -------------------------- 1.000rad = = = θ o t ( ) e 0.5t – 14.1t 1.54 – ( ) sin 1 + ( ) rad ( ) = page 352 5. A feedback control system is shown below. The system incorporates a PID controller. The θ o θ d ----- 20 0.01 ( ) D 2 D 20 0.01 ( ) + + --------------------------------------------- = d) θ o '' θ d ' θ d 0.2 + + 0.2θ d = Homogeneous: A 2 A 0.2 + + 0 = A 1 – 1 4 0.2 ( ) – t 2 ------------------------------------------ = θ o t ( ) C 1 e 0.724t – C 2 e 0.276t – + = Particular: θ A = 0 0 A0.2 + + 0.2 1rad ( ) = A 1rad = θ o t ( ) 1rad = Initial Conditions (assume at rest): θ o t ( ) C 1 e 0.724t – C 2 e 0.276t – 1rad + + = θ o 0 ( ) C 1 e 0.724t – C 2 e 0.276t – 1rad + + 0 = = C 1 C 2 + 1rad – = (1) θ' o t ( ) 0.724 C 1 e 0.724t – ( ) – 0.276 C 2 e 0.276t – ( ) – = A 0.7236068 – 0.2763932 – , = C 1 0.381C 2 – = 0.381C 2 – C 2 + 1rad – = C 2 1.616rad – = C 1 0.381 1.616rad – ( ) – 0.616rad = = θ o t ( ) 0.616 ( )e 0.724t – 1.616 – ( )e 0.276t – 1rad + + = page 353 closed loop transfer function is given. a) Verify the close loop controller function given. b) Draw a root locus plot for the controller if Kp=1 and Ki=1. Identify any values of Kd that would leave the system unstable. c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1. d) Select controller values that will result in a natural frequency of 2 rad/sec and damping coefficient of 0.5. Verify that the controller will be stable. e) For the parameters found in the last step can the initial values be found? f) If the values of Kd=1 and Ki=Kp=0, find the response to a unit ramp input as a function of time. K p K i D ----- K d D + + 3 D 9 + ------------- 4 + - X Y Y X --- D 2 3K d ( ) D 3K p ( ) 3K i ( ) + + D 2 12K d 1 + ( ) D 9 12K p + ( ) 12K i ( ) + + ----------------------------------------------------------------------------------------------- = K p D K i K d D 2 + + D ------------------------------------------- (ans. 3 D 9 + ------------- 4 + - X Y 3K p D 3K i 3K d D 2 + + D D 9 + ( ) ----------------------------------------------------- 4 + - X Y 3K p D 3K i 3K d D 2 + + D D 9 + ( ) 12K p D 12K i 12K d D 2 + + + ------------------------------------------------------------------------------------------- X Y 3K p D 3K i 3K d D 2 + + D 2 12K d 1 + ( ) D 9 12K p + ( ) 12K i ( ) + + ----------------------------------------------------------------------------------------------- X Y page 354 D 2 12K d 1 + ( ) D 9 12K p + ( ) 12K i ( ) + + 0 = b) D 9 – 12K p – 9 12K p + ( ) 2 4 12K d 1 + ( )12K i – t 2 12K d 1 + ( ) ------------------------------------------------------------------------------------------------------------------- = Stable for, 0 9 12K p + ( ) 2 4 12K d 1 + ( )12K i – > Becomes complex at, 576K d K i 9 12K p + ( ) 2 48K i – > K d 9 12K p + ( ) 2 48K i – 576K d K i ----------------------------------------------- > Kd -100 -10 -1 -0.1 0 1 10 100 roots -0.092, 0.109 -0.241, 0.418 -0.46, 2.369 -0.57, 105.6 -0.588, -20.41 -0.808 +/- 0.52j -0.087 +/- 0.303j -0.0087 +/- 0.1j K d 0.682 > 9 – 12K p – 9 12K p + ( ) 2 4 12K d 1 + ( )12K i – t 0 < 9 12K p + ( ) 2 4 12K d 1 + ( )12K i – t 9 12K p + < 9 12K p + ( ) 2 4 12K d 1 + ( )12K i – 9 12K p + ( ) 2 < 4 12K d 1 + ( )12K i – 0 < K d 1 – 12 ------ > page 355 c) Y X --- 3K p D 3K i 3K d D 2 + + D 2 12K d 1 + ( ) D 9 12K p + ( ) 12K i ( ) + + ----------------------------------------------------------------------------------------------- = K p 1 = K i 1 = K d 1 = Y X --- 3D 2 3D 3 + + D 2 13 D21 12 + + ------------------------------------------ 3 13 ----- - ¸ , ¸ _ D 2 D 1 + + D 2 D1.615 0.923 + + --------------------------------------------------- ¸ , ¸ _ = = for the numerator, ω n 1 1 = = ξ 1 2ω n --------- 0.5 = = ω d ω n 1 ξ 2 – 1 0.5 2 – 0.866 = = = for the denominator, ω n 0.923 0.961 = = ξ 1.615 2ω n ------------- 0.840 = = ω d ω n 1 ξ 2 – 0.961 1 0.840 2 – 0.521 = = = final gain 20 3 13 ----- - ¸ , ¸ _ log 12.7 – = = initial gain 20 3 12 ----- - ¸ , ¸ _ log 12.0 – = = -12dB page 356 Y X --- 3K p D 3K i 3K d D 2 + + D 2 12K d 1 + ( ) D 9 12K p + ( ) 12K i ( ) + + ----------------------------------------------------------------------------------------------- = ω n 12K i 12K d 1 + ---------------------- 2 = = 2ξω n 9 12K p + 12K d 1 + ---------------------- 20.5 2 ( ) = = 12K i 48K d 4 + = 24K d 7 12K p + = At this point there are two equations and two unknowns, one value must be selected to continue, therefore, K p 10 = 24K d 7 12K p + 7 12 10 ( ) + 127 = = = 12K i 48K d 4 + 48 5.292 ( ) 4 + 258.0 = = = K d 5.292 = K i 21.5 = D 2 12 5.292 ( ) 1 + ( ) D 9 12 10 ( ) + ( ) 12 21.5 ( ) ( ) + + 0 = Now to check for stability 64.504D 2 129D 258 + + 0 = D 129 – 129 2 4 64.5 ( )258 – t 2 64.5 ( ) --------------------------------------------------------------------- 1 – 1.73j t = = page 357 6. Draw a root locus plot for the control system below and determine acceptable values of K, including critical points. e) Cannot be found without an assumed input and initial conditions f) Y X --- 3 0 ( )D 3 0 ( ) 3 1 ( )D 2 + + D 2 12 1 ( ) 1 + ( ) D 9 12 0 ( ) + ( ) 12 0 ( ) ( ) + + ---------------------------------------------------------------------------------------------------- = Y X --- 3D 2 13D 2 9D + --------------------------- = Y 13D 2 9D + ( ) X 3D 2 ( ) = Y''13 Y' 9 + X''3 = X t = X' 1 = X'' 0 = Y'' Y' 9 13 ------ + 0 = Y t ( ) C 1 e 9 13 ------t – C 2 + = It is a first order system, Y 0 ( ) 0 = Y' 0 ( ) 0 = starts at rest/undeflected 0 C 1 1 C 2 + = C 1 C 2 – = Y' t ( ) 9 13 ------C – 1 e 9 13 ------t – = 0 9 13 ------ C – 1 1 = C 1 0 = C 2 0 = no response + - 0.1 D 2 10D 100 + + --------------------------------------- Y X K 5 1 D ---- D + + ¸ , ¸ _ 0.01 + - 10 D ----- - page 358 + - 0.1 D 2 10D 100 + + --------------------------------------- Y X K 5 1 D ---- D + + ¸ , ¸ _ 0.01 + - 10 D ----- - (ans. + - 0.1 D 2 10D 100 0.1 10 D ----- - ¸ , ¸ _ + + + ----------------------------------------------------------------- Y X K 5D 1 D 2 + + D ------------------------------ ¸ , ¸ _ 0.01 + - K 0.5D 0.1 0.1D 2 + + ( ) D 3 10D 2 100D 1 + + + -------------------------------------------------------- Y X 0.01 K 0.5D 0.1 0.1D 2 + + ( ) D 3 10D 2 100D 1 0.01 K 0.5D 0.1 0.1D 2 + + ( ) ( ) + + + + -------------------------------------------------------------------------------------------------------------------------------------- Y X K 0.5D 0.1 0.1D 2 + + ( ) D 3 D 2 10 0.001K + ( ) D 100 0.005K + ( ) 1 0.001K + ( ) + + + ----------------------------------------------------------------------------------------------------------------------------------------------- Y X page 359 D 3 D 2 10 0.001K + ( ) D 100 0.005K + ( ) 1 0.001K + ( ) + + + 0 = Given the homogeneous equation for the system, The roots can be found with a calculator, Mathcad, or equivalent. K -100,000 -1000 -10 0 10 1000 17165.12 100,000 roots 94.3, -3.992, -0.263 0, -4.5+/-8.65j -0.0099, -4.99+/-8.66j -0.01, -4.995+/-8.657j -0.01, -5+/-8.66j -0.019, -5.49+/-8.64j -0.099, -13.52, -13.546 -0.0174, -104.3, -5.572 notes roots become negative roots become real page 360 12. NONLINEAR SYSTEMS 12.1 INTRODUCTION • how they are different from linear - no transfer functions - new elements needed in block diagrams 12.2 SYSTEM DIAGRAMS 12.3 SUMMARY • Topics: Objectives: • • page 361 12.4 PRACTICE PROBLEMS 1. page 362 13. ANALOG INPUTS AND OUTPUTS 13.1 INTRODUCTION An analog value is continuous, not discrete, as shown in Figure 284. In the previ- ous chapters, techniques were discussed for designing logical control systems that had inputs and outputs that could only be on or off. These systems are less common than the logical control systems, but they are very important. In this chapter we will examine ana- log inputs and outputs so that we may design continuous control systems in a later chapter. Figure 284 Logical and Continuous Values Typical analog inputs and outputs for PLCs are listed below. Actuators and sensors that can be used with analog inputs and outputs will be discussed in later chapters. Inputs: • oven temperature • fluid pressure • fluid flow rate Topics: Objectives: • To understand the basics of conversion to and from analog values. • Analog inputs and outputs • Sampling issues; aliasing, quantization error, resolution Voltage t continuous logical page 363 Outputs: • fluid valve position • motor position • motor velocity This chapter will focus on the general principles behind digital-to-analog (D/A) and analog-to-digital (A/D) conversion. 13.2 ANALOG INPUTS To input an analog voltage (into a computer) the continuous voltage value must be sampled and then converted to a numerical value by an A/D converter. Figure 285 shows a continuous voltage changing over time. There are three samples shown on the figure. The process of sampling the data is not instantaneous, so each sample has a start and stop time. The time required to acquire the sample is called the sampling time. A/D converters can only acquire a limited number of samples per second. The time between samples is called the sampling period T, and the inverse of the sampling period is the sampling frequency (also called sampling rate). The sampling time is often much smaller than the sampling period. The sampling frequency is specified when buying hardware, but for a PLC a max- imum sampling rate might be 20Hz. Figure 285 Sampling an Analog Voltage voltage time Voltage is sampled during these time periods T = (Sampling Frequency) -1 Sampling time page 364 A more realistic drawing of sampled data is shown in Figure 286. This data is nois- ier, and even between the start and end of the data sample there is a significant change in the voltage value. The data value sampled will be somewhere between the voltage at the start and end of the sample. The maximum (Vmax) and minimum (Vmin) voltages are a function of the control hardware. These are often specified when purchasing hardware, but reasonable ranges are; 0V to 5V 0V to 10V -5V to 5V -10V to 10V The number of bits of the A/D converter is the number of bits in the result word. If the A/D converter is 8 bit then the result can read up to 256 different voltage levels. Most A/D converters have 12 bits, 16 bit converters are used for precision measurements. page 365 Figure 286 Parameters for an A/D Conversion The parameters defined in Figure 286 can be used to calculate values for A/D con- verters. These equations are summarized in Figure 287. Equation 1 relates the number of bits of an A/D converter to the resolution. Equation 2 gives the error that can be expected with an A/D converter given the range between the minimum and maximum voltages, and the resolution (this is commonly called the quantization error). Equation 3 relates the volt- age range and resolution to the voltage input to estimate the integer that the A/D converter will record. Finally, equation 4 allows a conversion between the integer value from the A/ D converter, and a voltage in the computer. V t ( ) t τ where, V t ( ) the actual voltage over ti me = τ sample interval for A/D converter = t time = t 1 t 2 V t 1 ( ) V t 2 ( ) V max V min t 1 t 2 , time at start,end of sample = V t 1 ( ) V t 2 ( ) , voltage at start, end of sample = V min V max , input voltage range of A/D converter = N number of bits in the A/D converter = page 366 Figure 287 A/D Converter Equations Consider a simple example, a 10 bit A/D converter can read voltages between - 10V and 10V. This gives a resolution of 1024, where 0 is -10V and 1023 is +10V. Because there are only 1024 steps there is a maximum error of ±9.8mV. If a voltage of 4.564V is input into the PLC, the A/D converter converts the voltage to an integer value of 746. When we convert this back to a voltage the result is 4.570V. The resulting quantization error is 4.570V-4.564V=+0.006V. This error can be reduced by selecting an A/D con- verter with more bits. Each bit halves the quantization error. R 2 N = where, R resolution of A/D converter = V I INT V in V min – V max V min – ----------------------------- ¸ , ¸ _ R 1 – ( ) = V I the integer value representing the input voltage = V C V I R 1 – ------------ ¸ , ¸ _ V max V min – ( ) V min + = V C the voltage calculated from the integer value = V ERROR V max V min – 2R ----------------------------- ¸ , ¸ _ = V ERROR the maximum quantization error = (1) (3) (4) (2) page 367 Figure 288 Sample Calculation of A/D Values If the voltage being sampled is changing too fast we may get false readings, as shown in Figure 289. In the upper graph the waveform completes seven cycles, and 9 sam- ples are taken. The bottom graph plots out the values read. The sampling frequency was too low, so the signal read appears to be different that it actually is, this is called aliasing. N 10 = R 2 N 1024 = = V I INT V in V min – V max V min – ----------------------------- ¸ , ¸ _ R 746 = = V C V I R ----- ¸ , ¸ _ V max V min – ( ) V min + 4.570V = = V ERROR V max V min – 2R ----------------------------- ¸ , ¸ _ 0.0098V = = V max 10V = V min 10V – = V in 4.564V = Given, Calculate, page 368 Figure 289 Low Sampling Frequencies Cause Aliasing The Nyquist criterion specifies that sampling frequencies should be at least twice the frequency of the signal being measured, otherwise aliasing will occur. The example in Figure 289 violated this principle, so the signal was aliased. If this happens in real applica- tions the process will appear to operate erratically. In practice the sample frequency should be 4 or more times faster than the system frequency. There are other practical details that should be considered when designing applica- tions with analog inputs; • Noise - Since the sampling window for a signal is short, noise will have added effect on the signal read. For example, a momentary voltage spike might result in a higher than normal reading. Shielded data cables are commonly used to reduce the noise levels. • Delay - When the sample is requested, a short period of time passes before the final sample value is obtained. • Multiplexing - Most analog input cards allow multiple inputs. These may share the A/D converter using a technique called multiplexing. If there are 4 channels f AD 2f signal > where, f AD sampling frequency = f signal maximum frequency of the input = page 369 using an A/D converter with a maximum sampling rate of 100Hz, the maximum sampling rate per channel is 25Hz. • Signal Conditioners - Signal conditioners are used to amplify, or filter signals coming from transducers, before they are read by the A/D converter. • Resistance - A/D converters normally have high input impedance (resistance), so they affect circuits they are measuring. • Single Ended Inputs - Voltage inputs to a PLC can use a single common for mul- tiple inputs, these types of inputs are called single ended inputs. These tend to be more prone to noise. • Double Ended Inputs - Each double ended input has its own common. This reduces problems with electrical noise, but also tends to reduce the number of inputs by half. page 370 Figure 290 A Successive Approximation A/D Converter 13.3 ANALOG OUTPUTS Analog outputs are much simpler than analog inputs. To set an analog output an integer is converted to a voltage. This process is very fast, and does not experience the timing problems with analog inputs. But, analog outputs are subject to quantization errors. Figure 291 gives a summary of the important relationships. These relationships are almost D to A converter successive approximation logic 8 8 + - clock reset data out +Vref -Vref Vin Ve Vin above (+ve) or below (-ve) Ve ASIDE: This device is an 8 bit A/D converter. The main concept behind this is the succes- sive approximation logic. Once the reset is toggled the converter will start by setting the most significant bit of the 8 bit number. This will be converted to a voltage Ve that is a function of the +/-Vref values. The value of Ve is compared to Vin and a simple logic check determines which is larger. If the value of Ve is larger the bit is turned off. The logic then repeats similar steps from the most to least significant bits. Once the last bit has been set on/off and checked the conversion will be complete, and a done bit can be set to indicate a valid conversion value. done Quite often an A/D converter will multiplex between various inputs. As it switches the voltage will be sampled by a sample and hold circuit. This will then be converted to a digital value. The sample and hold circuits can be used before the multiplexer to collect data values at the same instant in time. page 371 identical to those of the A/D converter. Figure 291 Analog Output Relationships Assume we are using an 8 bit D/A converter that outputs values between 0V and 10V. We have a resolution of 256, where 0 results in an output of 0V and 255 results in 10V. The quantization error will be 20mV. If we want to output a voltage of 6.234V, we would specify an output integer of 160, this would result in an output voltage of 6.250V. The quantization error would be 6.250V-6.234V=0.016V. R 2 N = where, R resolution of A/D converter = V I INT V desired V min – V max V min – ----------------------------------- ¸ , ¸ _ R = V I the integer value representing the desired voltage = V output V I R ----- ¸ , ¸ _ V max V min – ( ) V min + = V output the voltage output using the integer value = V ERROR V max V min – 2R ----------------------------- ¸ , ¸ _ = V ERROR the maximum quantization error = (18.5) (18.7) (18.8) (18.6) V desired the desired output voltage = page 372 The current output from a D/A converter is normally limited to a small value, typi- cally less than 20mA. This is enough for instrumentation, but for high current loads, such as motors, a current amplifier is needed. This type of interface will be discussed later. If the current limit is exceeded for 5V output, the voltage will decrease (so don’t exceed the rated voltage). If the current limit is exceeded for long periods of time the D/A output may be damaged. N 8 = R 2 N 256 = = V I INT V in V min – V max V min – ----------------------------- ¸ , ¸ _ R 160 = = V C V I R ----- ¸ , ¸ _ V max V min – ( ) V min + 6.250V = = V ERROR V max V min – 2R ----------------------------- ¸ , ¸ _ 0.020V = = V max 10V = V min 0V = V desired 6.234V = Given, Calculate, page 373 Figure 292 A Digital-To-Analog Converter 13.4 SHIELDING When a changing magnetic field cuts across a conductor, it will induce a current flow. The resistance in the circuits will convert this to a voltage. These unwanted voltages result in erroneous readings from sensors, and signal to outputs. Shielding will reduce the effects of the interference. When shielding and grounding are done properly, the effects of electrical noise will be negligible. Shielding is normally used for; all logical signals in noisy environments, high speed counters or high speed circuitry, and all analog signals. Computer bit 3 bit 2 bit 1 bit 0 MSB LSB - + 20KΩ 10KΩ 40KΩ 80KΩ 5KΩ V o + - 0 V ss V + V – V + 0 V – = = First we write the obvious, Next, sum the currents into the inverting input as a function of the output voltage and the input voltages from the computer, V b 3 10KΩ --------------- V b 2 20KΩ --------------- V b 1 40KΩ --------------- V b 0 80KΩ --------------- + + + V o 5KΩ ------------ = V ∴ o 0.5V b 3 0.25V b 2 0.125V b 1 0.0625V b 0 + + + = Consider an example where the binary output is 1110, with 5V for on, V ∴ o 0.5 5V ( ) 0.25 5V ( ) 0.125 5V ( ) 0.625 0V ( ) + + + 4.375V = = ASIDE: page 374 There are two major approaches to reducing noise; shielding and twisted pairs. Shielding involves encasing conductors and electrical equipment with metal. As a result electrical equipment is normally housed in metal cases. Wires are normally put in cables with a metal sheath surrounding both wires. The metal sheath may be a thin film, or a woven metal mesh. Shielded wires are connected at one end to "drain" the unwanted sig- nals into the cases of the instruments. Figure 293 shows a thermocouple connected with a thermocouple. The cross section of the wire contains two insulated conductors. Both of the wires are covered with a metal foil, and final covering of insulation finishes the cable. The wires are connected to the thermocouple as expected, but the shield is only connected on the amplifier end to the case. The case is then connected to the shielding ground, shown here as three diagonal lines. Figure 293 Shielding for a Thermocouple A twisted pair is shown in Figure 294. The two wires are twisted at regular inter- vals, effectively forming small loops. In this case the small loops reverse every twist, so any induced currents are cancel out for every two twists. Figure 294 A Twisted Pair Insulated wires Metal sheath Insulating cover Two conductor shielded cable cross section 1" or less typical page 375 When designing shielding, the following design points will reduce the effects of electromagnetic interference. • Avoid “noisy” equipment when possible. • Choose a metal cabinet that will shield the control electronics. • Use shielded cables and twisted pair wires. • Separate high current, and AC/DC wires from each other when possible. • Use current oriented methods such as sourcing and sinking for logical I/O. • Use high frequency filters to eliminate high frequency noise. • Use power line filters to eliminate noise from the power supply. 13.5 SUMMARY • A/D conversion will convert a continuous value to an integer value. • D/A conversion is easier and faster and will convert a digital value to an analog value. • Resolution limits the accuracy of A/D and D/A converters. • Sampling too slowly will alias the real signal. • Analog inputs are sensitive to noise. • Analog shielding should be used to improve the quality of electrical signals. 13.6 PRACTICE PROBLEMS 1. Analog inputs require: a) A Digital to Analog conversion at the PLC input interface module b) Analog to Digital conversion at the PLC input interface module c) No conversion is required d) None of the above (ans. b) 2. You need to read an analog voltage that has a range of -10V to 10V to a precision of +/-0.05V. What resolution of A/D converter is needed? 3. We are given a 12 bit analog input with a range of -10V to 10V. If we put in 2.735V, what will R 10V 10V – ( ) – 0.1V ---------------------------------- 200 = = 7 bits = 128 8 bits = 256 (ans. The minimum number of bits is 8. page 376 the integer value be after the A/D conversion? What is the error? What voltage can we calcu- late? (ans. N 12 = R 4096 = V min 10V – = V max 10V = V I INT V in V min – V max V min – ----------------------------- ¸ , ¸ _ R 2608 = = V C V I R ----- ¸ , ¸ _ V max V min – ( ) V min + 2.734V = = V in 2.735V = page 377 14. CONTINUOUS SENSORS 14.1 INTRODUCTION Continuous sensors convert physical phenomena to measurable signals, typically voltages or currents. Consider a simple temperature measuring device, there will be an increase in output voltage proportional to a temperature rise. A computer could measure the voltage, and convert it to a temperature. The basic physical phenomena typically mea- sured with sensors include; - angular or linear position - acceleration - temperature - pressure or flow rates - stress, strain or force - light intensity - sound Most of these sensors are based on subtle electrical properties of materials and devices. As a result the signals often require signal conditioners. These are often amplifi- ers that boost currents and voltages to larger voltages. Sensors are also called transducers. This is because they convert an input phenom- ena to an output in a different form. This transformation relies upon a manufactured device with limitations and imperfection. As a result sensor limitations are often charac- Topics: Objectives: • To understand the common continuous sensor types. • To understand interfacing issues. • Continuous sensor issues; accuracy, resolution, etc. • Angular measurement; potentiometers, encoders and tachometers • Linear measurement; potentiometers, LVDTs, Moire fringes and accelerometers • Force measurement; strain gages and piezoelectric • Liquid and fluid measurement; pressure and flow • Temperature measurement; RTDs, thermocouples and thermistors • Other sensors • Continuous signal inputs and wiring • Glossary page 378 terized with; Accuracy - This is the maximum difference between the indicated and actual read- ing. For example, if a sensor reads a force of 100N with a ±1% accuracy, then the force could be anywhere from 99N to 101N. Resolution - Used for systems that step through readings. This is the smallest increment that the sensor can detect, this may also be incorporated into the accuracy value. For example if a sensor measures up to 10 inches of linear dis- placements, and it outputs a number between 0 and 100, then the resolution of the device is 0.1 inches. Repeatability - When a single sensor condition is made and repeated, there will be a small variation for that particular reading. If we take a statistical range for repeated readings (e.g., ±3 standard deviations) this will be the repeatability. For example, if a flow rate sensor has a repeatability of 0.5cfm, readings for an actual flow of 100cfm should rarely be outside 99.5cfm to 100.5cfm. Linearity - In a linear sensor the input phenomenon has a linear relationship with the output signal. In most sensors this is a desirable feature. When the relation- ship is not linear, the conversion from the sensor output (e.g., voltage) to a cal- culated quantity (e.g., force) becomes more complex. Precision - This considers accuracy, resolution and repeatability or one device rel- ative to another. Range - Natural limits for the sensor. For example, a sensor for reading angular rotation may only rotate 200 degrees. Dynamic Response - The frequency range for regular operation of the sensor. Typ- ically sensors will have an upper operation frequency, occasionally there will be lower frequency limits. For example, our ears hear best between 10Hz and 16KHz. Environmental - Sensors all have some limitations over factors such as tempera- ture, humidity, dirt/oil, corrosives and pressures. For example many sensors will work in relative humidities (RH) from 10% to 80%. Calibration - When manufactured or installed, many sensors will need some cali- bration to determine or set the relationship between the input phenomena, and output. For example, a temperature reading sensor may need to be zeroed or adjusted so that the measured temperature matches the actual temperature. This may require special equipment, and need to be performed frequently. Cost - Generally more precision costs more. Some sensors are very inexpensive, but the signal conditioning equipment costs are significant. 14.2 INDUSTRIAL SENSORS This section describes sensors that will be of use for industrial measurements. The sections have been divided by the phenomena to be measured. Where possible details are provided. page 379 14.2.1 Angular Displacement 14.2.1.1 - Potentiometers Potentiometers measure the angular position of a shaft using a variable resistor. A potentiometer is shown in Figure 295. The potentiometer is resistor, normally made with a thin film of resistive material. A wiper can be moved along the surface of the resistive film. As the wiper moves toward one end there will be a change in resistance proportional to the distance moved. If a voltage is applied across the resistor, the voltage at the wiper interpolate the voltages at the ends of the resistor. Figure 295 A Potentiometer The potentiometer in Figure 296 is being used as a voltage divider. As the wiper rotates the output voltage will be proportional to the angle of rotation. schematic physical resistive wiper film V 1 V 2 V w V 1 V w V 2 page 380 Figure 296 A Potentiometer as a Voltage Divider Potentiometers are popular because they are inexpensive, and don’t require special signal conditioners. But, they have limited accuracy, normally in the range of 1% and they are subject to mechanical wear. Potentiometers measure absolute position, and they are calibrated by rotating them in their mounting brackets, and then tightening them in place. The range of rotation is nor- mally limited to less than 360 degrees or multiples of 360 degrees. Some potentiometers can rotate without limits, and the wiper will jump from one end of the resistor to the other. Faults in potentiometers can be detected by designing the potentiometer to never reach the ends of the range of motion. If an output voltage from the potentiometer ever reaches either end of the range, then a problem has occurred, and the machine can be shut down. Two examples of problems that might cause this are wires that fall off, or the poten- tiometer rotates in its mounting. 14.2.2 Encoders Encoders use rotating disks with optical windows, as shown in Figure 297. The encoder contains an optical disk with fine windows etched into it. Light from emitters passes through the openings in the disk to detectors. As the encoder shaft is rotated, the light beams are broken. The encoder shown here is a quadrature encode, and it will be dis- cussed later. V 2 V 1 V out V out V 2 V 1 – ( ) θ w θ max ----------- ¸ , ¸ _ V 1 + = θ max θ w page 381 Figure 297 An Encoder Disk There are two fundamental types of encoders; absolute and incremental. An abso- lute encoder will measure the position of the shaft for a single rotation. The same shaft angle will always produce the same reading. The output is normally a binary or grey code number. An incremental (or relative) encoder will output two pulses that can be used to determine displacement. Logic circuits or software is used to determine the direction of rotation, and count pulses to determine the displacement. The velocity can be determined by measuring the time between pulses. Encoder disks are shown in Figure 298. The absolute encoder has two rings, the outer ring is the most significant digit of the encoder, the inner ring is the least significant digit. The relative encoder has two rings, with one ring rotated a few degrees ahead of the other, but otherwise the same. Both rings detect position to a quarter of the disk. To add accuracy to the absolute encoder more rings must be added to the disk, and more emitters and detectors. To add accuracy to the relative encoder we only need to add more windows to the existing two rings. Typical encoders will have from 2 to thousands of windows per ring. light emitters light detectors Shaft rotates Note: this type of encoder is commonly used in com- puter mice with a roller ball. page 382 Figure 298 Encoder Disks When using absolute encoders, the position during a single rotation is measured directly. If the encoder rotates multiple times then the total number of rotations must be counted separately. When using a relative encoder, the distance of rotation is determined by counting the pulses from one of the rings. If the encoder only rotates in one direction then a simple count of pulses from one ring will determine the total distance. If the encoder can rotate both directions a second ring must be used to determine when to subtract pulses. The quadrature scheme, using two rings, is shown in Figure 299. The signals are set up so that one is out of phase with the other. Notice that for different directions of rotation, input B either leads or lags A. relative encoder absolute encoder (quadrature) sensors read across a single radial line page 383 Figure 299 Quadrature Encoders Interfaces for encoders are commonly available for PLCs and as purchased units. Newer PLCs will also allow two normal inputs to be used to decode encoder inputs. Quad input A Quad Input B total displacement can be determined Quad input A Quad Input B Note the change as direction is reversed by adding/subtracting pulse counts (direction determines add/subtract) Note: To determine direction we can do a simple check. If both are off or on, the first to change state determines direction. Consider a point in the graphs above where both A and B are off. If A is the first input to turn on the encoder is rotating clock- wise. If B is the first to turn on the rotation is counterclockwise. clockwise rotation counterclockwise rotation Aside: A circuit (or program) can be built for this circuit using an up/down counter. If the positive edge of input A is used to trigger the clock, and input B is used to drive the up/down count, the counter will keep track of the encoder position. page 384 Normally absolute and relative encoders require a calibration phase when a con- troller is turned on. This normally involves moving an axis until it reaches a logical sensor that marks the end of the range. The end of range is then used as the zero position. Machines using encoders, and other relative sensors, are noticeable in that they normally move to some extreme position before use. 14.2.2.1 - Tachometers Tachometers measure the velocity of a rotating shaft. A common technique is to mount a magnet to a rotating shaft. When the magnetic moves past a stationary pick-up coil, current is induced. For each rotation of the shaft there is a pulse in the coil, as shown in Figure 300. When the time between the pulses is measured the period for one rotation can be found, and the frequency calculated. This technique often requires some signal conditioning circuitry. Figure 300 A Magnetic Tachometer Another common technique uses a simple permanent magnet DC generator (note: you can also use a small DC motor). The generator is hooked to the rotating shaft. The rotation of a shaft will induce a voltage proportional to the angular velocity. This tech- nique will introduce some drag into the system, and is used where efficiency is not an issue. Both of these techniques are common, and inexpensive. 14.2.3 Linear Position 14.2.3.1 - Potentiometers rotating shaft magnet pickup coil Vout Vout t 1/f page 385 Rotational potentiometers were discussed before, but potentiometers are also available in linear/sliding form. These are capable of measuring linear displacement over long distances. Figure 301 shows the output voltage when using the potentiometer as a voltage divider. Figure 301 Linear Potentiometer Linear/sliding potentiometers have the same general advantages and disadvantages of rotating potentiometers. 14.2.3.2 - Linear Variable Differential Transformers (LVDT) Linear Variable Differential Transformers (LVDTs) measure linear displacements over a limited range. The basic device is shown in Figure 302. It consists of outer coils with an inner moving magnetic core. High frequency alternating current (AC) is applied to the center coil. This generates a magnetic field that induces a current in the two outside coils. The core will pull the magnetic field towards it, so in the figure more current will be induced in the left hand coil. The outside coils are wound in opposite directions so that when the core is in the center the induced currents cancel, and the signal out is zero (0Vac). The magnitude of the signal out voltage on either line indicates the position of the core. Near the center of motion the change in voltage is proportional to the displacement. But, further from the center the relationship becomes nonlinear. L a V 1 V 2 V out V out V 1 V 2 V 1 – ( ) a L --- ¸ , ¸ _ + = page 386 Figure 302 An LVDT Figure 303 A Simple Signal Conditioner for an LVDT These devices are more accurate than linear potentiometers, and have less friction. Typical applications for these devices include measuring dimensions on parts for quality AC input signal out A rod drives the sliding core ∆x ∆V K∆x = where, ∆V output voltage = K constant for device = ∆x core displacement = LVDT Vac in Vac out Vdc out Aside: The circuit below can be used to produce a voltage that is proportional to position. The two diodes convert the AC wave to a half wave DC wave. The capacitor and resis- tor values can be selected to act as a low pass filter. The final capacitor should be large enough to smooth out the voltage ripple on the output. page 387 control. They are often used for pressure measurements with Bourdon tubes and bellows/ diaphragms. A major disadvantage of these sensors is the high cost, often in the thousands. 14.2.3.3 - Moire Fringes High precision linear displacement measurements can be made with Moire Fringes, as shown in Figure 304. Both of the strips are transparent (or reflective), with black lines at measured intervals. The spacing of the lines determines the accuracy of the position measurements. The stationary strip is offset at an angle so that the strips interfere to give irregular patterns. As the moving strip travels by a stationary strip the patterns will move up, or down, depending upon the speed and direction of motion. Figure 304 The Moire Fringe Effect A device to measure the motion of the moire fringes is shown in Figure 305. A light source is collimated by passing it through a narrow slit to make it one slit width. This is then passed through the fringes to be detected by light sensors. At least two light sensors are needed to detect the bright and dark locations. Two sensors, close enough, can act as a quadrature pair, and the same method used for quadrature encoders can be used to deter- mine direction and distance of motion. Note: you can recreate this effect with the strips below. Photocopy the pattern twice, overlay the sheets and hold them up to the light. You will notice that shifting one sheet will cause the stripes to move up or down. Moving Stationary page 388 Figure 305 Measuring Motion with Moire Fringes These are used in high precision applications over long distances, often meters. They can be purchased from a number of suppliers, but the cost will be high. Typical applications include Coordinate Measuring Machines (CMMs). 14.2.3.4 - Accelerometers Accelerometers measure acceleration using a mass suspended on a force sensor, as shown in Figure 306. When the sensor accelerates, the inertial resistance of the mass will cause the force sensor to deflect. By measuring the deflection the acceleration can be determined. In this case the mass is cantilevered on the force sensor. A base and housing enclose the sensor. A small mounting stud (a threaded shaft) is used to mount the acceler- ometer. Figure 306 A Cross Section of an Accelerometer Accelerometers are dynamic sensors, typically used for measuring vibrations on off on off Mass Force Sensor Base Mounting Stud Housing page 389 between 10Hz to 10KHz. Temperature variations will affect the accuracy of the sensors. Standard accelerometers can be linear up to 100,000 m/s**2: high shock designs can be used up to 1,000,000 m/s**2. There is often a trade-off between a wide frequency range and device sensitivity (note: higher sensitivity requires a larger mass). Figure 307 shows the sensitivity of two accelerometers with different resonant frequencies. A smaller reso- nant frequency limits the maximum frequency for the reading. The smaller frequency results in a smaller sensitivity. The units for sensitivity is charge per m/s**2. Figure 307 Piezoelectric Accelerometer Sensitivities The force sensor is often a small piece of piezoelectric material (discussed later in this chapter). The piezoelectic material can be used to measure the force in shear or com- pression. Piezoelectric based accelerometers typically have parameters such as, -100to250°C operating range 1mV/g to 30V/g sensitivity operate well below one forth of the natural frequency The accelerometer is mounted on the vibration source as shown in Figure 308. The accelerometer is electrically isolated from the vibration source so that the sensor may be grounded at the amplifier (to reduce electrical noise). Cables are fixed to the surface of the vibration source, close to the accelerometer, and are fixed to the surface as often as possi- ble to prevent noise from the cable striking the surface. Background vibrations can be detected by attaching control electrodes to non-vibrating surfaces. Each accelerometer is different, but some general application guidelines are; • The control vibrations should be less than 1/3 of the signal for the error to be less than 12%). • Mass of the accelerometers should be less than a tenth of the measurement mass. • These devices can be calibrated with shakers, for example a 1g shaker will hit a peak velocity of 9.81 m/s**2. sensitivity 4.5 pC/(m/s**2) .004 resonant freq. (Hz) 22 KHz 180KHz page 390 Figure 308 Mounting an Accelerometer Equipment normally used when doing vibration testing is shown in Figure 309. The sensor needs to be mounted on the equipment to be tested. A pre-amplifier normally converts the charge generated by the accelerometer to a voltage. The voltage can then be analyzed to determine the vibration frequencies. Figure 309 Typical Connection for Accelerometers Accelerometers are commonly used for control systems that adjust speeds to reduce vibration and noise. Computer Controlled Milling machines now use these sensors to actively eliminate chatter, and detect tool failure. The signal from accelerometers can be accelerometer isolated isolated surface hookup wire wafer stud Sealant to prevent moisture pre- amp signal processor/ recorder Source of vibrations, or site for vibration measurement Sensor control system page 391 integrated to find velocity and acceleration. Currently accelerometers cost hundreds or thousands per channel. But, advances in micromachining are already beginning to provide integrated circuit accelerometers at a low cost. Their current use is for airbag deployment systems in automobiles. 14.2.4 Forces and Moments 14.2.4.1 - Strain Gages Strain gages measure strain in materials using the change in resistance of a wire. The wire is glued to the surface of a part, so that it undergoes the same strain as the part (at the mount point). Figure 310 shows the basic properties of the undeformed wire. Basi- cally, the resistance of the wire is a function of the resistivity, length, and cross sectional area. Figure 310 The Electrical Properties of a Wire + - V I t w L R V I --- ρ L A --- ρ L wt ----- - = = = where, R resistance of wire = V I , voltage and current = L length of wire = w t , width and thickness = A cross sectional area of conductor = ρ resistivity of material = page 392 After the wire in Figure 310 has been deformed it will take on the new dimensions and resistance shown in Figure 311. If a force is applied as shown, the wire will become longer, as predicted by Young’s modulus. But, the cross sectional area will decrease, as predicted by Poison’s ratio. The new length and cross sectional area can then be used to find a new resistance. Figure 311 The Electrical and Mechanical Properties of the Deformed Wire t’ w’ L’ R' ρ L' w' t' -------- ρ L 1 ε + ( ) w 1 νε – ( )t 1 νε – ( ) ---------------------------------------------- ¸ , ¸ _ = = where, ν poissons ratio for the material = F applied force = E Youngs modulusforthematerial = σ ε , stress and strain of material = F σ F A --- F wt ------ Eε = = = ∆R ∴ R' R – R 1 ε + ( ) 1 νε – ( ) 1 νε – ( ) ---------------------------------------- 1 – = = ε ∴ F Ewt --------- - = page 393 Figure 312 Measuring Strain with a Wheatstone Bridge A strain gage must be small for accurate readings, so the wire is actually wound in a uniaxial or rosette pattern, as shown in Figure 313. When using uniaxial gages the direc- tion is important, it must be placed in the direction of the normal stress. (Note: the gages cannot read shear stress.) Rosette gages are less sensitive to direction, and if a shear force is present the gage will measure the resulting normal force at 45 degrees. These gauges are sold on thin films that are glued to the surface of a part. The process of mounting strain gages involves surface cleaning. application of adhesives, and soldering leads to the strain gages. R4 R5 R1 R3 R2 Rstrain Vo V+ - + Aside: Changes in strain gauge resistance are typically small (large values would require strains that would cause the gauges to plastically deform). As a result, Wheatstone bridges are used to amplify the small change. In this circuit the variable resistor R2 would be tuned until Vo = 0V. Then the resistance of the strain gage can be calculated using the given equation. R strain R 2 R 1 R 3 ------------ = when Vo = 0V page 394 Figure 313 Wire Arrangements in Strain Gages A design techniques using strain gages is to design a part with a narrowed neck to mount the strain gage on, as shown in Figure 314. In the narrow neck the strain is propor- tional to the load on the member, so it may be used to measure force. These parts are often called load cells. Figure 314 Using a Narrow to Increase Strain Strain gauges are inexpensive, and can be used to measure a wide range of stresses with accuracies under 1%. Gages require calibration before each use. This often involves making a reading with no load, or a known load applied. An example application includes using strain gages to measure die forces during stamping to estimate when maintenance is needed. 14.2.4.2 - Piezoelectric When a crystal undergoes strain it displaces a small amount of charge. In other words, when the distance between atoms in the crystal lattice changes some electrons are forced out or drawn in. This also changes the capacitance of the crystal. This is known as uniaxial rosette s t r e s s d i r e c t i o n F F mounted in narrow section to increase strain effect page 395 the Piezoelectric effect. Figure 315 shows the relationships for a crystal undergoing a lin- ear deformation. The charge generated is a function of the force applied, the strain in the material, and a constant specific to the material. The change in capacitance is proportional to the change in the thickness. Figure 315 The Piezoelectric Effect These crystals are used for force sensors, but they are also used for applications such as microphones and pressure sensors. Applying an electrical charge can induce strain, allowing them to be used as actuators, such as audio speakers. When using piezoelectric sensors charge amplifiers are needed to convert the small amount of charge to a larger voltage. These sensors are best suited to dynamic measure- ments, when used for static measurements they tend to drift or slowly lose charge, and the signal value will change. b c a F F + q - where, C εab c --------- = C capacitance change = a b c , , geometry of material = ε dielectric constant (quartz typ. 4.06*10**-11 F/m) = i current generated = F force applied = g constant for material (quartz typ. 50*10**-3 Vm/N) = E Youngs modulus (quartz typ. 8.6*10**10 N/m**2) = i εg d dt -----F = page 396 14.2.5 Liquids and Gases 14.2.5.1 - Pressure Figure 316 shows different two mechanisms for pressure measurement. The Bour- don tube uses a circular pressure tube. When the pressure inside is higher than the sur- rounding air pressure (14.7psi approx.) the tube will straighten. A position sensor, connected to the end of the tube, will be elongated when the pressure increases. Figure 316 Pressure Transducers These sensors are very common and have typical accuracies of 0.5%. 14.2.5.2 - Venturi Valves When a flowing fluid or gas passes through a narrow pipe section (neck) the pres- sure drops. If there is no flow the pressure before and after the neck will be the same. The faster the fluid flow, the greater the pressure difference before and after the neck. This is known as a Venturi valve. Figure 317 shows a Venturi valve being used to measure a fluid flow rate. The fluid flow rate will be proportional to the pressure difference before and at the neck of the valve. pressure a) Bourdon Tube p o s i t i o n s e n s o r position sensor pressure b) Baffle pressure increase pressure increase page 397 Figure 317 A Venturi Valve differential fluid flow pressure transducer page 398 Figure 318 The Pressure Relationship for a Venturi Valve Venturi valves allow pressures to be read without moving parts, which makes them very reliable and durable. They work well for both fluids and gases. It is also common to use Venturi valves to generate vacuums for actuators, such as suction cups. 14.2.5.3 - Coriolis Flow Meter Fluid passes through thin tubes, causing them to vibrate. As the fluid approaches the point of maximum vibration it accelerates. When leaving the point it decellerates. The Aside: Bernoulli’s equation can be used to relate the pressure drop in a venturi valve. where, p ρ --- v 2 2 ----- gz + + C = p pressure = ρ density = v velocity = g gravitational constant = z height above a reference = C constant = p before ρ ---------------- v before 2 2 ------------------ gz + + C p after ρ ------------ v after 2 2 -------------- gz + + = = Consider the centerline of the fluid flow through the valve. Assume the fluid is incom- pressible, so the density does not change. And, assume that the center line of the valve does not change. This gives us a simpler equation, as shown below, that relates the velocit and pressure before and after it is compressed. p before ρ ---------------- v before 2 2 ------------------ + p after ρ ------------ v after 2 2 -------------- + = p before p after – ρ v after 2 2 -------------- v before 2 2 ------------------ – ¸ , ¸ _ = The flow velocity v in the valve will be larger than the velocity in the larger pipe sec- tion before. So, the right hand side of the expression will be positive. This will mean that the pressure before will always be higher than the pressure after, and the difference will be proportional to the velocity squared. page 399 result is a distributed force that causes a bending moment, and hence twisting of the pipe. The amount of bending is proportional to the velocity of the fluid flow. These devices typ- ically have a large constriction on the flow, and result is significant loses. Some of the devices also use bent tubes to increase the sensistivity, but this also increases the flow resistance. The typical accuracy for a corriolis flowmeter is 0.1%. 14.2.5.4 - Magnetic Flow Meter A magnetic sensor applies a magnetic field perpendiculr to the flow of a conduc- tive fluid. As the fluid moves, the electrons in the fluid experience an electromotive force. The result is that a potential (voltage) can be measured purpendicular to the direction of the flow and the magnetic field. The higher the flow rate, the greater the voltage. The typ- ical accuracy for these sensors is 0.5%. These flowmeters don’t oppose fluid flow, and so they don’t result in pressure drops. 14.2.5.5 - Ultrasonic Flow Meter A transmitter emits a high frequency sound at point on a tube. The signal must then pass through the fluid to a detector where it is picked up. If the fluid is flowing in the same direction as the sound it will arrive sooner. If the sound is against the flow it will take longer to arrive. In a transit time flow meter two sounds are used, one traveling forward, and the other in the opposite direction. The difference in travel time for the sounds is used to determine the flow velocity. A doppler flowmeter bounces a soundwave off particle in a flow. If the particle is moving away from the emitter and detector pair, then the detected frequency will be low- ered, if it is moving towards them the frequency will be higher. The transmitter and receiver have a minimal impact on the fluid flow, and therfore don’t result in pressure drops. 14.2.5.6 - Vortex Flow Meter Fluid flowing past a large (typically flat) obstacle will shed vortices. The fre- quency of the vortices will be proportional to the flow rate. Measuring the frequency allows an estimate of the flow rate. These sensors tend be low cost and are popular for low accuracy applications. page 400 14.2.5.7 - Pitot Tubes Gas flow rates can be measured using Pitot tubes, as shown in Figure 319. These are small tubes that project into a flow. The diameter of the tube is small (typically less than 1/8") so that it doesn’t affect the flow. Figure 319 Pitot Tubes for Measuring Gas Flow Rates 14.2.6 Temperature Temperature measurements are very common with control systems. The tempera- ture ranges are normally described with the following classifications. very low temperatures <-60 deg C - e.g. superconductors in MRI units low temperature measurement -60 to 0 deg C - e.g. freezer controls fine temperature measurements 0 to 100 deg C - e.g. environmental controls high temperature measurements <3000 deg F - e.g. metal refining/processing very high temperatures > 2000 deg C - e.g. plasma systems 14.2.6.1 - Resistive Temperature Detectors (RTDs) When a metal wire is heated the resistance increases. So, a temperature can be measured using the resistance of a wire. Resistive Temperature Detectors (RTDs) nor- mally use a wire or film of platinum, nickel, copper or nickel-iron alloys. The metals are gas flow pitot connecting hose pressure sensor tube page 401 wound or wrapped over an insulator, and covered for protection. The resistances of these alloys are shown in Figure 320. Figure 320 RTD Properties These devices have positive temperature coefficients that cause resistance to increase linearly with temperature. A platinum RTD might have a resistance of 100 ohms at 0C, that will increase by 0.4 ohms/°C. The total resistance of an RTD might double over the temperature range. A current must be passed through the RTD to measure the resistance. (Note: a volt- age divider can be used to convert the resistance to a voltage.) The current through the RTD should be kept to a minimum to prevent self heating. These devices are more linear than thermocouples, and can have accuracies of 0.05%. But, they can be expensive 14.2.6.2 - Thermocouples Each metal has a natural potential level, and when two different metals touch there is a small potential difference, a voltage. (Note: when designing assemblies, dissimilar metals should not touch, this will lead to corrosion.) Thermocouples use a junction of dis- similar metals to generate a voltage proportional to temperature. This principle was dis- covered by T.J. Seebeck. The basic calculations for thermocouples are shown in Figure 321. This calcula- tion provides the measured voltage using a reference temperature and a constant specific to the device. The equation can also be rearranged to provide a temperature given a volt- age. Material Platinum Nickel Copper Typical 100 120 10 Temperature -200 - 850 (-328 - 1562) -80 - 300 (-112 - 572) -200 - 260 (-328 - 500) Resistance (ohms) Range C (F) page 402 Figure 321 Thermocouple Calculations The list in Table 1 shows different junction types, and the normal temperature ranges. Both thermocouples, and signal conditioners are commonly available, and rela- tively inexpensive. For example, most PLC vendors sell thermocouple input cards that will allow multiple inputs into the PLC. Table 1: Thermocouple Types ANSI Type Materials Temperature Range (°F) Voltage Range (mV) T copper/constantan -200 to 400 -5.60 to 17.82 J iron/constantan 0 to 870 0 to 42.28 E chromel/constantan -200 to 900 -8.82 to 68.78 K chromel/aluminum -200 to 1250 -5.97 to 50.63 R platinum-13%rhodium/platinum 0 to 1450 0 to 16.74 S platinum-10%rhodium/platinum 0 to 1450 0 to 14.97 C tungsten-5%rhenium/tungsten-26%rhenium 0 to 2760 0 to 37.07 V out α T T ref – ( ) = where, α constant (V/C) = T T ref , current and reference temperatures = 50 µV °C ------- (typical) measuring device + - V out T ∴ V out α ---------- T ref + = page 403 Figure 322 Thermocouple Temperature Voltage Relationships (Approximate) The junction where the thermocouple is connected to the measurement instrument is normally cooled to reduce the thermocouple effects at those junctions. When using a thermocouple for precision measurement, a second thermocouple can be kept at a known temperature for reference. A series of thermocouples connected together in series pro- duces a higher voltage and is called a thermopile. Readings can approach an accuracy of 0.5%. 14.2.6.3 - Thermistors Thermistors are non-linear devices, their resistance will decrease with an increase in temperature. (Note: this is because the extra heat reduces electron mobility in the semi- conductor.) The resistance can change by more than 1000 times. The basic calculation is shown in Figure 323. often metal oxide semiconductors The calculation uses a reference temperature and resistance, with a constant for the device, to predict the resistance at another tempera- ture. The expression can be rearranged to calculate the temperature given the resistance. 20 40 60 80 0 0 500 1000 1500 2000 2500 E J K T C R S °F ( ) mV page 404 Figure 323 Thermistor Calculations Figure 324 Thermistor Signal Conditioning Circuit R t R o e β 1 T --- 1 T o ----- – ¸ , ¸ _ = where, R o R t , resistances at reference and measured temps. = T o T , reference and actual temperatures = β constant for device = T ∴ βT o T o R t R o ------ ¸ , ¸ _ ln β + --------------------------------- = +V Vout + - R1 R2 R3 R4 R5 Aside: The circuit below can be used to convert the resistance of the thermistor to a volt- age using a Wheatstone bridge and an inverting amplifier. page 405 Thermistors are small, inexpensive devices that are often made as beads, or metal- lized surfaces. The devices respond quickly to temperature changes, and they have a higher resistance, so junction effects are not an issue. Typical accuracies are 1%, but the devices are not linear, have a limited temperature/resistance range and can be self heating. 14.2.6.4 - Other Sensors IC sensors are becoming more popular. They output a digital reading and can have accuracies better than 0.01%. But, they have limited temperature ranges, and require some knowledge of interfacing methods for serial or parallel data. Pyrometers are non-contact temperature measuring devices that use radiated heat. These are normally used for high temperature applications, or for production lines where it is not possible to mount other sensors to the material. 14.2.7 Light 14.2.7.1 - Light Dependant Resistors (LDR) Light dependant resistors (LDRs) change from high resistance (>Mohms) in bright light to low resistance (<Kohms) in the dark. The change in resistance is non-linear, and is also relatively slow (ms). page 406 Figure 325 A Light Level Detector Circuit 14.3 INPUT ISSUES Signals from sensors are often not in a form that can be directly input to a control- ler. In these cases it may be necessary to buy or build signal conditioners. Normally, a sig- nal conditioner is an amplifier, but it may also include noise filters, and circuitry to convert from current to voltage. This section will discuss the electrical and electronic interfaces between sensors and controllers. Analog signal are prone to electrical noise problems. This is often caused by elec- tromagnetic fields on the factory floor inducing currents in exposed conductors. Some of the techniques for dealing with electrical noise include; twisted pairs - the wires are twisted to reduce the noise induced by magnetic fields. shielding - shielding is used to reduce the effects of electromagnetic interference. single/double ended inputs - shared or isolated reference voltages (commons). When a signal is transmitted through a wire, it must return along another path. If the wires have an area between them the magnetic flux enclosed in the loop can induce V high V out V low Aside: an LDR can be used in a voltage divider to convert the change in resistance to a measurable voltage. These are common in low cost night lights. page 407 current flow and voltages. If the wires are twisted, a few times per inch, then the amount of noise induced is reduced. This technique is common in signal wires and network cables. A shielded cable has a metal sheath, as shown in Figure 326. This sheath needs to be connected to the measuring device to allow induced currents to be passed to ground. This prevents electromagnetic waves to induce voltages in the signal wires. Figure 326 Cable Shielding When connecting analog voltage sources to a controller the common, or reference voltage can be connected different ways, as shown in Figure 327. The least expensive method uses one shared common for all analog signals, this is called single ended. The more accurate method is to use separate commons for each signal, this is called double ended. Most analog input cards allow a choice between one or the other. But, when double ended inputs are used the number of available inputs is halved. Most analog output cards are double ended. Analog voltage source + - IN1 REF1 SHLD Analog Input A Shield is a metal sheath that surrounds the wires page 408 Figure 327 Single and Double Ended Inputs Signals from transducers are typically too small to be read by a normal analog input card. Amplifiers are used to increase the magnitude of these signals. An example of a single ended signal amplifier is shown in Figure 328. The amplifier is in an inverting configuration, so the output will have an opposite sign from the input. Adjustments are provided for gain and offset adjustments. Ain 0 Ain 1 Ain 2 Ain 3 Ain 4 Ain 5 Ain 6 Ain 7 COM device + - #1 device + - #1 Ain 0 Ain 0 Ain 1 Ain 1 Ain 2 Ain 2 Ain 3 Ain 3 device + - #1 device + - #1 Single ended - with this arrangement the signal quality can be poorer, but more inputs are available. Double ended - with this arrangement the signal quality can be better, but fewer inputs are available. Note: op-amps are used in this section to implement the amplifiers because they are inexpensive, common, and well suited to simple design and construction projects. When purchasing a commercial signal conditioner, the circuitry will be more com- plex, and include other circuitry for other factors such as temperature compensation. page 409 Figure 328 A Single Ended Signal Amplifier A differential amplifier with a current input is shown in Figure 329. Note that Rc converts a current to a voltage. The voltage is then amplified to a larger voltage. Figure 329 A Current Amplifier Vin +V -V Ro Ri Rf Rg gain Vout - + offset V out R f R g + R i ----------------- ¸ , ¸ _ V in offset + = - + Iin Vout Rc R1 R2 Rf R3 R4 page 410 The circuit in Figure 330 will convert a differential (double ended) signal to a sin- gle ended signal. The two input op-amps are used as unity gain followers, to create a high input impedance. The following amplifier amplifies the voltage difference. Figure 330 A Differential Input to Single Ended Output Amplifier The Wheatstone bridge can be used to convert a resistance to a voltage output, as shown in Figure 331. If the resistor values are all made the same (and close to the value of R3) then the equation can be simplified. Vin Vout - + - + - + CMRR adjust page 411 Figure 331 A Resistance to Voltage Amplifier 14.4 SENSOR GLOSSARY Ammeter - A meter to indicate electrical current. It is normally part of a DMM Bellows - This is a flexible volumed that will expand or contract with a pressure change. This often looks like a cylinder with a large radius (typ. 2") but it is very thin (type 1/4"). It can be set up so that when pressure changes, the dis- placement of one side can be measured to determine pressure. Bourdon tube - Widely used industrial gage to measure pressure and vacuum. It resembles a crescent moon. When the pressure inside changes the moon shape will tend to straighten out. By measuring the displacement of the tip the pres- sure can be measured. Chromatographic instruments - laboratory-type instruments used to analyze chem- ical compounds and gases. Inductance-coil pulse generator - transducer used to measure rotational speed. Out- +V Vout + - R1 R2 R3 R4 R5 V out V R 5 ( ) R 2 R 1 R 2 + ------------------ ¸ , ¸ _ 1 R 3 ------ 1 R 4 ------ 1 R 5 ------ + + ¸ , ¸ _ 1 R 3 ------ – ¸ , ¸ _ = or if R R 1 R 2 R 4 R 5 = = = = V out V R 2R 3 --------- ¸ , ¸ _ = page 412 put is pulse train. Interferometers - These use the interference of light waves 180 degrees out of phase to determine distances. Typical sources of the monochromatic light required are lasers. Linear-Variable-Differential transformer (LVDT) electromechanical transducer used to measure angular or linear displacement. Output is Voltage Manometer - liquid column gage used widely in industry to measure pressure. Ohmmeter - meter to indicate electrical resistance Optical Pyrometer - device to measure temperature of an object at high tempera- tures by sensing the brightness of an objects surface. Orifice Plate - widely used flowmeter to indicate fluid flow rates Photometric Transducers - a class of transducers used to sense light, including phototubes, photodiodes, phototransistors, and photoconductors. Piezoelectric Accelerometer - Transducer used to measure vibration. Output is emf. Pitot Tube - Laboratory device used to measure flow. Positive displacement Flowmeter - Variety of transducers used to measure flow. Typical output is pulse train. Potentiometer - instrument used to measure voltage Pressure Transducers - A class of transducers used to measure pressure. Typical output is voltage. Operation of the transducer can be based on strain gages or other devices. Radiation pyrometer - device to measure temperature by sensing the thermal radia- tion emitted from the object. Resolver - this device is similar to an incremental encoder, except that it uses coils to generate magnetic fields. This is like a rotary transformer. Strain Gage - Widely used to indicate torque, force, pressure, and other variables. Output is change in resistance due to strain, which can be converted into volt- age. Thermistor - Also called a resistance thermometer; an instrument used to measure temperature. Operation is based on change in resistance as a function of temper- ature. Thermocouple - widely used temperature transducer based on the Seebeck effect, in which a junction of two dissimilar metals emits emf related to temperature. Turbine Flowmeter - transducer to measure flow rate. Output is pulse train. Venturi Tube - device used to measure flow rates. 14.5 SUMMARY • Selection of continuous sensors must include issues such as accuracy and resolu- tion. • Angular positions can be measured with potentiometers and encoders (more accurate). • Tachometers are usefule for measuring angular velocity. page 413 • Linear positions can be measured with potentiometers (limited accuracy), LVDTs (limited range), moire fringes (high accuracy). • Accelerometers measure acceleration of masses. • Strain gauges and piezoelectric elements measure force. • Pressure can be measured indirectly with bellows and Bourdon tubes. • Flow rates can be measured with Venturi valves and pitot tubes. • Temperatures can be measured with RTDs, thermocouples, and thermistors. • Input signals can be single ended for more inputs or double ended for more accu- racy. 14.6 REFERENCES Bryan, L.A. and Bryan, E.A., Programmable Controllers; Theory and Implementation, Industrial Text Co., 1988. Swainston, F., A Systems Approach to Programmable Controllers, Delmar Publishers Inc., 1992. 14.7 PRACTICE PROBLEMS 1. Name two types of inputs that would be analog input values (versus a digital value). (ans. temperature and displacement) 2. Search the web for common sensor manufacturers for 5 different types of continuous sensors. If possible identify prices for the units. Sensor manufacturers include (hyde park, banner, allen bradley, omron, etc.) (ans. Sensors can be found at www.ab.com, www.omron.com, etc) 3. What is the resolution of an absolute optical encoder that has six tracks? nine tracks? twelve tracks? (ans. 360°/64steps, 360°/512seps, 360°/4096 steps) 4. Suggest a couple of methods for collecting data on the factory floor (ans. data bucket, smart machines, PLCs with analog inputs and network connections) 5. If a thermocouple generates a voltage of 30mV at 800F and 40mV at 1000F, what voltage will be generated at 1200F? page 414 6. A potentiometer is to be used to measure the position of a rotating robot link (as a voltage divider). The power supply connected across the potentiometer is 5.0 V, and the total wiper travel is 300 degrees. The wiper arm is directly connected to the rotational joint so that a given rotation of the joint corresponds to an equal rotation of the wiper arm. a) To position the joint at 42 degrees, what voltage is required from the potentiom- eter? b) If the joint has been moved, and the potentiometer reads 2.765V, what is the position of the potentiometer? 7. A motor has an encoder mounted on it. The motor is driving a reducing gear box with a 50:1 ratio. If the position of the geared down shaft needs to be positioned to 0.1 degrees, how many divisions are needed on the encoder? V out α T T ref – ( ) = (ans. 0.030 α 800 T ref – ( ) = 0.040 α 1000 T ref – ( ) = 1 α --- 800 T ref – 0.030 ------------------------ 1000 T ref – 0.040 --------------------------- = = 800 T ref – 750 0.75T ref – = 50 0.25T ref = T ref 200C = α 0.040 1000 200 – --------------------------- 50µV C ------------- = = V out 0.00005 1200 200 – ( ) 0.050V = = (ans. a) V out V 2 V 1 – ( ) θ w θ max ----------- ¸ , ¸ _ V 1 + 5V 0V – ( ) 42deg 300deg ------------------ ¸ , ¸ _ 0V + 0.7V = = = b) 2.765V 5V 0V – ( ) θ w 300deg ------------------ ¸ , ¸ _ 0V + = 2.765V 5V 0V – ( ) θ w 300deg ------------------ ¸ , ¸ _ 0V + = θ w 165.9deg = θ output 0.1 deg count -------------- = (ans. θ input θ output ---------------- 50 1 ----- - = θ input 50 0.1 deg count -------------- ¸ , ¸ _ 5 deg count -------------- = = R 360 deg rot --------- 5 deg count -------------- ------------------ 72 count rot -------------- = = page 415 8. What is the difference between a strain gauge and an accelerometer? How do they work? 9. Use the model or equations for a permanent magnet DC motor to explain how it can be used as a tachometer. 10. What are the trade-offs between encoders and potentiometers? 11. A potentiometer is connected to a PLC analog input card. The potentiometer can rotate 300 degrees, and the voltage supply for the potentiometer is +/-10V. Write a ladder logic program to read the voltage from the potentiometer and convert it to an angle in radians stored in F8:0. (ans. strain gauge measures strain in a material using a stretching wire that increases resis- tance - accelerometers measure acceleration with a cantilevered mass on a piezoelec- tric element. (ans. + - R DMM V K s ω = When the motor shaft is turned by another torque source a voltage is gener- ated that is proportional to the angular velocity. This is the reverse emf. A dmm, or other high impedance instrument can be used to measure this, thus minizing the loses in resistor R. (ans. encoders cost more but have higher costs. Potentiometers have limited ranges of motion page 416 BTW Rack: 0 Group: 0 Module: 0 BT Array: BT9:0 Data File: N7:0 Length: 37 Continuous: no FS BTR Rack: 0 Group: 0 Module: 0 BT Array: BT9:1 Data File: N7:37 Length: 20 Continuous: no BT9:0/EN BT9:1/EN CPT Dest F8:0 Expression "20.0 * N7:41 / 4095.0 - 10" BT9:1/DN CPT Dest F8:0 Expression "300.0 * (F8:0 + 10) / 20" RAD Source F8:0 Dest F8:1 page 417 15. CONTINUOUS ACTUATORS 15.1 INTRODUCTION Continuous actuators allow a system to position or adjust outputs over a wide range of values. Even in their simplest form, continuous actuators tend to be mechanically complex devices. For example, a linear slide system might be composed of a motor with an electronic controller driving a mechanical slide with a ball screw. The cost for such an actuators can easily be higher than for the control system itself. These actuators also require sophisticated control techniques that will be discussed in later chapters. In general, when there is a choice, it is better to use discrete actuators to reduce costs and complexity. 15.2 ELECTRIC MOTORS An electric motor is composed of a rotating center, called the rotor, and a station- ary outside, called the stator. These motors use the attraction and repulsion of magnetic fields to induce forces, and hence motion. Typical electric motors use at least one electro- magnetic coil, and sometimes permanent magnets to set up opposing fields. When a volt- age is applied to these coils the result is a torque and rotation of an output shaft. There are a variety of motor configuration the yields motors suitable for different applications. Most notably, as the voltages supplied to the motors will vary the speeds and torques that they will provide. A control system is required when a motor is used for an application that requires Topics: Objectives: • To understand the main differences between continuous actuators • Be able to select a continuous actuator • To be able to plan a motion for a single servo actuator • Servo Motors; AC and DC • Stepper motors • Single axis motion control • Hydraulic actuators page 418 continuous position or velocity. A typical controller is shown in Figure 332. In any con- trolled system a command generator is required to specify a desired position. The control- ler will compare the feedback from the encoder to the desired position or velocity to determine the system error. The controller with then generate an output, based on the sys- tem error. The output is then passed through a power amplifier, which in turn drives the motor. The encoder is connected directly to the motor shaft to provide feedback of posi- tion. Figure 332 A Typical Feedback Motor Controller 15.2.1 Brushed DC Motors In a DC motor there is normally a set of coils on the rotor that turn inside a stator populated with permanent magnets. Figure 333 shows a simplified model of a motor. The magnetics provide a permanent magnetic field for the rotor to push against. When current is run through the wire loop it creates a magnetic field. command generator (e.g., PLC) controller power amp desired position or velocity voltage/ current motor amplified voltage/ current encoder page 419 Figure 333 A Simplified Rotor The power is delivered to the rotor using a commutator and brushes, as shown in Figure 334. In the figure the power is supplied to the rotor through graphite brushes rub- bing against the commutator. The commutator is split so that every half revolution the polarity of the voltage on the rotor, and the induced magnetic field reverses to push against the permanent magnets. I I magnetic axis of rotation ω field page 420 Figure 334 A Split Ring Commutator The direction of rotation will be determined by the polarity of the applied voltage, and the speed is proportional to the voltage. A feedback controller is used with these motors to provide motor positioning and velocity control. These motors are losing popularity to brushless motors. The brushes are subject to wear, which increases maintenance costs. In addition, the use of brushes increases resis- tance, and lowers the motors efficiency. motor split commutator brushes motor split commutator brushes shaft shaft Top Front V+ V- power supply page 421 Figure 335 Pulse Width Modulation (PWM) For Control ASIDE: The controller to drive a servo motor normally uses a Pulse Width Modulated (PWM) signal. As shown below the signal produces an effective voltage that is rel- ative to the time that the signal is on. The percentage of time that the signal is on is called the duty cycle. When the voltage is on all the time the effective voltage deliv- ered is the maximum voltage. So, if the voltage is only on half the time, the effec- tive voltage is half the maximum voltage. This method is popular because it can produce a variable effective voltage efficiently. The frequency of these waves is normally above 20KHz, above the range of human hearing. V max 0 t V eff 50 100 -------- - V max = 50% duty cycle V max 0 t V eff 20 100 -------- - V max = 20% duty cycle V max 0 t V eff 100 100 -------- - V max = 100% duty cycle V max 0 t V eff 0 100 -------- - V max = 0% duty cycle page 422 Figure 336 PWM Unidirectional Motor Control Circuit ASIDE: A PWM signal can be used to drive a motor with the circuit shown below. The PWM signal switches the NPN transistor, thus switching power to the motor. In this case the voltage polarity on the motor will always be the same direction, so the motor may only turn in one direction. signal source V+ com power supply V+ V- DC motor page 423 Figure 337 PWM Bidirectional Motor Control Circuit 15.2.2 AC Synchronous Motors A synchronous motor has the windings on the stator. The rotor is normally a squir- rel cage design. The squirrel cage is a cast aluminum core that when exposed to a chang- ing magnetic field will set up an opposing field. When an AC voltage is applied to the stator coils an AC magnetic field is created, the squirrel cage sets up an opposing magnetic field and the resulting torque causes the motor to turn. The motor is called synchronous because the rotor will turn at a frequency close to that of the applied voltage, but there is always some slip. It is possible to control the speed of the motor by controlling the frequency of the AC voltage. Synchronous motor drives control the speed of the motors by synthesizing a variable frequency AC waveform, as shown in Figure 338. ASIDE: When a motor is to be con- trolled with PWM in two directions the H-bridge circuit (shown below) is a popular choice. These can be built with individual components, or purchased as integrated circuits for smaller motors. To turn the motor in one direction the PWM signal is applied to the Va inputs, while the Vb inputs are held low. In this arrangement the positive voltage is at the left side of the motor. To reverse the direction the PWM sig- nal is applied to the Vb inputs, while the Va inputs are held low. This applies the positive voltage to the right side of the motor. +Vs -Vs Va Va Vb Vb page 424 Figure 338 Synchronous AC Motor Speed Control These drives should be used for applications that only require a single rotational direction. The torque speed curve for a typical induction motor is shown in Figure 339. When the motor is used with a fixed frequency AC source the synchronous speed of the motor will be the frequency of AC voltage divided by the number of poles in the motor. The motor actually has the maximum torque below the synchronous speed. For example a motor 2 pole motor might have a synchronous speed of (2*60*60/2) 3600 RPM, but be rated for 3520 RPM. When a feedback controller is used the issue of slip becomes insig- nificant. Figure 339 Torque Speed Curve for an Induction Motor Controller torque speed synchronous speed page 425 15.2.3 Brushless DC Motors Brushless motors use a permanent magnet on the rotor, and user wire windings on the stator. Therefore there is no need to use brushes and a commutator to switch the polar- ity of the voltage on the coil. The lack of brushes means that these motors require less maintenance than the brushed DC motors. To continuously rotate these motors the current in the outer coils must alternate continuously. If the power supplied to the coils is an AC sinusoidal waveform, the motor will behave like an AC motor. The applied voltage can also be trapezoidal, which will give a similar effect. The changing waveforms are controller using position feedback from the motor to select switching times. The speed of the motor is proportional to the frequency of the signal. A typical torque speed curve for a brushless motor is shown in Figure 340. RPM f120 p ----------- = where, f power frequency (60Hz typ.) = p number of poles (2, 4, 6, etc...) = RPM ideal motor speed in rotations per minute = torque speed page 426 Figure 340 Torque Speed Curve for a Brushless DC Motor 15.2.4 Stepper Motors Stepper motors are designed for positioning. They move one step at a time with a typical step size of 1.8 degrees giving 200 steps per revolution. Other motors are designed for step sizes of 2, 2.5, 5, 15 and 30 degrees. There are two basic types of stepper motors, unipolar and bipolar, as shown in Fig- ure 341. The unipolar uses center tapped windings and can use a single power supply. The bipolar motor is simpler but requires a positive and negative supply and more complex switching circuitry. Figure 341 Unipolar and Bipolar Stepper Motor Windings The motors are turned by applying different voltages at the motor terminals. The voltage change patterns for a unipolar motor are shown in Figure 342. For example, when the motor is turned on we might apply the voltages as shown in line 1. To rotate the motor we would then output the voltages on line 2, then 3, then 4, then 1, etc. Reversing the sequence causes the motor to turn in the opposite direction. The dynamics of the motor and load limit the maximum speed of switching, this is normally a few thousand steps per second. When not turning the output voltages are held to keep the motor in position. 1 2 a a b b unipolar 1a 2a 1b 2b bipolar page 427 Figure 342 Stepper Motor Control Sequence for a Unipolar Motor Stepper motors do not require feedback except when used in high reliability appli- cations and when the dynamic conditions could lead to slip. A stepper motor slips when the holding torque is overcome, or it is accelerated too fast. When the motor slips it will move a number of degrees from the current position. The slip cannot be detected without position feedback. Stepper motors are relatively weak compared to other motor types. The torque speed curve for the motors is shown in Figure 343. In addition they have different static and dynamic holding torques. These motors are also prone to resonant conditions because of the stepped motion control. Figure 343 Stepper Motor Torque Speed Curve The motors are used with controllers that perform many of the basic control func- tions. At the minimum a translator controller will take care of switching the coil voltages. controller stepper motor Step 1 2 3 4 1a 1 0 0 1 2a 0 1 1 0 1b 1 1 0 0 2b 0 0 1 1 1a 2a 1b 2b To turn the motor the phases are stepped through 1, 2, 3, 4, and then back to 1. To reverse the direction of the motor the sequence of steps can be reversed, eg. 4, 3, 2, 1, 4, ..... If a set of outputs is kept on constantly the motor will be held in position. torque speed page 428 A more sophisticated indexing controller will accept motion parameters, such as distance, and convert them to individual steps. Other types of controllers also provide finer step res- olutions with a process known as microstepping. This effectively divides the logical steps described in Figure 342 and converts them to sinusoidal steps. translators - the user indicates maximum velocity and acceleration and a distance to move indexer - the user indicates direction and number of steps to take microstepping - each step is subdivided into smaller steps to give more resolution 15.3 HYDRAULICS Hydraulic systems are used in applications requiring a large amount of force and slow speeds. When used for continuous actuation they are mainly used with position feed- back. An example system is shown in Figure 344. The controller examines the position of the hydraulic system, and drivers a servo valve. This controls the flow of fluid to the actu- ator. The remainder of the provides the hydraulic power to drive the system. Figure 344 Hydraulic Servo System The valve used in a hydraulic system is typically a solenoid controlled valve that is simply opened or closed. Newer, more expensive, valve designs use a scheme like pulse valve hydraulic power supply hydraulic actuator sump position controller position sensor page 429 with modulation (PWM) which open/close the valve quickly to adjust the flow rate. 15.4 OTHER SYSTEMS The continuous actuators discussed earlier in the chapter are the moroe common types. For the purposes of completeness additional actuators are listed and described briefly below. Heaters - to control a heater with a continuous temperature a PWM scheme can be used to limit a DC voltage, or an SCR can be used to supply part of an AC waveform. Pneumatics - air controlled systems can be used for positioning with suitable feed- back. Velocities can also be controlled using fast acting valves. Linear Motors - a linear motor works on the same principles as a normal rotary motor. The primary difference is that they have a limited travel and their cost is typically much higher than other linear actuators. Ball Screws - rotation is converted to linear motion using balls screws. These are low friction screws that drive nuts filled with ball bearings. These are normally used with slides to bear mechanical loads. 15.5 SUMMARY • AC motors work at higher speeds • DC motors work over a range of speeds • Motion control introduces velocity and acceleration limits to servo control • Hydraulics make positioning easy 15.6 PRACTICE PROBLEMS 1. A stepping motor is to be used to drive each of the three linear axes of a cartesian coordinate robot. The motor output shaft will be connected to a screw thread with a screw pitch of 0.125”. It is desired that the control resolution of each of the axes be 0.025” a) to achieve this control resolution how many step angles are required on the step- per motor? b) What is the corresponding step angle? c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3.0”/sec. page 430 2. For the stepper motor in the previous question, a pulse train is to be generated by the robot con- troller. a) How many pulses are required to rotate the motor through three complete revo- lutions? b) If it is desired to rotate the motor at a speed of 25 rev/min, what pulse rate must be generated by the robot controller? 3. A stepper motor is to be used to actuate one joint of a robot arm in a light duty pick and place application. The step angle of the motor is 10 degrees. For each pulse received from the pulse train source the motor rotates through a distance of one step angle. a) What is the resolution of the stepper motor? b) Relate this value to the definitions of control resolution, spatial resolution, and accuracy, as discussed in class. c) For the stepper motor, a pulse train is to be generated by a motion controller. How many pulses are required to rotate the motor through three complete revo- lutions? If it is desired to rotate the motor at a speed of 25 rev/min, what pulse rate must be generated by the robot controller? 4. A stepping motor is to be used to actuate one joint of a robot arm in a light duty pick and place application. The step angle of the motor is 10 degrees. For each pulse received from the pulse train source the motor rotates through a distance of one step angle. a) What is the resolution of the stepper motor? (ans a) P 0.125 in rot ------- ¸ , ¸ _ = R 0.025 in step ---------- = θ R P --- 0.025 in step ---------- 0.125 in rot ------- ¸ , ¸ _ --------------------------- 0.2 rot step ---------- = = = Thus 1 0.2 rot step ---------- ------------------ 5 step rot ---------- = b) θ 0.2 rot step ---------- 72 deg step ---------- = = c) PPS 3 in s ----- 0.025 in step ---------- ------------------------ 120 steps s ------------- = = (ans. a) pulses 3rot ( ) 5 step rot ---------- ¸ , ¸ _ 15steps = = b) pulses s ---------------- 25 rot min --------- ¸ , ¸ _ 5 step rot ---------- ¸ , ¸ _ 125 steps min ------------- 125 1min 60s ------------- ¸ , ¸ _ steps min ------------- 2.08 step s ---------- = = = = page 431 b) Relate this value to the definitions of control resolution, spatial resolution, and accuracy, as discussed in class. 5. A stepping motor is to be used to drive each of the three linear axes of a cartesian coordinate robot. The motor output shaft will be connected to a screw thread with a screw pitch of 0.125”. It is desired that the control resolution of each of the axes be 0.025” a) To achieve this control resolution how many step angles are required on the stepper motor? b) What is the corresponding step angle? c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3.0”/sec. 6. Explain the differences between stepper motors, variable frequency induction motors and DC motors using tables. (ans. stepper motor vfd dc motor speed torque very low speeds limited speed range wide range low torque good at rated speed decreases at higher speeds page 432 16. MOTION CONTROL 16.1 INTRODUCTION A system with a feedback controller will attempt to drive the system to a state described by the desired input, such as a velocity. In earlier chapters we simply chose step inputs, ramp inputs and other simple inputs to determine the system response. In practical applications this setpoint needs to be generated automatically. A simple motion control system is used to generate setpoints over time. An example of a motion control system is shown in Figure 345. The motion con- troller will accept commands or other inputs to generate a motion profile using parameters such as distance to move, maximum acceleration and maximum velocity. The motion pro- file is then used to generate a set of setpoints, and times they should be output. The set- point scheduler will then use a realtime clock to output these setpoints to the motor drive. Topics: Objectives: • To understand single and multi axis motion control systems. • Motion controllers • Motion profiles, trapezoidal and smooth • Gain schedulers page 433 Figure 345 A motion controller The combination of a motion controller, drive and actuator is called an axis. When there is more than one drive and actuator the system is said to have multiple axes. Com- plex motion control systems such as computer controlled milling machines (CNC) and robots have 3 to 6 axes which must be moved in coordination. 16.2 MOTION PROFILES A simple example of a motion profile for a point-to-point motion is shown in Fig- ure 346. In this example the motion starts at 20 deg and ends at 100 deg. (Note: in motion controllers it is more common to used encoder pulses, instead of degrees, for positions velocities, etc.) For position control we want a motion that has a velocity of zero at the start and end of the motion, and accelerates and decelerates smoothly. Servo Drive Setpoint Scheduler Setpoint Generator Motor motion controller motion commands t ω t (s) 0 0.1 0.2 0.3 0.4 ..... setpoint 0.0 0.2 0.4 0.4 0.4 .... 0 0.2 0.6 0.8 0.4 motion profile setpoint schedule page 434 Figure 346 An example of a desired motion (position) A trapezoidal velocity profile is shown in Figure 347. The area under the curve is the total distance moved. The slope of the initial and final ramp are the maximum acceler- ation and deceleration. The top level of the trapezoid is the maximum velocity. Some con- trollers allow the user to use the acceleration and deceleration times instead of the maximum acceleration and deceleration. This profile gives a continuous acceleration, but there will be a jerk (third order derivative) at the four sharp corners. Figure 347 An example of a velocity profile θ deg ( ) 20 100 t (s) ω deg ( ) 0 t (s) ω max α max α max – t acc t dec t total where, ω max the maximum velocity = α max the maximum acceleration = t acc t dec , the acceleration and deceleration times = t max the times at the maximum veloci t y = 0 t total the total motion time = t max page 435 The basic relationships for these variables are shown in Figure 348. The equations can be used to find the acceleration and deceleration times. These equations can also be used to find the time at the maximum velocity. If this time is negative it indicates that the axis will not reach the maximum velocity, and the acceleration and deceleration times must be decreased. The resulting velocity profile will be a triangle. Figure 348 Velocity profile basic relationships For the example in Figure 349 the move starts at 100deg and ends at 20 deg. The acceleration and decelerations are completed in half a second. The system moves for 7.5 seconds at the maximum velocity. t acc t dec ω max α max ------------ = = θ 1 2 ---t acc ω max t max ω max 1 2 ---t dec ω max + + ω max t acc 2 -------- t max t dec 2 -------- + + ¸ , ¸ _ = = t total t acc t max t dec + + = (1) (2) (3) t max θ ω max ------------ t acc 2 ----------- – t dec 2 ----------- – = Note: if the time calculated in equation 4 is negative then the axis never reaches maximum velocity, and the velocity profile becomes a triangle. (4) page 436 Figure 349 Velocity profile example The motion example in Figure 350 is so short the axis never reaches the maximum velocity. This is made obvious by the negative time at maximum velocity. In place of this the acceleration and deceleration times can be calculated by using the basic acceleration position relationship. The result in this example is a motion that accelerates for 0.316s and then decelerates for the same time. t acc t dec ω max α max ------------ 10 deg s --------- 20 deg s 2 --------- --------------- 0.5s = = = = t total t acc t max t dec + + 0.5s 7.5s 0.5s + + 8.5s = = = t max θ ω max ------------ t acc 2 ----------- – t dec 2 ----------- – 80deg 10 deg s --------- --------------- 0.5s 2 ---------- – 0.5s 2 ---------- – 7.5s = = = Given, θ start 100deg = θ end 20deg = ω max 10 deg s --------- = α max 20 deg s 2 --------- = The times can be calculated as, θ θ end θ start – 20deg 100deg – 80deg – = = = page 437 Figure 350 Velocity profile example without reaching maximum velocity Given the parameters calculated for the motion, the setpoints for motion can be calculated with the equations in Figure 351. t acc t dec ω max α max ------------ 10 deg s --------- 20 deg s 2 --------- --------------- 0.5s = = = = t max θ ω max ------------ t acc 2 ----------- – t dec 2 ----------- – 2deg 10 deg s --------- --------------- 0.5s 2 ---------- – 0.5s 2 ---------- – 0.3 – s = = = Given, θ start 20deg = θ end 22deg = ω max 10 deg s --------- = α max 20 deg s 2 --------- = The times can be calculated as, θ θ end θ start – 22deg 20deg – 2deg = = = The time was negative so the acceleration and deceleration times become, θ 2 --- 1 2 ---α max t acc 2 = t acc θ α max ------------ 2deg 20 deg s 2 --------- --------------- 0.1s 2 0.316s = = = = t max 0s = page 438 Figure 351 Generating points given motion parameters A subroutine that implements these is shown in Figure 352. In this subroutine the time is looped with fixed time steps. The position setpoint values are put into the setpoint array, which will then be used elsewhere to guide the mechanism. 0s t t acc < ≤ Assuming the motion starts at 0s, θ t ( ) 1 2 --- α max t 2 θ start + = t acc t t acc t max + < ≤ θ t ( ) 1 2 -- -α max t acc 2 ω max t t acc – ( ) θ start + + = t acc t max + t t acc t max t dec + + < ≤ θ t ( ) 1 2 ---α max t acc 2 ω max t max 1 2 ---α max t t max t acc – – ( ) 2 θ start + + + = t acc t max t dec + + t ≤ θ t ( ) θ end = page 439 Figure 352 Subroutine for calculating motion setpoints In some cases the jerk should be minimized. This can be achieved by replacing the ulceration ramps with a smooth polynomial, as shown in Figure 353. In this case two qua- dratic polynomials will be used for the acceleration, and another two for the deceleration. void generate_setpoint_table(double t_acc, double t_max, double t_step, double vel_max, double acc_max, double theta_start, double theta_end, double setpoint[], int *count){ double t, t_1, t_2, t_total; t_1 = t_acc; t_2 = t_acc + t_max; t_total = t_acc + t_max + t_acc; *count = 0; for(t = 0.0; t <= t_total; t += t_step){ if( t < t_1){ setpoint[*count] = 0.5*acc_max*t*t + theta_start; } else if ( (t >= t_1) && (t < t_2)){ setpoint[*count] = 0.5*acc_max*t_acc*t_acc + vel_max*(t - t_1) + theta_start; } else if ( (t >= t_2) && (t < t_total)){ setpoint[*count] = 0.5*acc_max*t_acc*t_acc + vel_max*(t_max) + 0.5*acc_max*(t-t_2)*(t-t_2) + theta_start; } else { setpoint[*count] = theta_end; } *count++; } setpoint[*count] = theta_end; *count++; } page 440 Figure 353 A smooth velocity profile An example of calculating the polynomial coefficients is given in Figure 354. The curve found is for the first half of the acceleration. It can then be used for the three other required curves. ω deg ( ) 0 t (s) ω max α max α max – t acc t dec t total where, ω max the maximum velocity = α max the maximum acceleration = t acc t dec , the acceleration and deceleration times = t max the times at the maximum veloci t y = 0 t total the total motion time = t max ω t ( ) At 2 Bt C + + = page 441 Figure 354 A smooth velocity profile example Given, θ start θ end ω max α max The constraints for the polynomial are, ω 0 ( ) 0 = ω t acc 2 -------- ¸ , ¸ _ ω max 2 ------------ = d dt -----ω 0 ( ) 0 = d dt ---- -ω t acc 2 -------- ¸ , ¸ _ α max = These can be used to calculate the polynomial coefficients, 0 A0 2 B0 C + + = C ∴ 0 = ω max At acc 2 = 0 2A0 B + = The equation for the first segment is, ω t ( ) α max 2 4ω max --------------- t 2 = B ∴ 0 = α max 2At acc = A ω max t acc 2 ------------ = A α max 2t acc ----------- - = A ω max t acc 2 ------------ α max 2t acc ------------ = = t acc 2ω max α max --------------- = A α max 2t acc ------------ α max 2 2ω max α max --------------- ¸ , ¸ _ ------------------------ α max 2 4ω max --------------- = = = The equation for the second segment can be found using the first segment, ω t ( ) ω max α max 2 4ω max --------------- t acc t – ( ) 2 – = 0 t t acc 2 -------- < ≤ t acc 2 -------- t t acc < ≤ ω t ( ) ω max α max 2 4ω max --------------- t 2 2t acc t – t acc 2 + ( ) – = page 442 Figure 355 A smooth velocity profile example (cont’d) 16.3 MULTI AXIS MOTION In a machine with multiple axes the motions of individual axes must often be coor- dinated. A simple example would be a robot that needed to move two joints to reach a new position. We could extend the motion of the slower joints so that the motion of each joint would begin and end together. 16.3.1 Slew Motion When the individual axis of a machine are not coordinated this is known as slew motion. Each of the axes will start moving at the same time, but finish at separate times. Consider the example in Figure 356. A three axis motion is required from the starting angles of (40, 80, -40)deg, and must end at (120, 0, 0)deg. The maximum absolute acceler- The distance covered during acceleration, the area under the curves, is, so the time required at the maximum velocity is, t max θ 2θ acc – ( ) ω max --------------------------- = θ acc α max 2 4ω max ---------------t 2 t d 0 t acc 2 -------- ∫ ω max α max 2 4ω max --------------- t 2 2t acc t – t acc 2 + ( ) – ¸ , ¸ _ t d t acc 2 -------- t acc ∫ + = θ acc α max 2 12ω max ------------------ t 3 0 t acc 2 -------- ω max t α max 2 4ω max --------------- t 3 3 ---- t acc t 2 – t acc 2 t + ¸ , ¸ _ – ¸ , ¸ _ t acc 2 -------- t acc + = acc α max 2 12ω max ------------------ t acc 3 8 -------- ω max t acc α max 2 4ω max --------------- t acc 3 3 -------- t acc 3 – t acc 3 + ¸ , ¸ _ – ω max t acc 2 -------- α max 2 4ω max --------------- t acc 3 24 -------- t acc 3 4 -------- – t acc 3 2 -------- + ¸ , ¸ _ + – + = θ acc α max 2 96ω max ------------------ t acc 3 ω max t acc 2 --------------------- α max 2 12ω max ------------------ t acc 3 – 7α max 2 96ω max ------------------ t acc 3 – + = θ acc 14α – max 2 96ω max --------------------- t acc 3 ω max t acc 2 --------------------- + = page 443 ations and decelerations are (50, 100, 150) degrees/sec/sec, and the maximum velocities are (20, 40, 50) degrees/sec. Figure 356 Multi-axis slew motion The calculations for the motion parameters are shown in Figure 357. These are done in vector format for simplicity. All of the joints reach the maximum acceleration. The fastest motion is complete in 1.13s, while the longest motion takes 4.4s. -90 90 180 time(sec) Joint angle (degrees) Joint velocity (degrees/sec) θ 2 θ 1 θ 3 α max – ω max t acc t max t dec page 444 Figure 357 Calculated times for the slew motion 16.3.1.1 - Interpolated Motion In interpolated motion the faster joints are slowed so that they finish in coordina- tion with the slowest. This is essential in devices such as CNC milling machines. If this did not occur a straight line cut in the x-y plane would actually be two straight lines. The slew motion example can be extended to be slew motion where all joints finish their motion at 4.4s. This can be done for each joint by finding a multiplying factor to reduce accelerations and velocities, and increase times, as shown in Figure 358. t acc t dec ω max α max ------------ 20 50 ----- - 40 100 --------- 50 150 --------- , , ¸ , ¸ _ 0.4 0.4 0.333 , , ( )sec. = = = = θ acc. θ dec. t acc ω max.vel. 2 ---------------------------- 0.4 20 ( ) 2 ------------------ 0.4 40 ( ) 2 ------------------ 0.333 50 ( ) 2 ------------------------ , , ¸ , ¸ _ 4 8 8.33 , , ( )deg. = = = = The next step is to examine the moves specified, θ move θ end θ start – 120 40 – 0 80 – 0 40 – ( ) – , , ( ) 80 80 – 40 , , ( )deg. = = = Remove the angles covered during accel./deccel., and find the travel time at maximum velocity. t max θ move 2θ acc – ω max ----------------------------------- 80 2 4 ( ) – 20 ----------------------- 80 2 8 ( ) – 40 ----------------------- 40 2 8.333 ( ) – 50 --------------------------------- , , ¸ , ¸ _ = = t max 3.6 1.6 0.46668 , , ( )sec. = t total t acc t max t dec + + 4.4 2.4 1.13 , , ( )s = = The area under the velocity curve is the distance (angle in this case) travelled. First we can determine the distance covered during acceleration, and deceleration and the time during acceleration, and deceleration. page 445 Figure 358 Interpolated motion 16.3.2 Motion Scheduling After the setpoint schedule has been developed, it is executed by the setpoint scheduler. The setpoint scheduler will use a clock to determine when an output setpoint should be updated. A diagram of a scheduler is shown in Figure 359. In this system the setpoint scheduler is an interrupt driven subroutine that compares the system clock to the total motion time. When enough time has elapsed the routine will move to the next value in the setpoint table. The frequency of the interrupt clock should be smaller than or equal to the time steps used to calculate the setpoints. The servo drive is implemented with an algorithm such a PID control. The longest time is 4.4, and this is used to calculate adjustment factors. F 4.4s 2.4s 1.13s , , ( ) 4.4s -------------------------------------------- 1 0.55 0.26 , , ( ) = = These can be used to calculate new maximum accelerations, velocities and times. ω max 1 20 ( ) 0.55 40 ( ) 0.26 50 ( ) , , ( ) 20 22 13 , , ( ) = = α max 1 2 50 ( ) 0.55 2 100 ( ) 0.26 2 150 ( ) , , ( ) 50 30.25 10.14 , , ( ) = = t acc 0.4 1 ------- 0.4 0.55 ---------- 0.333 0.26 ------------- , , ¸ , ¸ _ 0.4 0.73 1.28 , , ( ) = = t max 3.6 1 ------- 1.6 0.55 ---------- 0.467 0.26 ------------- , , ¸ , ¸ _ 3.6 2.91 1.80 , , ( ) = = page 446 Figure 359 A setpoint scheduler The output from the scheduler updates every time step. This then leads to a situa- tion where the axis is always chasing the target value. This leads to small errors, as shown in Figure 360. Interrupt Clock Setpoint table Choose new point from trajectory table Return θ desired Time based interrupt routine Servo motor routine runs for each axis Compute error Output actuator signal Read θ desired page 447 Figure 360 Errors in path following 16.4 SUMMARY • Axis limits can be used to calculate motion profiles. • Trapezoidal and smooth motion profiles were presented. • Motion profiles can be used to generate setpoint tables. • Values from the setpoints can then be output by a scheduler to drive an axis. 16.5 PRACTICE PROBLEMS 1. a) Develop a motion profile for a joint that moves from -100 degrees to 100 degrees with a maximum velocity of 20 deg/s and a maximum acceleration of 100deg/s/s. b) Develop a set- point table that has values for positions every 0.5 seconds for the entire motion. speed trajectory table actual position time trajectory table time step required actual position time page 448 2. Find a smooth path for a robot joint that will turn from θ= 75° to θ = -35° in 10 seconds. Do this (ans. ω max 20 deg s --------- = Given, t acc t dec ω max α max ------------ 20 deg s --------- 100 deg s 2 --------- ------------------ 0.2s = = = = The motion times can be calculated. α max 100 deg s 2 --------- = t max ∆θ ω max t acc – ω max ---------------------------------- 200deg 20 deg s --------- 0.2s – 20 deg s --------- --------------------------------------------------- 9.8s = = = ∆θ 100 100 – ( ) – 200° = = t total t acc t max t dec + + 0.2s 9.8s 0.2s + + 10.2s = = = t (s) 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0 10.5 11.0 angle (deg) -100 -92 -82 -72 -62 -52 -42 -32 -22 -12 -2 8 18 28 38 48 58 68 78 88 98 100 100 θ 0.5s 1 2 ---100 deg s 2 --------- 0.2s ( ) 2 20 deg s --------- 0.5s 0.2s – ( ) 100deg – + = θ 0.5s 92deg – = θ 1.0s θ 0.5s 20 deg s --------- 0.5s ( ) + 92deg – 10deg + = = page 449 by developing an equation then calculating points every 1.0 seconds along the path for a total motion time of 10 seconds. 3. Paths are to be planned for a three axis motion controller. Each of the joints has a maximum velocity of 20 deg/s, and a maximum acceleration of 30 deg/s/s. Assuming all of the joints start at an angle of 0 degrees. Joints 1, 2 and 3 move to 40 deg, 100deg and -50deg respectively. Develop the motion profiles assuming, a) slew motion b) interpolated motion 4. Develop a smooth velocity profile for moving a cutting tool that starts at 1000 inches and moves to -1000 inches. The maximum velocity is 100 in/s and the maximum acceleration is 50in/s/s. page 450 17. ELECTROMECHANICAL SYSTEMS 17.1 INTRODUCTION • Magnetic fields and forces are extremely useful. The fields can allow energy stor- age, or transmit forces. • 17.2 MATHEMATICAL PROPERTIES • Magnetic fields have direction. As a result we must pay special attention to direc- tions, and vector calculations. 17.2.1 Induction • Magnetic fields pass through space. Topics: Objectives: page 451 • resistivity of materials decreases with temperature • Flux density, • Flux and flux density, • Permeability, B I 2πr --------- = For an infinitely long straight conductor where, B Flux density Wb m 2 -------- or Tesla ¸ , ¸ _ = I Current in the conductor (A) = r radial distance from the conductor = where, Φ Flux density Wb ( ) = A Cross section area = Φ B A --- = page 452 • Permeability is approximately linear for smaller electric fields, but with larger magnetic fields the materials saturate and the value of B reaches a maximum value. Figure 361 Saturation for a mild steel (approximately) • When a material is used out of the saturation region the permeabilities may be written as reluctances, µ 0 4π10 7 – H m ---- = µ µ r µ 0 = where, µ 0 permeability of free space = µ permeability of a material = µ r relative permeability of a material = µ B H ---- = H Magnetic field intensity A m ---- ¸ , ¸ _ = B H linear saturation 4000 1.5 page 453 • Faraday’s law, • The basic property of induction is that it will (in the presence of a magnetic field) convert a changing current flowing in a conductor to a force or convert a force to a current flow from a change in the current or the path. R L µA ------- = where, R reluctance of a magnetic path = L length of a magnetic path = A cross section area of a magnetic path = e N d dt -----Φ = For a coil where, e the potential voltage across the coil = N the number of turns inthecoil = page 454 Figure 362 The current and force relationship • We will also experience an induced current caused by a conductor moving in a magnetic field. This is also called emf (Electro-Motive Force) F I B × ( )L = F I, L B F L B × ( )I = NOTE: As with all cross prod- ucts we can use the right hand rule here. L conductor length = where, F force (N) = I M F The FBD/schematic equivalent is, page 455 Figure 363 Electromagnetically induced voltage • Hysteresis 17.3 EXAMPLE SYSTEMS • These systems are very common, take for example a DC motor. The simplest motor has a square conductor loop rotating in a magnetic field. By applying voltage the wires push back against the magnetic field. e m v B × ( )L = where, e m electromotive force (V) = φ magnetic flux (Wb - webers) = v velocity of conductor = e v B + - e v M The FBD/schematic equivalent page 456 Figure 364 A motor winding in a magnetic field x y z I I 1 2 3 4 5 a b B axis of rotation ω page 457 Figure 365 Calculation of the motor torque For wire 3, P 3 r ωt ( ) cos r ωt ( ) sin b 2 --- to b 2 --- – = V 3 rω – ωt ( ) sin rω ωt ( ) cos 0 = de m3 V B × ( )dL = B 0 B – 0 = e m3 rω – ωt ( ) sin rω ωt ( ) cos 0 0 B – 0 × r d b 2 --- – b 2 --- ∫ = e m3 0 0 Brω ωt ( ) sin r d b 2 --- – b 2 --- ∫ = e m3 B r 2 2 ---- ω ωt ( ) sin b 2 --- – b 2 --- Bω ωt ( ) b 2 -- - ¸ , ¸ _ b 2 --- – ¸ , ¸ _ 2 – sin 0 = = = For wires 1 and 5, By symmetry, the two wires together will act like wire 3. Therefore they both have an emf (voltage) of 0V. e m1 e m5 0V = = page 458 Figure 366 Calculation of the motor torque (continued) • As can be seen in the previous equation, as the loop is rotated a voltage will be generated (a generator), or a given voltage will cause the loop to rotate (motor). • In this arrangement we have to change the polarity on the coil every 180 deg of rotation. If we didn’t do this the loop the torque on the loop would reverse for half the motion. The result would be that the motor would swing back and forth, but not rotate fully. To make the torque push consistently in the same direction we need to reverse the For wire 2 (and 4 by symmetry), P 2 b 2 --- ωt ( ) cos b 2 --- ωt ( ) sin 0toa = V 2 b 2 --- ω – ωt ( ) sin b 2 -- -ω ωt ( ) cos 0 = de m2 V B × ( )dL = B 0 B – 0 = e m2 b 2 ---ω – ωt ( ) sin b 2 ---ω ωt ( ) cos 0 0 B – 0 × l d 0 a ∫ = e m2 0 0 B b 2 ---ω ωt ( ) cos l d 0 a ∫ aB b 2 --- ωt ( ) cos = = e m4 e m2 = For the total loop, e m e m1 e m2 e m3 e m4 e m5 + + + + = e m 0 aB b 2 ---ω ωt ( ) cos 0 aB b 2 ---ω ωt ( ) cos 0 + + + + = e m aBbω ωt ( ) cos = page 459 applied voltage for half the cycle. The device that does this is called a commutator. It is basically a split ring with brushes. • Real motors also have more than a single winding (loop of wire). To add this into the equation we only need to multiply by the number of loops in the winding. • As with most devices the motor is coupled. This means that one change, say in torque/force will change the velocity and hence the voltage. But a change in voltage will also change the current in the windings, and hence the force, etc. • Consider a motor that is braked with a constant friction load of Tf. Figure 367 Calculation of the motor torque (continued) • We still need to relate the voltage and current on the motor. The equivalent circuit for a motor shows the related components. e m aBbω ωt ( ) cos = e m NaBbω ωt ( ) cos = F w I B × ( )L IBa = = T w 2 F b 2 --- × ¸ , ¸ _ Fb IBab = = = M ∑ T w T f – Jα = = IBab T f – Jα = page 460 Figure 368 Calculation of the motor torque (continued) • Practice problem, R A + - + - I A e A L A e m where, I A e A , voltage and current applied to the armature (motor supply) = R A L A , equivalent resistance and inductance of windings = V ∑ e A I A R A – L A d dt -----I A – e m – 0 = = we can now add in the other equations, e A I A R A – L A d dt -----I A – NaBbω ωt ( ) cos – 0 = and recall the previous equation, IBab T f – Jα = page 461 Figure 369 Drill problem: Electromotive force • Consider a motor with a separately excited magnetic field (instead of a perma- nent magnet there is a coil that needs a voltage to create a magnetic field). The model is similar to the previous motor models, but the second coil makes the model highly nonlin- ear. R Ks Kd x N S a M Write the transfer function relating the displacement ’x’ to the current ’I’ I page 462 17.4 SUMMARY • 17.5 PRACTICE PROBLEMS 1. page 463 18. FLUID SYSTEMS 18.1 SUMMARY • Fluids are a popular method for transmitting power (hydraulics). Basically, by applying a pressure at one point, we can induce flow through a pipe/value/orifice. 18.2 MATHEMATICAL PROPERTIES • Fluids do work when we have a differential pressure on a surface. The pressure may be expressed as an absolute value. More correctly we should consider atmospheric pressure (gauge pressure). • When we deal with fluids we approximate them as incompressible. • Fluids observe some basic laws, Topics: Objectives: w flow rate = p pressure = page 464 18.2.1 Resistance • If fluid flows freely, we say it is without resistance. In reality, every fluid flow experiences some resistance. Even a simple pipe has resistance. Of similar interest is the resistance of a value. Figure 370 Fluid flow resistance • Resistance may also result from valves. Valves usually restrict flow by reducing an area for fluid to flow through. • A simple form of valve is a sliding plunger. The valve below is called a two way w K ∆p = where, w flow rate through the pipe = ∆p pressure difference across valve/pipe = K a constant specific to the pipe/valve/orifice = NOTE: In this case the relationship between pressure drop and flow are non-linear. We have two choices if we want to analyze this system. 1. We can do a non-linear analysis (e.g. integration) 2. We can approximate the equation with a linear equation. This is only good for operation near the chosen valve position. As the flow rate changes significantly the accuracy of the equation will decrease. ∆ ∆p ( ) ∆w w ∆p w ∆p R w w – ( ) ≈ R ∆ ∆p ( ) ∆w --------------- ≈ R 2 w K 2 ------ = page 465 valve because it will allow fluid to flow in or out. Figure 371 Fluid servo valve • Four way valve allow fluid force to be applied in both directions of a cylinder motion. Fluid in Fluid out to cylinder NOTE: For this type of valve the fluid in is typically under pres- sure. When the valve slide is up the pressure is applied to the cyl- inder, and causes it to actuate. The fluid out is typically not under pressure, and just returns fluid to a reservoir tank. When used this way a cylinder needs a spring, or some other force to return it and force the fluid out. page 466 Figure 372 Fluid flow control valves 18.2.2 Capacitance • Fluids are often stored in reservoirs or tanks. In a tank we have little pressure near the top, but at the bottom the mass of the fluid above creates a hydrostatic pressure. Other factors also affect the pressure, such as the shape of the tank, or whether or not the top of the tank is open. • To calculate the pressure we need to integrate over the height of the fluid. fluid in fluid in to to reservoir reservoir advance no motion retract page 467 Figure 373 Pressures on fluid elements • Consider a tank as a capacitor. As fluid is added the height of the fluid rises, and the hydrostatic pressure increases. Hence we can pump fluid into a tank to store energy, and letting fluid out recovers the energy. A very common application of this principle is a municipal water tower. Water is pumped into these tanks. As consumers draw water through the system these tanks provide pressure to the system. When designing these tanks we should be careful to keep the cross section constant (e.g. a cylinder). If the cross section varies then the fluid pressure will not drop at a linear rate and you won’t be able to use linear analysis techniques (i.e., Laplace and State Space). • The mathematical equations for a constant cross section tank are, F g F p F g + F p F p F g + F p F g + A h P F g A ------ = F g ρV ρgAh = = P ρgAh A -------------- ρgh = = C A ρg ------ = w C d dt ----- p = page 468 18.2.3 Power Sources • As with most systems we need power sources. In hydraulics these are pumps that will provide pressure and/or flow to the system. • One type of pump uses a piston. Figure 374 A piston driven hydraulic pump • A geared hydraulic pump is pictured below. Other types use vanes and pistons. Fluid In Fluid Out Normally piston Closed Valve In this common form of piston pump, the piston rod is drawn back creating suction that holds the valve closed, and pulls fluid into the chamber. When the cylinder is full of fluid the piston motion is reversed, creating a pressure, and forcing the inlet vale closed, and the outlet valve open, and the fluid is pumped out. The fluid volume can be controlled by using the cylinder size, and piston strokes Normally closed inlet valve page 469 Figure 375 A gear driven hydraulic pump • Vane based pumps can be used to create fluid flow. As the pump rotates the vanes move to keep a good seal with the outer pump wall. The displacement on the advance and return sides are unequal (aided by the sliding vanes). The relative displacement across the pump determines the fluid flow. a geared hydraulic pump Fluid in Fluid out As the center core of the pump rotates, the vanes will slide in and out. Fluid is trapped between vanes. On the inlet side the volume enclosed by the vanes expands, drawing fluid in. On the outlet side the volume between vanes decreases, forcing fluid out. page 470 Figure 376 A vaned hydraulic pump • As with the resistance of valves, these are not linear devices. It is essential that we linearize the devices. To do this we look at the pressure flow curves. (Note: most motors and engines have this problem) Figure 377 Linearizing a hydraulic valve ????? 18.3 EXAMPLE SYSTEMS • We can model a simple hydraulic system using the elements from before. Con- sider the example below, Figure 378 A hydraulic system example K ∆ ∆p ( ) ∆w --------------- = ∆ ∆p ( ) ∆w ∆p w ∆p w 1 K ---- ∆p ∆p – ( ) ≈ pump valve tank page 471 Figure 379 A hydraulic system example (continued) For the pump the relationship is shown in the graph, and it will operate at the point marked. ∆p w For the valve the relationship is given below ∆p w The pipes are all equal length and have the relationships shown below. ∆p w page 472 18.4 SUMMARY • 18.5 PRACTICE PROBLEMS 1. page 473 19. THERMAL SYSTEMS 19.1 INTRODUCTION • Energy can be stored and transferred in materials in a number of forms. Thermal energy (heat) is stored and transmitted through all forms of matter. 19.2 MATHEMATICAL PROPERTIES 19.2.1 Resistance • A universal property of energy is that it constantly strives for equilibrium. This means that a concentration of energy will tend to dissipate. When material separates regions of different temperatures it will conduct heat energy at a rate proportional to the difference. Materials have a measurable conductivity or resistance (note: this is different than electrical conductivity and resistance.) Topics: Objectives: page 474 Figure 380 Thermal resistance • When dealing with thermal resistance there are many parallels to electrical resis- tance. The flow of heat (current) is proportional to the thermal difference (voltage). If we have thermal systems in parallel or series they add as normal resistors do. Figure 381 Parallel and series thermal resistance q 1 R --- θ j θ i – ( ) = where, q heat flow rate from j to i (J/s or watts) = R thermal resistance = θ temperature = R d Aα ------- = d length of thermal conductor = A cross section area of thermal conductor = α thermal conductivity (W/mK) = dq dl ------ 1 R --- dθ dl ------ ¸ , ¸ _ = R 1 R 2 R 1 R 2 1 R T ------ 1 R 1 ------ 1 R 2 ------ + = R T R 1 R 2 + = page 475 19.2.2 Capacitance • Heat energy is absorbed at different rates in different materials - this rate is referred to as thermal capacitance. And as long as the material has no major changes in structure (i.e., gas-solid or phase transition) this number is relatively constant. Figure 382 Thermal capacitance • One consideration when dealing with heating capacitance is that the heat will not instantly disperse throughout the mass. When we want to increase the rate of heat absorp- tion we can use a mixer (with a gas or fluid). A mixer is shown in the figure below. This mixer is just a rotating propeller that will cause the liquid to circulate. Figure 383 A mixer to prevent uneven temperature distribution in thermal storage ∆θ 1 C ---- q in q out – ( ) = where, C thermal capacitance = C Mσ = where, M mass of thermal body = σ specific heat of material in mass = dθ dt ------ 1 C --- - dq dt ------ = page 476 19.2.3 Sources • If we plan to design a thermal system we will need some sort of heat source. One popular heating source is an electrical heating element. • heating coils are normally made out of some high resistance metal/alloy such as nichrome (nickel and chrome) or tungsten. • If we run a current through the wire the resistance will generate heat. As these metals get hotter the resistance rises, hence the temperature is self regulating. If we control the voltage and current we can control the amount of heat delivered by the coil. Figure 384 Electrical heating elements 19.3 EXAMPLE SYSTEMS • We know that as we heat materials at one point, they do not instantly heat at all points, there is some delay (consider a spoon in a hot bowl of soup). This delay is a func- tion of heat capacitance (yes there is a parallel to the electrical description). + V - I resistance temp P IV = where, P power generated as heat = I current into coil = V voltage across coil = page 477 • Consider an insulated sealed chamber with a resistive barrier between sides, and a heating element in one side. Figure 385 A two chamber thermal system Given q 0 heat flow into the left chamber from the heating element = Next, d dt ----- θ 1 1 C 1 ------ q 0 q 1 – ( ) = θ 1 C 1 , initial temperature and heat capacitance of left side = q 1 1 R --- θ 1 θ 2 – ( ) = θ 1 C 1 , R q i θ 2 C 2 , θ 2 C 2 , initial temperature and heat capacitance of right si de = q 1 heat flow through the center barrier = d dt -----θ 2 1 C 2 ------ q 1 ( ) = sθ 1 1 C 1 ------ q 0 1 R --- θ 1 θ 2 – ( ) – ¸ , ¸ _ = sθ 2 1 RC 2 ---------- θ 1 θ 2 – ( ) = Rq o sRC 1 θ 1 – θ 1 θ 2 – = θ 1 1 sRC 1 + ( ) θ 2 Rq o + = θ 1 θ 2 sRC 2 θ 2 + = θ 1 θ 2 Rq o + 1 sRC 1 + ---------------------- = page 478 Figure 386 A two chamber thermal system (continued) θ 1 θ 2 Rq o + 1 sRC 1 + ---------------------- θ 2 sRC 2 θ 2 + = = θ 2 Rq o + θ 2 sRC 2 θ 2 + ------------------------------- 1 sRC 1 + = 1 1 sRC 2 + ---------------------- Rq o θ 2 --------- ¸ , ¸ _ 1 sRC 2 + ---------------------- + 1 sRC 1 + = 1 Rq o θ 2 --------- ¸ , ¸ _ + 1 s RC 1 RC 2 + ( ) s 2 R 2 C 1 C 2 + + = Rq o θ 2 --------- s RC 1 RC 2 + ( ) s 2 R 2 C 1 C 2 + = θ 2 q o RC 1 C 2 ----------------- ¸ , ¸ _ s C 1 C 2 + RC 1 C 2 ------------------- ¸ , ¸ _ s 2 + -------------------------------------- A s --- B s C 1 C 2 + RC 1 C 2 ------------------- + ---------------------------- + = = q o θ 2 ----- s C 1 C 2 + ( ) s 2 RC 1 C 2 + = A q o RC 1 C 2 ----------------- ¸ , ¸ _ s C 1 C 2 + RC 1 C 2 ------------------- ¸ , ¸ _ s 2 + --------------------------------------s ¸ , ¸ _ s 0 → lim q o RC 1 C 2 ----------------- ¸ , ¸ _ C 1 C 2 + RC 1 C 2 ------------------- ¸ , ¸ _ 0 ( ) + --------------------------------------- q o C 1 C 2 + ------------------- = = = B q o RC 1 C 2 ----------------- ¸ , ¸ _ s C 1 C 2 + RC 1 C 2 ------------------- ¸ , ¸ _ s 2 + -------------------------------------- s C 1 C 2 + RC 1 C 2 ------------------- + ¸ , ¸ _ ¸ , ¸ _ s C 1 C 2 + RC 1 C 2 ------------------ – → lim q o RC 1 C 2 ----------------- ¸ , ¸ _ C 1 C 2 + RC 1 C 2 ------------------- ¸ , ¸ _ – ---------------------------- q – o C 1 C 2 + ------------------- = = = θ 2 q o C 1 C 2 + ------------------- s ------------------- q – o C 1 C 2 + ------------------- s C 1 C 2 + RC 1 C 2 ------------------- + ---------------------------- + = page 479 Figure 387 A two chamber thermal system (continued) 19.4 SUMMARY • 19.5 PRACTICE PROBLEMS 1. L 1 – θ 2 ( ) q o C 1 C 2 + ------------------- L 1 – 1 s --- L 1 – 1 s C 1 C 2 + RC 1 C 2 ------------------- + ---------------------------- – = θ 2 t ( ) q o C 1 C 2 + ------------------- 1 e C 1 C 2 + RC 1 C 2 ------------------ ¸ , ¸ _ t – – = page 480 20. LAPLACE TRANSFER FUNCTIONS 20.1 INTRODUCTION • We can model systems as a ratio between output and input. This allows powerful mathematical manipulation. 20.2 THE LAPLACE TRANSFORM • The Laplace transform allows us to reverse time. And, as you recall from before the inverse of time is frequency. Because we are normally concerned with response, the Laplace transform is much more useful in system analysis. • The basic Laplace transform equations is shown below, Topics: Objectives: F s ( ) f t ( )e st – t d 0 ∞ ∫ = where, F s ( ) the function in terms of the Laplace s = f t ( ) the function in terms of time t = page 481 Figure 388 The Laplace transform • Consider the examples below, Figure 389 Some example Laplace transforms ASIDE: - Recall that, F s ( ) f t ( )e st – t d 0 ∞ ∫ L f t ( ) [ ] = = - so for f(t) = 5, F s ( ) 5e st – t d 0 ∞ ∫ 5 s --- e st – – 0 ∞ 5 s --- e s∞ – – 5e s0 – s ------------ – – 5 s -- - = = = = - for the derivatives of a function g(t)=df(t)/dt, G s ( ) L g t ( ) [ ] L d dt ---- -f t ( ) (d/dt)f t ( )e st – t d 0 ∞ ∫ = = = we can use integration by parts to go backwards, u v d a b ∫ uv a b v u d a b ∫ – = (d/dt)f t ( )e st – t d 0 ∞ ∫ du df t ( ) = therefore, v e st – = u f t ( ) = dv se st – dt – = f t ( ) s – ( )e st – t d 0 ∞ ∫ ∴ f t ( )e st – 0 ∞ (d/dt)f t ( )e st – t d 0 ∞ ∫ – = (d/dt)f t ( )e st – t d 0 ∞ ∫ ∴ f t ( )e ∞s – f t ( )e 0s – – [ ] s f t ( )e st – t d 0 ∞ ∫ + = L d dt -----f t ( ) f 0 ( ) – sL f t ( ) [ ] + = ∴ page 482 20.2.1 A Few Transforms • The basic properties Laplace Transforms for are given below, Figure 390 Laplace transform tables L f t ( ) [ ] s ----------------- Kf t ( ) f 1 t ( ) f 2 t ( ) f 3 – t ( ) … + + df t ( ) dt ----------- d 2 f t ( ) dt 2 -------------- d n f t ( ) dt n -------------- f t ( ) t d 0 t ∫ KL f t ( ) [ ] f 1 s ( ) f 2 s ( ) f 3 – s ( ) … + + sL f t ( ) [ ] f 0 – ( ) – s 2 L f t ( ) [ ] sf 0 – ( ) – df 0 – ( ) dt ------------------ – s n L f t ( ) [ ] s n 1 – f 0 – ( ) – s n 2 – df 0 – ( ) dt ------------------ – … – d n f 0 – ( ) dt n -------------------- – TIME DOMAIN FREQUENCY DOMAIN f t ( ) f s ( ) f t a – ( )u t a – ( ) a 0 > , f at ( ) a 0 > , tf t ( ) t n f t ( ) f t ( ) t -------- e as – L f t ( ) [ ] 1 a ---f s a --- ¸ , ¸ _ df s ( ) – ds --------------- 1 – ( ) nd n f s ( ) ds n --------------- f u ( ) u d s ∞ ∫ e at – f t ( ) f s a – ( ) page 483 • A set of useful functional Laplace transforms are given below. These are mainly used for converting to and from time ’t’ to the Laplace ’s’. Figure 391 Laplace transform tables (continued) δ t ( ) t e at – ωt ( ) sin ωt ( ) cos te at – 1 1 s 2 ---- 1 s a + ----------- ω s 2 ω 2 + ----------------- s s 2 ω 2 + ----------------- 1 s a + ( ) 2 ------------------- TIME DOMAIN FREQUENCY DOMAIN A A s --- unit impulse step ramp exponential decay t 2 2 s 3 ---- t n n 0 > , n! s n 1 + ----------- t 2 e at – 2! s a + ( ) 3 ------------------- page 484 Figure 392 Laplace transform tables (continued) 20.2.2 Impulse Response (or Why Laplace Transforms Work) • Consider a system model. That model can be said to have an input (forcing func- tion) and an output (resulting response function). e at – ωt ( ) sin e at – ωt ( ) cos Bs C + s a + ( ) 2 ω 2 + -------------------------------- A s α βj – + ----------------------- A complex conjugate s α βj + + ------------------------------------- - + A s α βj – + ( ) 2 ------------------------------- A complex conjugate s α βj + + ( ) 2 -------------------------------------- + ω s a + ( ) 2 ω 2 + -------------------------------- s a + s a + ( ) 2 ω 2 + -------------------------------- e at – B ωt cos C aB – ω ----------------- ¸ , ¸ _ ωt sin + 2 A e αt – βt θ + ( ) cos 2t A e αt – βt θ + ( ) cos TIME DOMAIN FREQUENCY DOMAIN e at – ωt ( ) sin ω s a + ( ) 2 ω 2 + -------------------------------- s c + s a + ( ) s b + ( ) --------------------------------- c a – ( )e at – c b – ( )e bt – – b a – --------------------------------------------------------- 1 s a + ( ) s b + ( ) --------------------------------- e at – e bt – – b a – ------------------------ page 485 Figure 393 A transfer function example • If we look at an input signal (force here) we can break it into very small segments in time. As the time becomes small we call it an impulse function. Figure 394 An impulse as a brief duration pulse • If we put an impulse into a system the output will be an impulse response. F t ( ) d dt ----- ¸ , ¸ _ 2 x t ( ) = where, F t ( ) force (forcing function or input) = x t ( ) displacement (resulting/output function) = x t ( ) F t ( ) ---------- g t ( ) = where, g t ( ) a function that is the ratio of input and output = t F t ( ) ∆t 0 → An impulse page 486 Figure 395 Response of the system to a single pulse • If we add all of the impulse responses together we will get a total system response. This operation is called convolution. Figure 396 A set of pulses for a system gives summed responses to give the output • The convolution integral can be difficult to deal with because of the time shift. But, the Laplace transform for the convolution integral turns it into a simple multiplica- tion. t F t ( ) g t ( )F t ( ) t d ∫ t x t ( ) t F t ( ) t x t ( ) impulse responses sum of responses c t ( ) g t τ – ( )r τ ( ) τ d 0 t ∫ = The convolution integral g t τ – ( )F τ ( ) τ d 0 t ∫ page 487 Figure 397 The convolution integral 20.3 MODELING MECHANICAL SYSTEMS • Before doing any sort of analysis of a vibrating system, a system model must be developed. The obvious traditional approach is with differential equations. Figure 398 A mass-spring-damper example c t ( ) g t τ – ( )r τ ( ) τ d 0 t ∫ = C s ( ) G s ( )R s ( ) = Kd Ks M x F M d 2 x dt 2 -------- K d dx dt ----- - K s x + + = F t ( ) x t ( ) ---------- M d 2 dt 2 ------- K d d dt ----- K s + + = L F t ( ) x t ( ) ---------- F s ( ) x s ( ) ----------- Ms 2 K d s K s + + = = F ASIDE: An important concept that is ubiquitous yet largely unrecognized is the use of functional design. We look at parts of systems as self contained modules that use inputs to produce outputs. Some systems (such a mechanisms) are reversible, others are not (consider a worm gear). An input is typically something we can change, an output is the resulting change in a system. For the example above ‘F’ over ‘x’ implies that we are changing the input ‘x’, and there is some change in ‘F’. We know this could easily be reversed mathematically and practically. page 488 20.4 MODELING ELECTRICAL SYSTEMS • Consider the basic equations for capacitors, inductors and resistors. Figure 399 Impedances of electrical components • For the circuit below, the switch is closed at t=0sec, ANOTHER ASIDE: Keep in mind that the mathematical expression ‘F/x’ is a ratio between input (displacement action) and output (reaction force). When shown with differentials it is obvious that the ratio is not simple, and is a function of time. Also keep in mind that if we were given a force applied to the system it would become the input (action force) and the output would be the displacement (resulting motion). To do this all we need to do is flip the numerators and denominators in the transfer function. V s ( ) RI s ( ) = V t ( ) RI t ( ) = Resistor V s ( ) 1 C --- - ¸ , ¸ _ I s ( ) s --------- = V t ( ) 1 C ---- I t ( ) t d ∫ = Capacitor V s ( ) LsI s ( ) = V t ( ) L d dt ----- I t ( ) = Inductor Time domain Frequency domain Device Z R = Z 1 sC ------ = Z Ls = Impedance Note: Impedance is like resistance, except that it includes time variant features also. V ZI = page 489 Figure 400 A circuit example 20.5 USING LAPLACE TRANSFORMS • The differential equation is in the time domain. By doing a Laplace transform we can move the system into the frequency domain. This makes it much easier to solve com- plex convolution problems. Without this method, very complex integrals would be required. • Inputs must in the time domain must also be converted to the frequency domain. 50VDC + - L C R + Vo - t=0sec Treat the circuit as a voltage divider, V o 50V 1 sC 1 R --- + ---------------- ¸ , ¸ _ sL 1 sC 1 R --- + ---------------- ¸ , ¸ _ + ----------------------------------- 50V R 1 sCR + -------------------- ¸ , ¸ _ sLR R 1 sCR + -------------------- ¸ , ¸ _ + ------------------------------------------ 50V R s 2 R 2 LC sLR R + + --------------------------------------------- ¸ , ¸ _ = = = page 490 Figure 401 An input function • Normally at this point we would have the input to the system, and the system dif- ferential equation. The convolution integral would be used to find the time response, but using Laplace transforms this becomes a simple substitution. Figure 402 A transfer function multiplied by the input function • At this point we have ‘x’ as a function of ‘s’ (later we will see ‘s’ is equivalent to frequency). We can find the initial, and final values (steady state) of ‘x’ using the final e.g., Apply a constant force of A, starting at time t=0 sec. (*Note: a force applied instantly is impossible) F(t) = A for t >= 0 = 0 for t < 0 F s ( ) L F t ( ) [ ] A s --- = = Perform Laplace transform using tables F s ( ) x s ( ) ----------- Ms 2 K d s K s + + A s --- ¸ , ¸ _ x s ( ) ---------- = = x s ( ) ∴ A Ms 2 K d s K s + + ( )s --------------------------------------------- = Assume some values such as, K d 3000 Ns m ------ = K s 2000 N m ---- = M 1000kg = A 1000N = x s ( ) ∴ 1 s 2 3s 2 + + ( )s --------------------------------- = page 491 value theorem. Figure 403 Final and initial values theorems • All that is needed to get the time domain function is an inverse Laplace trans- form. This is quite often done by using partial fraction expansion of the equations, fol- lowed by Inverse Laplace transforms of the simpler parts. x t ∞ → ( ) sx s ( ) [ ] s 0 → lim = x t ∞ → ( ) ∴ 1s s 2 3s 2 + + ( )s --------------------------------- s 0 → lim 1 s 2 3s 2 + + -------------------------- s 0 → lim 1 0 ( ) 2 3 0 ( ) 2 + + ------------------------------------- 1 2 -- - = = = = Final value theorem x t 0 → ( ) sx s ( ) [ ] s ∞ → lim = x t 0 → ( ) ∴ 1 s ( ) s 2 3s 2 + + ( )s --------------------------------- s ∞ → lim 1 ∞ ( ) 2 3 ∞ ( ) 2 + + ( ) -------------------------------------------- 1 ∞ ---- 0 = = = = Initial value theorem page 492 Figure 404 Partial fractions to reduce an output function • The terms from the partial fraction expansion are put through an inverse Laplace transform using a lookup table. (A sample table is given later) x s ( ) 1 s 2 3s 2 + + ( )s --------------------------------- 1 s 1 + ( ) s 2 + ( )s ------------------------------------ A s --- B s 1 + ----------- C s 2 + ----------- + + = = = A s 1 s 1 + ( ) s 2 + ( )s ------------------------------------ ¸ , ¸ _ s 0 → lim 1 2 -- - = = B s 1 + ( ) 1 s 1 + ( ) s 2 + ( )s ------------------------------------ ¸ , ¸ _ s 1 – → lim 1 – = = C s 2 + ( ) 1 s 1 + ( ) s 2 + ( )s ------------------------------------ ¸ , ¸ _ s 2 – → lim 1 2 -- - = = 1 s 1 + ( ) s 2 + ( )s ------------------------------------ A s --- B s 1 + ----------- C s 2 + ----------- + + = s 1 + ( ) 1 s 1 + ( ) s 2 + ( )s ------------------------------------ s 1 + ( ) A s --- s 1 + ( ) B s 1 + ----------- s 1 + ( ) C s 2 + ----------- + + = 1 s 2 + ( )s ------------------- s 1 + ( ) A s --- B s 1 + ( ) C s 2 + ----------- + + = 1 s 2 + ( )s ------------------- s 1 – → lim s 1 + ( ) A s --- s 1 – → lim B s 1 – → lim s 1 + ( ) C s 2 + ----------- s 1 – → lim + + = 1 s 2 + ( )s ------------------- s 1 – → lim B s 1 – → lim B = = Aside: the short cut above can reduce time for simple partial fraction expansions. A simple proof for finding ‘B’ above is given in this box. x s ( ) 1 s 2 3s 2 + + ( )s --------------------------------- 0.5 s ------- 1 – s 1 + ----------- 0.5 s 2 + ----------- + + = = page 493 Figure 405 Partial fractions to reduce an output function (continued) • Some numbers can be calculated to verify this, Figure 406 Partial fractions to reduce an output function (continued) • Note that the damper is relatively larger than the spring, therefore no “oscilla- tion”. • What if the damping approaches 0? x t ( ) L 1 – x s ( ) [ ] L 1 – 0.5 s ------- 1 – s 1 + ----------- 0.5 s 2 + ----------- + + = = x t ( ) L 1 – 0.5 s ------- L 1 – 1 – s 1 + ----------- L 1 – 0.5 s 2 + ----------- + + = x t ( ) 0.5 [ ] 1 – ( )e t – [ ] 0.5 ( )e 2t – [ ] + + = x t ( ) 0.5 e t – – 0.5e 2t – + = Actual response of the system in time t (sec.) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 10.0 100.0 1000.0 x(t) 0.00000 0.5 0.0 t x(t) keep in mind this is the drop (i.e., down is positive) 0.00453 0.01643 0.03359 0.05434 0.07741 0.10179 0.12671 0.15162 0.17608 0.19979 0.49995 0.50000 0.50000 page 494 Figure 407 a system with no damping tends to oscillate 20.5.1 Solving Partial Fractions • The following is a flowchart that shows the general method for doing inverse Laplace transforms. x(t) t page 495 Figure 408 The methodology for doing inverse transforms • The next is a flowchart for partial fraction expansions. Start with a function of ’s’. NOTE: This does not apply for transfer functions. is the function in the transform Match the function(s) to the form in the table and convert to a time function yes no yes can the function be simplified? tables? simplify the function no Use partial fractions to break the function into smaller parts Done page 496 Figure 409 The methodology for solving partial fractions • The partial fraction expansion for, start with a function that has a polynomial numerator and denominator is the order of the numerator >= denominator? yes no use long division to reduce the order of the numerator Find roots of the denominator and break the equation into partial fraction form with unknown values Done OR use algebra technique use limits technique. If there are higher order roots (repeated terms) then derivatives will be required to find solutions page 497 Figure 410 A partial fraction example • Consider the example below where the order of the numerator is larger than the denominator. x s ( ) 1 s 2 s 1 + ( ) --------------------- A s 2 ---- B s --- C s 1 + ----------- + + = = C s 1 + ( ) 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 1 – → lim 1 = = A s 2 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 0 → lim 1 s 1 + ----------- s 0 → lim 1 = = = B d ds ----- s 2 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 0 → lim d ds ----- 1 s 1 + ----------- ¸ , ¸ _ s 0 → lim s 1 + ( ) 2 – – [ ] s 0 → lim 1 – = = = = page 498 Figure 411 Partial fractions when the numerator is larger than the denominator • When the order of the denominator terms is greater than 1 it requires an expanded partial fraction form, as shown below. Figure 412 Partial fractions with repeated roots x s ( ) 5s 3 3s 2 8s 6 + + + s 2 4 + -------------------------------------------- = This cannot be solved using partial fractions because the numerator is 3rd order and the denominator is only 2nd order. Therefore long division can be used to reduce the order of the equation. s 2 4 + 5s 3 3s 2 8s 6 + + + 5s 3 + 5s 3 20s + 3s 2 12s – 6 + 3s 2 12 + 12s – 6 – This can now be used to write a new function that has a reduced portion that can be solved with partial fractions. x s ( ) 5s 3 12s – 6 – s 2 4 + ---------------------- + + = solve 12s – 6 – s 2 4 + ---------------------- A s 2j + ------------- B s 2j – ------------- + = F s ( ) 5 s 2 s 1 + ( ) 3 ------------------------ = 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = page 499 • We can solve the previous problem using the algebra technique. Figure 413 Solving partial fractions with algebra • This problem can also be solved using the limits technique. But, because of the repeated roots we will need to differentiate to find the repeated roots. 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = A s 1 + ( ) 3 Bs s 1 + ( ) 3 Cs 2 Ds 2 s 1 + ( ) Es 2 s 1 + ( ) 2 + + + + s 2 s 1 + ( ) 3 ------------------------------------------------------------------------------------------------------------------------------------------ = s 4 B E + ( ) s 3 A 3B D 2E + + + ( ) s 2 3A 3B C D E + + + + ( ) s 3A B + ( ) A ( ) + + + + s 2 s 1 + ( ) 3 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- = 0 1 0 0 1 1 3 0 1 2 3 3 1 1 1 3 1 0 0 0 1 0 0 0 0 A B C D E 0 0 0 0 5 = A B C D E 0 1 0 0 1 1 3 0 1 2 3 3 1 1 1 3 1 0 0 0 1 0 0 0 0 1 – 0 0 0 0 5 5 15 – 5 10 15 = = 5 s 2 s 1 + ( ) 3 ------------------------ 5 s 2 ---- 15 – s --------- 5 s 1 + ( ) 3 ------------------- 10 s 1 + ( ) 2 ------------------- 15 s 1 + ( ) ---------------- + + + + = page 500 Figure 414 Solving partial fractions with limits • We can prove the technique for the derivatives of the functions. 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = A 5 s 2 s 1 + ( ) 3 ------------------------ ¸ , ¸ _ s 2 s 0 → lim 5 s 1 + ( ) 3 ------------------- s 0 → lim 5 = = = B d ds ----- 5 s 2 s 1 + ( ) 3 ------------------------ ¸ , ¸ _ s 2 s 0 → lim d ds ----- 5 s 1 + ( ) 3 ------------------- ¸ , ¸ _ s 0 → lim 5 3 – ( ) s 1 + ( ) 4 ------------------- s 0 → lim 15 – = = = = C 5 s 2 s 1 + ( ) 3 ------------------------ ¸ , ¸ _ s 1 + ( ) 3 s 1 – → lim 5 s 2 ---- s 1 – → lim 5 = = = D 1 1! ----- d ds ----- 5 s 2 s 1 + ( ) 3 ------------------------ ¸ , ¸ _ s 1 + ( ) 3 s 1 – → lim 1 1! ---- - d ds ----- 5 s 2 ---- s 1 – → lim 1 1! ---- - 2 5 ( ) – s 3 -------------- s 1 – → lim 10 = = = = E 1 2! ----- d ds ----- 2 5 s 2 s 1 + ( ) 3 ------------------------ ¸ , ¸ _ s 1 + ( ) 3 s 1 – → lim 1 2! ---- - d ds ----- 2 5 s 2 ---- s 1 – → lim 1 2! ---- - 30 s 4 ----- - s 1 – → lim 15 = = = = 5 s 2 s 1 + ( ) 3 ------------------------ 5 s 2 ---- 15 – s --------- 5 s 1 + ( ) 3 ------------------- 10 s 1 + ( ) 2 ------------------- 15 s 1 + ( ) ---------------- + + + + = 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = s 1 – → lim s 1 + ( ) 3 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = ¸ , ¸ _ s 1 – → lim 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = 5 s 2 ---- A s 1 + ( ) 3 s 2 ----------------------- B s 1 + ( ) 3 s ----------------------- C D s 1 + ( ) E s 1 + ( ) 2 + + + + = s 1 – → lim page 501 Figure 415 A proof of the need for differentiation for repeated roots For C, evaluate now, 5 1 – ( ) 2 ------------- A 1 – 1 + ( ) 3 1 – ( ) 2 ---------------------------- B 1 – 1 + ( ) 3 1 – ---------------------------- C D 1 – 1 + ( ) E 1 – 1 + ( ) 2 + + + + = 5 1 – ( ) 2 ------------- A 0 ( ) 3 1 – ( ) 2 -------------- B 0 ( ) 3 1 – -------------- C D 0 ( ) E 0 ( ) 2 + + + + = C 5 = For D, differentiate once, then evaluate d dt ----- 5 s 2 ---- A s 1 + ( ) 3 s 2 ----------------------- B s 1 + ( ) 3 s ----------------------- C D s 1 + ( ) E s 1 + ( ) 2 + + + + = ¸ , ¸ _ s 1 – → lim 2 5 ( ) – s 3 -------------- A 2 s 1 + ( ) 3 s 3 ---------------------- – 3 s 1 + ( ) 2 s 2 ---------------------- + ¸ , ¸ _ B s 1 + ( ) 3 s 2 ------------------- – 3 s 1 + ( ) 2 s ---------------------- + ¸ , ¸ _ D 2E s 1 + ( ) + + + = s 1 – → lim 2 5 ( ) – 1 – ( ) 3 -------------- D 10 = = For E, differentiate twice, then evaluate (the terms for A and B will be ignored to save d dt ----- ¸ , ¸ _ 2 5 s 2 ---- A s 1 + ( ) 3 s 2 ----------------------- B s 1 + ( ) 3 s ----------------------- C D s 1 + ( ) E s 1 + ( ) 2 + + + + = ¸ , ¸ _ s 1 – → lim d dt ----- ¸ , ¸ _ 2 5 ( ) – s 3 -------------- A … ( ) B … ( ) D 2E s 1 + ( ) + + + = ¸ , ¸ _ s 1 – → lim space, but these will drop out anyway). 3 2 5 ( ) – ( ) – s 4 ------------------------- A … ( ) B … ( ) 2E + + = s 1 – → lim 3 2 5 ( ) – ( ) – 1 – ( ) 4 ------------------------- A 0 ( ) B 0 ( ) 2E + + = E 15 = page 502 20.5.2 Input Functions • An example of a complex time function is, Figure 416 Switching on and off function parts 20.5.3 Examples • These systems tend to vibrate simply. This vibration will often decay naturally. The contrast is the first order system that tends to move towards new equilibrium points without any sort of resonance or vibration. t f(t) 5 0 1 3 4 seconds f t ( ) 5tu t ( ) 5 t 1 – ( )u t 1 – ( ) – 5 t 3 – ( )u t 3 – ( ) – 5 t 4 – ( )u t 4 – ( ) + = f s ( ) 5 s 2 ---- 5e s – s 2 ---------- – 5e 3s – s 2 ------------ – 5e 4s – s 2 ------------ + = page 503 • Figure 417 A mass-spring-damper example • To continue the example with numerical values, Ks Kd M F(t) x ** Assume gravity is negligible +y F y ∑ F t ( ) – K d dx dt ------ K s x + + M d 2 x dt 2 -------- – = = F s ( ) – ∴ K d sx K s x Ms 2 x + + + 0 = F s ( ) x ----------- ∴ K d s K s Ms 2 + + = x F s ( ) ----------- ∴ 1 Ms 2 K d s K s + + -------------------------------------- = x F s ( ) ----------- ∴ 1 M ----- s 2 K d M ------ s K s M ----- + + --------------------------------- = page 504 Figure 418 A mass-spring-damper example (continued) M 1kg = K s 2 N m ---- = K d 0.5 Ns m ------ = Assuming an input of, Assuming component values of, F t ( ) 5 6t ( )N cos = F s ( ) ∴ 5s s 2 6 2 + ---------------- = This means, x s ( ) F s ( ) x s ( ) F s ( ) ----------- ¸ , ¸ _ 5s s 2 6 2 + ---------------- ¸ , ¸ _ 1 1 -- - s 2 0.5s 2 + + ------------------------------ ¸ , ¸ _ = = x s ( ) ∴ 5s s 2 36 + ( ) s 2 0.5s 2 + + ( ) ---------------------------------------------------------- = x ∴ s ( ) A s 6j + ------------- B s 6j – ------------- C s 0.5 – 1.39j + ---------------------------------- D s 0.5 – 1.39j – ---------------------------------- + + + = A s 6j + ( ) 5s ( ) s 6j – ( ) s 2 36 + ( ) s 2 0.5s 2 + + ( ) ---------------------------------------------------------------------------- s 6j – → lim 30j – 12j – ( ) 36 3j – 2 + ( ) ----------------------------------------------- = = A ∴ 30j – 432j – 36 – 24j – ----------------------------------------- 30j 36 456j + ----------------------- 36 456j – 36 456j – ----------------------- × 13680 1080j + 209 232 , ----------------------------------- 0.0654 0.00516j + = = = = --Continue on to find B, C, D same way x ∴ s ( ) 0.0654 0.00516j + s 6j + -------------------------------------------- 0.0654 0.00516j – s 6j – -------------------------------------------- … + + = x t ( ) 2 0.0654 2 0.00516 2 + e 0t – 0.00516t 0.00516 0.0654 ------------------- – ¸ , ¸ _ atan + ¸ , ¸ _ cos … + = Do inverse Laplace transform page 505 Figure 419 A mass-spring-damper example (continued) • Consider the circuit below, page 506 Figure 420 A circuit example t=0 C R + - + Vo - V s 3 t cos = V o V s Z R Z R Z C + ------------------- ¸ , ¸ _ = As normal we relate the source voltage to the output voltage. The we find the values for the various terms in the frequency domain. V s s ( ) 3s 2 s 2 1 + -------------- = Z R R = Z C 1 sC ------ = Next, we may combine the equations, and find a partial fraction equivalent. V o 3s 2 s 2 1 + -------------- R R 1 sC ------ + ---------------- ¸ , ¸ _ 3s 3 RC s 2 1 + ( ) 1 RsC + ( ) -------------------------------------------- 3s 3 s 2 1 + ( ) s 1 RC -------- + ¸ , ¸ _ ----------------------------------------- = = = V o A --- B --- C ---- + + = A [ ] s → lim = = Finally we do the inverse transform to get the function back into the time domain. page 507 20.6 A MAP OF TECHNIQUES FOR LAPLACE ANALYSIS • The following map is to be used to organize the various topics covered in the course. Figure 421 A map of Laplace analysis techniques System Model (differential equations) Laplace Transform Transfer Function Some input disturbance in terms of time Input described with Laplace Equation We can figure Steady state Bode and Phase Plots - Straight line - Exact plot Approximate equations for steady state vibrations Equations for gain and phase at different frequencies Fourier Transform Substitute Output Function (Laplace form) Output Function (Laplace terms) Partial Fraction Time based Inverse Laplace Root-Locus for stability response equation frequency response out from plots Experiments page 508 20.7 NON-LINEAR ELEMENTS • If our models include a device that is non linear we will need to linearize the model before we can proceed. • A non-linear system can be approximated with a linear equation using the follow- ing method. 1. Pick an operating point or range for the component. 2. Find a constant value that relates a change in the input to a change in the output. 3. Develop a linear equation. 4. Use the linear equation in the analysis (Laplace or other) • Consider the example below, Figure 422 Linearizing non-linear elements 20.8 SUMMARY • In this case the relationship between pressure drop and flow are non-linear. We need to develop an equation that approximates the local operating point. ∆ ∆p ( ) ∆q q ∆p q ∆p R q q – ( ) ≈ R ∆ ∆p ( ) ∆q --------------- ≈ R 2 q K 2 ------ = page 509 20.9 PRACTICE PROBLEMS 1. Convert the following functions from time to laplace functions. L 5 [ ] L e 3t – [ ] L 5e 3t – [ ] L 5te 3t – [ ] L 5t [ ] L 4t 2 [ ] L 5t ( ) cos [ ] L 5t 1 + ( ) cos [ ] L 5e 3t – 5t ( ) cos [ ] L 5e 3t – 5t 1 + ( ) cos [ ] L 5t ( ) sin [ ] L 3t ( ) sinh [ ] a) b) c) d) e) f) g) h) i) j) k) l) L 4 2t ( ) sin [ ] for 0 < t < pi , L t 2 2t ( ) sin [ ] L d dt -----t 2 e 3t – L x 2 e x – x d 0 t ∫ L d dt ----- 6t ( ) sin L d dt ----- ¸ , ¸ _ 3 t 2 L y y d 0 t ∫ L u t 1 – ( ) u t 2 – ( ) – [ ] L e 2t – u t 2 – ( ) [ ] L e t 3 – ( ) – u t 1 – ( ) [ ] L 5e 3t – u t 1 – ( ) u t 2 – ( ) – + [ ] L 7t 2 + ( ) cos e t 3 – + [ ] s) m) n) o) p) q) r) t) u) v) w) x) L 3 t 1 – ( ) e t 1 + ( ) – + [ ] y) L 3t 3 t 1 – ( ) e 5t – + [ ] z) L 6e 2.7t – 9.2t 3 + ( ) cos [ ] aa) page 510 2. Convert the following functions below from the laplace to time domains. ans. w) 5 s 3 + ----------- e s – s ------- e 2s – s --------- – + 2 ( ) cos s 2 ( ) sin 7 – s 2 49 + -------------------------------------------- e 3 – s 1 – ----------- + 0.416s – 6.37 – s 2 49 + ------------------------------------- e 3 – s 1 – ----------- + = x) 3 s 2 ---- 3 s --- – e 1 – s 1 + ----------- + y) L 1 – 1 s 1 + ----------- a) L 1 – 5 s 1 + ----------- b) L 1 – 6 s 2 ---- c) L 1 – 6 s 3 ---- d) L 1 – s 2 + s 3 + ( ) s 4 + ( ) --------------------------------- e) L 1 – 6 s 2 5s 6 + + -------------------------- f) L 1 – 6 4s 2 20s 24 + + ----------------------------------- g) L 1 – 6 s 2 6 + -------------- h) L 1 – 5 1 e 4.5s – – ( ) [ ] i) L 1 – 4 3j + s 1 2j – + ---------------------- 4 3j – s 1 2j + + ----------------------- + j) L 1 – 6 s 4 ---- 6 s 2 9 + -------------- + k) L 1 – [ ] l) L 1 – [ ] m) L 1 – [ ] n) L 1 – [ ] o) L 1 – [ ] p) L 1 – [ ] q) L 1 – [ ] r) L 1 – [ ] s) L 1 – [ ] t) page 511 3. Convert the following functions below from the laplace to time domains using partial fractions. ans. a) e t – L 1 – s 2 + s 3 + ( ) s 4 + ( ) --------------------------------- a) L 1 – 6 s 2 5s 6 + + -------------------------- b) L 1 – 6 4s 2 20s 24 + + ----------------------------------- c) L 1 – 6 s 2 6 + -------------- d) L 1 – 6 s 2 5s + ---------------- e) L 1 – 9s 2 6s 3 + + s 3 5s 2 4s 6 + + + ---------------------------------------- f) L 1 – s 3 9s 2 6s 3 + + + s 3 5s 2 4s 6 + + + ---------------------------------------- g) L 1 – 9s 4 + s 3 + ( ) 3 ------------------- h) L 1 – 9s 4 + s 3 s 3 + ( ) 3 ------------------------ i) L 1 – s 2 2s 1 + + s 2 3s 2 + + -------------------------- j) L 1 – s 2 3s 5 + + 6s 2 6 + -------------------------- k) L 1 – s 2 2s 3 + + s 2 2s 1 + + -------------------------- l) L 1 – [ ] m) L 1 – [ ] n) L 1 – [ ] o) L 1 – [ ] p) L 1 – [ ] q) L 1 – [ ] r) L 1 – [ ] s) L 1 – [ ] t) page 512 4. Convert the following differential equations to transfer functions. ans. j) δ t ( ) e 2t – – k) δ t ( ) 6 --------- 0.834 t 0.927 + ( ) cos + l) δ t ( ) 2te t – + 5x'' 6x' 2x + + 5F = a) y' 8y + 3x = b) y' y – 5x + 0 = c) d) e) f) g) h) i) j) page 513 5. Given the following input functions and transfer functions, find the response in time. 6. Prove the following relationships. V2. Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t). V3. Given a mass supported by a spring and damper, find the displacement of the supported mass over time if it is released from neutral at t=0sec, and gravity pulls it downward. a) find the transfer function x/F (as a Laplace function of time). x s ( ) F s ( ) ----------- s 2 + s 3 + ( ) s 4 + ( ) --------------------------------- m n ---- ¸ , ¸ _ = a) F t ( ) 5N = Transfer Function Input x s ( ) F s ( ) ----------- s 2 + s 3 + ( ) s 4 + ( ) --------------------------------- m n ---- ¸ , ¸ _ = b) x t ( ) 5m = x s ( ) F s ( ) ----------- = c) F t ( ) = x s ( ) F s ( ) ----------- = d) x t ( ) = x s ( ) F s ( ) ----------- = e) F t ( ) = x s ( ) F s ( ) ----------- = f) x t ( ) = L f t a --- ¸ , ¸ _ aF as ( ) = a) L f at ( ) [ ] 1 a --- F s a --- ¸ , ¸ _ = b) L e at – f t ( ) [ ] F s a + ( ) = c) f t ( ) t ∞ → lim sF s ( ) s 0 → lim = d) f t ( ) t ∞ → lim sF s ( ) s 0 → lim = e) L tf t ( ) [ ] d dt ----- F s ( ) – = f) g) h) i) j) k) l) G s ( ) 4 s 2 + ----------- Y s ( ) X s ( ) ----------- = = X t ( ) 20 = When t >= 0 page 514 b) find the input function F. c) find the position as a function of ‘s’. d) do the inverse Laplace transform to find the position as a function of time for Ks = 10N/m, Kd = 5Ns/m, M=10kg. V4. The applied force ‘F’ is the input to the system, and the output is the displacement ‘x’. b) What is the steady state response for an applied force F(t) = 10cos(t + 1) N ? c) Give the transfer function if ‘x’ is the input. d) Draw the bode plots. e) Find x(t), given F(t) = 10N for t >= 0 seconds. V5. Given the transfer function below, a) draw the straight line approximation of the bode and phase shift plots. b) determine the steady state output if the input is x(s) = 20 cos(9t+.3) V6. Convert the Laplace function below Y(s) to the time domain Y(t). 1. Develop differential equations and then transfer functions for the mechanical and electrical sys- tems below. a) There is viscous damping between the block and the ground. A force is applied K 1 = 500 N / m K 2 = 1000 N / m x M = 10kg F a) find the transfer function. y s ( ) x s ( ) ---------- s 10 + ( ) s 5 + ( ) s 5 + ( ) 2 ------------------------------------ = Y s ( ) 5 s --- 12 s 2 4 + -------------- 3 s 2 3j – + ---------------------- 3 s 2 3j + + ----------------------- + + + = page 515 to cause the mass the accelerate. b) 2. The following differential equation is supplied, with initial conditions. a) Write the equation in state variable form. b) Convert the differential equation to the Laplace domain, including initial condi- tions. Solve to find the time response to the given input using Laplace trans- forms. c) Solve the differential equation using calculus techniques. d) Find the frequency response (gain and phase) for the transfer function using the Fourier transform. Roughly sketch the bode plots. 3. a) Write the differential equations for the system pictured below. b) Put the equations in state variable form. c) Use mathcad to find the ratio between input and output voltages for a range of frequencies. The general method is put in a voltage such as Vi=1sin(___t), and see what the magnitude of the output is. Divide the magnitude of the output sine wave by the input magnitude. Note: This should act as a high pass or low pass filter. M B x F + - V i R 1 L C R 2 V o + - y'' y' 7y + + F = y 0 ( ) 1 = y' 0 ( ) 0 = F t ( ) 10 = t 0 > page 516 d) Plot a graph of gain against the frequency of the input. 4. Find the transfer functions for the systems below. a) Vi is the input and Vo is the output. b) Here the input is a torque, and the output is the angle of the second mass. 5. Develop a transfer function for the system below. The input is the force ‘F’ and the output is the voltage ‘Vo’. The mass is suspended by a spring and a damper. When the spring is undeflected y=0. The height is measured with an ultrasonic proximity sensor. When y = 0, the output - + R1 R2 C Vi Vo C=1uF R1=1K R2=1K R 1 R 2 C L V i V o + + - - τ B 1 B 2 J 1 J 2 K s1 K s2 θ 1 θ 2 page 517 Vo=0V. If y=20cm then Vo=2V and if y=-20cm then Vo=-2V. Neglect gravity. 6. Do the following conversions as indicated. a) K d K s M K s 10 N m ---- = K d 5N s m ---- = Ultrasonic y Proximity Sensor M 0.5Kg = F L 5e 4 – t 3t 2 + ( ) cos [ ] = a) b) c) d) e) L e 2t – 5t u t 2 – ( ) u t ( ) – ( ) + [ ] = L d dt ----- ¸ , ¸ _ 3 y 2 d dt ----- ¸ , ¸ _ y y + + = where at t=0 y 0 1 = y 0 ' 2 = y 0 '' 3 = y 0 ''' 4 = L 1 – 1 j + s 3 4j + + ----------------------- 1 j – s 3 4j – + ---------------------- + = L 1 – s 1 s 2 + ----------- 3 s 2 4s 40 + + ----------------------------- + + = L 5e 4 – t 3t 2 + ( ) cos [ ] L 2 A e αt – βt θ + ( ) cos [ ] = A s α βj – + ----------------------- A complex conjugate s α βj + + -------------------------------------- + 1.040 – 2.273j + s 4 3j – + --------------------------------------- 1.040 – 2.273j – s 4 3j + + --------------------------------------- + = A 2.5 = (ans. a) α 4 = β 3 = θ 2 = A 2.5 2 cos 2.5j 2 sin + 1.040 – 2.273j + = = page 518 L e 2t – 5t u t 2 – ( ) u t ( ) – ( ) + [ ] L e 2t – [ ] L 5tu t 2 – ( ) [ ] L 5tu t ( ) [ ] – + = (ans. b) 1 s 2 + ----------- 5L tu t 2 – ( ) [ ] 5 s 2 ---- – + 1 s 2 + ----------- 5L t 2 – ( )u t 2 – ( ) 2u t 2 – ( ) + [ ] 5 s 2 ---- – + = = 1 s 2 + ----------- 5L t 2 – ( )u t 2 – ( ) [ ] 10L u t 2 – ( ) [ ] 5 s 2 ---- – + + = 1 s 2 + ----------- 5e 2s – L t [ ] 10e 2s – L 1 [ ] 5 s 2 ---- – + + = 1 s 2 + ----------- 5e 2s – s 2 ------------ 10e 2s – s --------------- 5 s 2 ---- – + + = (ans. c) d dt ----- ¸ , ¸ _ 3 y s 3 y 1s 2 2s 1 3s 0 + + + = d dt ----- ¸ , ¸ _ y s 1 y s 0 1 + = L d dt ----- ¸ , ¸ _ 3 y 2 d dt ----- ¸ , ¸ _ y y + + s 3 y 1s 2 2s 3 + + + ( ) sy 1 + ( ) y ( ) + + = y s 3 s 1 + + ( ) s 2 2s 4 + + ( ) + = L 1 – 1 j + s 3 4j + + ----------------------- 1 j – s 3 4j – + ---------------------- + L 1 – A s α βj – + ----------------------- A complex conjugate s α βj + + ------------------------------------- - + = 2 A e αt – βt θ + ( ) cos 2.282e 3t – 4t π 4 --- – ¸ , ¸ _ cos = = (ans. d) A 1 2 1 2 + 1.141 = = θ 1 – 1 ------ ¸ , ¸ _ atan π 4 --- – = = α 3 = β 4 = L 1 – s 1 s 2 + ----------- 3 s 2 4s 40 + + ----------------------------- + + L s [ ] L 1 s 2 + ----------- L 3 s 2 4s 40 + + ----------------------------- + + = (ans. e) d dt -----δ t ( ) e 2t – L 3 s 2 + ( ) 2 36 + ------------------------------- + + d dt ---- -δ t ( ) e 2t – 0.5L 6 s 2 + ( ) 2 36 + ------------------------------- + + = = d dt ----- δ t ( ) e 2t – 0.5e 2t – 6t ( ) sin + + = page 519 7. Solve the following partial fractions by hand, and convert them back to functions of time. You may use your calculator to find roots of equations, and to verify the solutions. s 3 4s 2 4s 4 + + + s 3 4s + ---------------------------------------- a) s 2 4 + s 4 10s 3 35s 2 50s 24 + + + + ------------------------------------------------------------------- b) s 3 4s 2 4s 4 + + + s 3 4s + ---------------------------------------- (ans. a) s 3 4s 2 4s 4 + + + s 3 4s + s 3 4s + ( ) – 1 4s 2 4 + 1 4s 2 4 + s 3 4s + ----------------- + 1 A s --- Bs C + s 2 4 + ---------------- + + 1 s 2 A B + ( ) s C ( ) 4A ( ) + + s 3 4s + ----------------------------------------------------------- + = = = A 1 = C 0 = B 3 = 1 1 s --- 3s s 2 4 + -------------- + + = δ t ( ) 1 3 2t ( ) cos + + = s 2 4 + s 4 10s 3 35s 2 50s 24 + + + + ------------------------------------------------------------------- A s 1 + ----------- B s 2 + ----------- C s 3 + ----------- D s 4 + ----------- + + + = (ans. b) A s 2 4 + s 2 + ( ) s 3 + ( ) s 4 + ( ) -------------------------------------------------- ¸ , ¸ _ s 1 – → lim 5 6 --- = = B s 2 4 + s 1 + ( ) s 3 + ( ) s 4 + ( ) -------------------------------------------------- ¸ , ¸ _ s 2 – → lim 8 2 – ------ = = C s 2 4 + s 1 + ( ) s 2 + ( ) s 4 + ( ) -------------------------------------------------- ¸ , ¸ _ s 3 – → lim 13 2 ----- - = = D s 2 4 + s 1 + ( ) s 2 + ( ) s 3 + ( ) -------------------------------------------------- ¸ , ¸ _ s 4 – → lim 20 6 – ------ = = 5 6 --- e t – 4e 2t – – 13 2 ------ e 3t – 10 3 ----- - e 4t – – + page 520 20.10 REFERENCES Irwin, J.D., and Graf, E.R., Industrial Noise and Vibration Control, Prentice Hall Publishers, 1979. Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition, John Wiley and Sons, Inc., 1995. page 521 21. CONTROL SYSTEM ANALYSIS 21.1 INTRODUCTION 21.2 CONTROL SYSTEMS • Control systems use some output state of a system and a desired state to make control decisions. • In general we use negative feedback systems because, - they typically become more stable - they become less sensitive to variation in component values - it makes systems more immune to noise • Consider the system below, and how it is enhanced by the addition of a control system. Topics: Objectives: page 522 Figure 423 An example of a feedback controller Figure 424 Rules for a feedback controller INPUT (e.g. θgas) SYSTEM (e.g. a car) OUTPUT (e.g. velocity) Control variable v desired v error + _ Driver or cruise control car v actual θgas The control system is in the box and could be a driver or a cruise control (this type is known as a feedback control system) Human rules to control car (also like expert system/fuzzy logic): 1. If v error is not zero, and has been positive/negative for a while, increase/decrease θ gas 2. If v error is very big/small increase/decrease θ gas 3. If v error is near zero, keep θ gas the same 4. If v error suddenly becomes bigger/smaller, then increase/decrease θ gas . 5. etc. page 523 • Some of the things we do naturally (like the rules above) can be done with math- ematics 21.2.1 PID Control Systems • The basic equation for a PID controller is shown below. This function will try to compensate for error in a controlled system (the difference between desired and actual output values). Figure 425 The PID control equation • The figure below shows a basic PID controller in block diagram form. Figure 426 A block diagram of a feedback controller u K c e K i edt ∫ K d de dt ------ ¸ , ¸ _ + + = V V + - amp motor + + + proportional integral derivative K i e ∫ ( ) K p e ( ) K d d dt ----- e ¸ , ¸ _ PID Controller u e +V -V page 524 • The PID controller is the most common controller on the market. e.g. θ gas K c v error K i v error dt ∫ K d dv error dt ---------------- ¸ , ¸ _ + + = Rules 2 & 3 (general difference) Rule 1 (Long term error) Rule 4 (Immediate error) Kc Ki Kd Relative weights of components This is a PID Controller Proportional Integral Derivative θ gas K c v error K i v error dt ∫ + = θ gas K c v error = θ gas K c v error K d dv error dt ---------------- ¸ , ¸ _ + = For a PI Controller For a P Controller For a PD Controller page 525 21.2.2 Analysis of PID Controlled Systems With Laplace Transforms θ gas K c v error K i v error dt ∫ K d dv error dt ---------------- ¸ , ¸ _ + + = 1. We can rewrite the control equation as a ratio of output to input. θ gas v error ------------- K c K i dt ∫ K d d dt ----- ¸ , ¸ _ + + = Then do a Laplace transform d dt ----- s → dt ∫ 1 s --- = dx dt ------ sx → xdt ∫ x s -- = L θ gas v error ------------- K c K i s ----- K d s + + = The transfer function page 526 2. We can also develop a transfer function for the car. F Aθ gas 10θ gas = = F θ gas ---------- 10 = Transfer function for engine and transmission. (Laplace F Ma M d 2 x dt 2 -------- M dv dt ----- - = = = F v --- M d dt ----- = L v F --- 1 Ms ------- = transform would be the same as initial value.) Transfer function for acceleration of car mass 3. We want to draw the system model for the car. θ gas 10 F v actual 1 Ms ------- • The ‘system model’ is shown above. • If θ gas is specified directly, this is called ‘open loop control’. This is not desirable, but much simpler. • The two blocks above can be replaced with a single one. θ gas v actual 10 Ms ------- page 527 4. If we have an objective speed, and an actual speed, the difference is the ‘system error’ v error v desired v actual – = ‘set-point’ - desired system operating point 5. Finally, knowing the error is v error , and we can control θ gas (the control variable), we can select a control system. Controller v error θ gas L θ gas v error ------------- K c K i s ----- K d s + + = *The coefficients can be calculated using classical techniques, but they are more commonly approximated by trial and error. 6. For all the components we can now draw a ‘block diagram’ K c K i s ----- K d s + + 10 F θ gas v actual v desired v error + - • A ‘negative feedback loop that is the fundamental part of this ‘closed loop control system’ 1 Ms ------- page 528 21.2.3 Finding The System Response To An Input • Even though the transfer function uses the Laplace ‘s’, it is still a ratio of input to output. • Find an input in terms of the Laplace ‘s’ v desired 100 step ramp v desired (t) = 50t for t >= 0 sec v desired (t) = 100 for t >= 0 sec t(sec) 0 Input type Time function Laplace function STEP f t ( ) Au t ( ) = f s ( ) A s --- = RAMP f t ( ) Atu t ( ) = f s ( ) A s 2 ---- = SINUSOID f t ( ) A ωt ( )u t ( ) sin = f s ( ) Aω 2 s 2 ω 2 + ----------------- = etc...... PULSE f t ( ) A u t ( ) u t t 1 – ( ) – ( ) = f s ( ) = page 529 Therefore to continue the car example, lets assume the input below, v desired t ( ) 100 = t 0sec ≥ v desired s ( ) L v desired t ( ) [ ] 100 s --------- = = Next, lets use the input, and transfer function to find the output of the system. v actual v actual v desired ----------------- ¸ , ¸ _ v desired = v actual s 2 K d ( ) s K c ( ) K i + + s 2 M 10 ------ K + d ¸ , ¸ _ s K c ( ) K i + + ------------------------------------------------------------- ¸ , ¸ _ 100 s -------- - ¸ , ¸ _ = To go further, some numbers will be selected for the values. K d = 10000 K c = 10000 K i = 1000 M = 1000 v actual s 2 10000 ( ) s 10000 ( ) 1000 + + s 2 10100 ( ) s 10000 ( ) 1000 + + ------------------------------------------------------------------------ ¸ , ¸ _ 100 s -------- - ¸ , ¸ _ = page 530 At this point we have the output function, but not in terms of time yet. To do this we break up the function into partial fractions, and then find inverse Laplace transforms for each. v actual 10 2 s 2 s 0.1 + + s s 2 1.01 ( ) s 0.1 + + ( ) -------------------------------------------------- ¸ , ¸ _ = Aside: We must find the roots of the equation, before we can continue with the partial fraction expansion. recall the quadratic formula, ax 2 bx c + + 0 = x b – b 2 4ac – t 2a -------------------------------------- = x ∴ 1 – 1 2 4 1.01 ( ) 0.1 ( ) – t 2 1.01 ( ) ------------------------------------------------------------ 0.113 0.877 – , – = = v actual A s --- B s 0.114 + ---------------------- C s 0.795 + ---------------------- + + = v actual 10 2 1.01 ---------- s 2 s 0.1 + + s s 0.113 + ( )s 0.877 + ---------------------------------------------------- ¸ , ¸ _ = page 531 A s 10 2 1.01 ---------- s 2 s 0.1 + + s s 0.113 + ( ) s 0.877 + ( ) --------------------------------------------------------- ¸ , ¸ _ ¸ , ¸ _ s 0 → lim 10 2 1.01 ---------- 0.1 0.113 ( ) 0.877 ( ) ------------------------------------- ¸ , ¸ _ = = A ∴ 99.9 = B 10 2 1.01 ---------- s 2 s 0.1 + + s s 0.113 + ( ) s 0.877 + ( ) --------------------------------------------------------- ¸ , ¸ _ ¸ , ¸ _ s 0.113 + ( ) s 0.113 – → lim = B ∴ 10 2 1.01 ---------- 0.113 – ( ) 2 0.113 – ( ) 0.1 + + 0.113 – ( ) 0.113 – 0.877 + ( ) ----------------------------------------------------------------- ¸ , ¸ _ ¸ , ¸ _ 0.264 = = C 10 2 1.01 ---------- s 2 s 0.1 + + s s 0.113 + ( ) s 0.877 + ( ) --------------------------------------------------------- ¸ , ¸ _ ¸ , ¸ _ s 0.877 + ( ) s 0.877 – → lim = C ∴ 10 2 1.01 ---------- 0.877 – ( ) 2 0.877 – ( ) 0.1 + + 0.877 – ( ) 0.877 – 0.113 + ( ) ----------------------------------------------------------------- ¸ , ¸ _ ¸ , ¸ _ 1.16 – = = v actual 99.9 s ---------- 0.264 s 0.113 + ---------------------- 1.16 s 0.877 + ---------------------- – + = page 532 Next we use a list of forward/inverse transforms to replace the terms in the partial fraction expansion. f t ( ) f s ( ) A A s --- At A s 2 ---- Ae αt – A s α + ------------ A ωt ( ) sin Aω s 2 ω 2 + ----------------- e ξω n t – ω n t 1 ξ 2 – ( ) sin ω n 1 ξ 2 – s 2 2ξω n s ω n 2 + + ---------------------------------------- for ξ 1 < ( ) etc. To finish the problem, we simply convert each term of the partial fraction back to the time domain. v actual 99.9 0.264e 0.113t – 1.16e 0.877t – – + = v actual 99.9 s ---------- 0.264 s 0.113 + ---------------------- 1.16 s 0.877 + ---------------------- – + = page 533 21.2.4 Controller Transfer Functions • The table below is for typical control system types, 21.3 ROOT-LOCUS PLOTS • Consider the basic transform tables. A superficial examination will show that the denominator (bottom terms) are the main factor in determining the final form of the solu- tion. To explore this further, consider that the roots of the denominator directly impact the partial fraction expansion and the following inverse Laplace transfer. • When designing a controller with variable parameters (typically variable gain), we need to determine if any of the adjustable gains will lead to an unstable system. • Root locus plots allow us to determine instabilities (poles on the right hand side of the plane), overdamped systems (negative real roots) and oscillations (complex roots). Type Transfer Function Proportional (P) Proportional-Integral (PI) Proportional-Derivative (PD) Proportional-Integral-Derivative (PID) Lead Lag Lead-Lag G c K = G c K 1 1 τs ----- + ¸ , ¸ _ = G c K 1 τs + ( ) = G c K 1 1 τs ----- τs + + ¸ , ¸ _ = G c K 1 τ 1 s + 1 ατ 1 s + --------------------- ¸ , ¸ _ 1 ατ 2 s + 1 τ 2 s + --------------------- ¸ , ¸ _ = α 1 > G c K 1 τs + 1 ατs + ------------------ ¸ , ¸ _ = G c K 1 ατs + 1 τs + ------------------ ¸ , ¸ _ = α 1 > α 1 > τ 1 τ 2 > page 534 • Note: this procedure can take some time to do, but the results are very important when designing a control system. • Consider the example below, page 535 • Consider the previous example, the transfer function for the whole system was found, but then only the denominator was used to determine stability. So in general we do not need to find the transfer function for the whole system. 1 K 1 s --- + - G s ( ) K s ---- = H s ( ) 1 = Note: This controller has adjustable gain. After this design is built we must anticipate that all values of K will be used. It is our responsibility to make sure that none of the possible K values will lead to instability. First, we must develop a transfer function for the entire control system. G S s ( ) G s ( ) 1 G s ( )H s ( ) + --------------------------------- K s --- - ¸ , ¸ _ 1 K s ---- ¸ , ¸ _ 1 ( ) + --------------------------- K s K + ------------ = = = s K + 0 = K 0 1 2 3 etc.. root Next, we use the characteristic equation of the denominator to find the roots as the value of K varies. These can then be plotted on a complex plane. Note: the value of gain ’K’ is normally found from 0 to +infinity. σ jω K ∞ → K 0 = Note: because all of the roots for all values of K are real negative this system will always be stable, and it will always tend to have a damped response. The large the value of K, the more stable the system becomes. page 536 • Consider the example, G S s ( ) G s ( ) 1 G s ( )H s ( ) + --------------------------------- = Consider the general form for a negative feedback system. Note: two assumptions that are not often clearly stated are that we are assuming that the control system is a negative feedback controller, and that when not given the feedback gain is 1. 1 G s ( )H s ( ) + 0 = The system response is a function of the denominator, and it’s roots. It is typical, (especially in textbook problems) to be given only G(s) or G(s)H(s). G s ( )H s ( ) K s z 0 + ( ) s z 1 + ( )… s z m + ( ) s p 0 + ( ) s p 1 + ( )… s p n + ( ) ------------------------------------------------------------------- = The transfer function values will often be supplied in a pole zero form. page 537 21.3.1 Approximate Plotting Techniques • The basic procedure for creating root locus plots is, 1. write the characteristic equation. This includes writing the poles and zeros of the G s ( ) K s 2 3s 2 + + -------------------------- = H s ( ) 1 = First, find the characteristic equation,. and an equation for the roots, Given the system elements (you should assume negative feedback), 1 K s 2 3s 2 + + -------------------------- ¸ , ¸ _ 1 ( ) + 0 = s 2 3s 2 K + + + 0 = roots 3 – 9 4 2 K + ( ) – t 2 ------------------------------------------------ 1.5 – 1 4K – 2 -------------------- t = = Next, find values for the roots and plot the values, K 0 1 2 3 root 0 -1 -2 -3 σ jω ******CALCULATE AND PUT IN NUMBERS page 538 equation. 2. count the number of poles and zeros. The difference (n-m) will indicate how many root loci lines end at infinity (used later). 3. plot the root loci that lie on the real axis. Points will be on a root locus line if they have an odd number of poles and zeros to the right. Draw these lines in. 4. determine the asymptotes for the loci that go to infinity using the formula below. Next, determine where the asymptotes intersect the real axis using the second formula. Finally, draw the asymptotes on the graph. 5. the breakaway and breakin points are found next. Breakaway points exist between two poles on the real axis. Breakin points exist between zeros. to cal- culate these the following polynomial must be solved. The resulting roots are the breakin/breakout points. 6. Find the points where the loci lines intersect the imaginary axis. To do this sub- stitute the fourier frequency for the laplace variable, and solve for the frequen- cies. Plot the asymptotic curves to pass through the imaginary axis at this point. • Consider the example in the previous section, 1 G s ( )H s ( ) + 1 K s z 1 + ( ) s z 2 + ( )… s z m + ( ) s p 1 + ( ) s p 2 + ( )… s p n + ( ) ---------------------------------------------------------------- + 0 = = β k ( ) 180° 2k 1 + ( ) t n m – ----------------------------------- = k 0 n m – 1 – , [ ] ∈ σ p 1 p 2 … p n + + + ( ) z 1 z 2 … z m + + + ( ) n m – -------------------------------------------------------------------------------------------- = d ds -----A ¸ , ¸ _ B A d ds -----B ¸ , ¸ _ – 0 = B s z 1 + ( ) s z 2 + ( )… s z m + ( ) = A s p 1 + ( ) s p 2 + ( )… s p n + ( ) = 1 K jω z 1 + ( ) jω z 2 + ( )… jω z m + ( ) jω p 1 + ( ) jω p 2 + ( )… jω p n + ( ) --------------------------------------------------------------------------- + 0 = page 539 G s ( ) K s 2 3s 2 + + -------------------------- = H s ( ) 1 = Step 1: (put equation in standard form) Given the system elements (you should assume negative feedback), 1 G s ( )H s ( ) + 1 K s 2 3s 2 + + -------------------------- ¸ , ¸ _ 1 ( ) + 1 K 1 s 1 + ( ) s 2 + ( ) --------------------------------- + = = Step 2: (find loci ending at infinity) m 0 = n 2 = n m – 2 = (from the poles and zeros of the previous step) (loci end at infinity) Step 3: (plot roots) σ jω -1 -2 Step 4: (find asymptotes angles and real axis intersection) β k ( ) 180° 2k 1 + ( ) 2 -------------------------------- = k I 0 1 , [ ] ∈ β 0 ( ) 180° 2 0 ( ) 1 + ( ) 2 ------------------------------------- 90° = = β 1 ( ) 180° 2 1 ( ) 1 + ( ) 2 ------------------------------------- 270° = = σ 0 ( ) 1 – 2 – ( ) 2 ----------------------------- 0 = = σ jω -1 -2 asymptotes page 540 • Plot the root locus diagram for the function below, Step 5: (find the breakout points for the roots) B s 2 3s 2 + + = d ds ----- B 2s 3 + = A 1 = d ds ----- A 0 = A d ds -----B ¸ , ¸ _ B d ds -----A ¸ , ¸ _ – 0 = 1 2s 3 + ( ) s 2 3s 2 + + ( ) 0 ( ) – 0 = 2s 3 + 0 = s 1.5 – = σ jω -1 -2 -1.5 Note: because the loci do not intersect the imaginary axis, we know the system will be stable, so step 6 is not necessary, but we it will be done for illustrative purposes. Step 6: (find the imaginary intercepts) 1 G s ( )H s ( ) + 0 = 1 K 1 s 2 3s 2 + + -------------------------- + 0 = s 2 3s 2 K + + + 0 = jω ( ) 2 3 jω ( ) 2 K + + + 0 = ω – 2 3jω 2 K + + + 0 = ω 3j 3j – ( ) 2 4 2 – K – ( ) – t 2 -------------------------------------------------------------- 3j 9 – 8 4K + + t 2 ---------------------------------------------- 3j 4K 1 – t 2 ------------------------------- = = = ω 2 ω 3j – ( ) 2 – K – ( ) + + 0 = In this case the frequency has an imaginary value. This means that there will be no frequency that will intercept the imaginary axis. page 541 21.4 DESIGN OF CONTINUOUS CONTROLLERS 21.5 SUMMARY • G s ( )H s ( ) K s 5 + ( ) s s 2 4s 8 + + ( ) --------------------------------- = page 542 21.6 PRACTICE PROBLEMS 3. Given the transfer function below, and the input ‘x(s)’, find the output ‘y(t)’ as a function of time. 8. Draw a detailed root locus diagram for the transfer function below. Be careful to specify angles of departure, ranges for breakout/breakin points, and gains and frequency at stability limits. 10. Draw the root locus diagram for the transfer function below, 11. Draw the root locus diagram for the transfer function below, 12. The block diagram below is for a motor position control system. The system has a propor- tional controller with a variable gain K. a) Simplify the block diagram to a single transfer function. b) Draw the Root-Locus diagram for the system (as K varies). Use either the approximate or exact techniques. y s ( ) x s ( ) ---------- 5 s 2 + ----------- = x t ( ) 5 = t 0sec ≥ G s ( ) 2K s 0.5 + ( ) s 2 2s 2 + + ( ) s 3 s 1 + ( ) s 2 + ( ) ------------------------------------------------------------ = G s ( ) K s 4 + ( ) 2 s 2 s 1 + ( ) ----------------------- = G s ( ) K s 1 + ( ) s 2 + ( ) s 3 ------------------------------------- = 1 s --- K + - 2 2 100 s 2 + ----------- θ d θ a V d V a V e V s ω ans. 200K s 2 2s 200K + + ------------------------------------ page 543 c) Select a K value that will result in an overall damping coefficient of 1. State if the Root-Locus diagram shows that the system is stable for the chosen K. 13. Draw a Bode Plot for either one of the two transfer functions below. 15. Given the system transfer function below. a) Draw the root locus diagram and state what values of K are acceptable. b) Select a gain value for K that has either a damping factor of 0.707 or a natural frequency of 3 rad/sec. c) Given a gain of K=10 find the steady state response to an input step of 1 rad. d) Given a gain of K=10 find the response of the system as 17. The equation below describes a dynamic system. The input is ‘F’ and the output is ‘V’. It has the initial values specified. The following questions ask you to find the system response to a ans. roots 2 – 4 4 200K ( ) – t 2 ------------------------------------------------ 1 – 1 200K – t = = K 0 0 r o o ts 0 -1 -2 K=0.005 Re Im (ans. s 2 2s 200K + + s 2 2ζω n s ω n 2 + + = ω n ∴ 1 = K ∴ 0.005 = From the root locus graph this value is critically stable. s 1 + ( ) s 1000 + ( ) s 100 + ( ) 2 ------------------------------------------ 5 s 2 ---- OR θ o θ d ----- 20K s 2 s 20K + + ------------------------------ = page 544 unit step input using various techniques. a) Find the response using Laplace transforms. b) Find the response using the homogenous and particular solutions. c) Put the equation is state variable form, and solve it using your calculator. Sketch the result accurately below. 18. A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer function is given. a) Verify the close loop controller function given. b) Draw a root locus plot for the controller if Kp=1 and Ki=1. Identify any values of Kd that would leave the system unstable. c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1. d) Select controller values that will result in a natural frequency of 2 rad/sec and damping coefficient of 0.5. Verify that the controller will be stable. e) For the parameters found in the last step find the initial and final values. f) If the values of Kd=1 and Ki=Kd=0, find the response to a ramp input as a func- tion of time. 19. The following system is a feedback controller for an elevator. It uses a desired heigh ‘d’ pro- vided by a user, and the actual height of the elevator ‘h’. The difference between these two is called the error ‘e’. The PID controller will examine the value ‘e’ and then control the speed of the lift motor with a control voltage ‘c’. The elevator and controller are described with transfer functions, as shown below. all of these equations can be combined into a single system transfer V'' 10V' 20V + + 20F – = V 0 ( ) 1 = V' 0 ( ) 2 = K p K i s ----- K d s + + 3 s 9 + ----------- 4 + - X Y Y X --- s 2 3K d ( ) s 3K p ( ) 3K i ( ) + + s 2 4 3K d + ( ) s 36 3K p + ( ) 3K i ( ) + + ------------------------------------------------------------------------------------- = page 545 equation as shown. a) Find the response of the final equation to a step input. The system starts at rest on the ground floor, and the input (desired height) changes to 20 as a step input. b) Write find the damping coefficient and natural frequency of the results in part a). c) verify the solution using the initial and final value theorems. e d h – = c e -- K p K i s ----- K d s + + 2s 1 s 2 + + s -------------------------- = = h c -- - 10 s 2 s + ------------- = PID controller elevator c e -- ¸ , ¸ _ h c --- ¸ , ¸ _ h e --- 2s 1 s 2 + + s -------------------------- 10 s 2 s + ------------- s 1 + ( ) 2 s ------------------- 10 s s 1 + ( ) ------------------- 10 s 1 + ( ) s 2 ---------------------- = = = = error h d h – ----------- - 10 s 1 + ( ) s 2 ---------------------- = h 10 s 1 + ( ) s 2 ---------------------- ¸ , ¸ _ d h – ( ) = h 1 10 s 1 + ( ) s 2 ---------------------- + ¸ , ¸ _ 10 s 1 + ( ) s 2 ---------------------- ¸ , ¸ _ d ( ) = h d --- 10 s 1 + ( ) s 2 ---------------------- 1 10 s 1 + ( ) s 2 ---------------------- + -------------------------------- ¸ , ¸ _ 10s 10 + s 2 10s 10 + + -------------------------------- = = combine the transfer functions eliminate ‘e’ system transfer function page 546 h d --- 10s 10 + s 2 10s 10 + + -------------------------------- = (ans. a) d t ( ) 20u t ( ) = d s ( ) 20 s ------ = h 10s 10 + s 2 10s 10 + + -------------------------------- ¸ , ¸ _ 20 s ------ A s --- B s 5 3.873j – + --------------------------------- C s 5 3.873j + + --------------------------------- + + = = A 200s 200 + s 2 10s 10 + + -------------------------------- ¸ , ¸ _ s 0 → lim 20 = = B 200s 200 + s s 5 3.873j + + ( ) ----------------------------------------- ¸ , ¸ _ s 5 – 3.873j + → lim 2.5 – 22.6j – = = C 2.5 – 22.6j + = h t ( ) 20 L 1 – 2.5 – 22.6j – s 5 3.873j – + --------------------------------- 2.5 – 22.6j + s 5 3.873j + + --------------------------------- + + = h t ( ) 20 2 22.73 ( )e 5t – 3.873t 4.602 + ( ) cos + = A 2.5 2 22.6 2 + 22.73 = = θ 4.602 = α 5 = β 3.873 = b) 5 – ω n ζ – = 3.873 1 ζ 2 – ω n 1 25 ω n 2 ------ – ω n = = ζ 5 ω n ------ = 15 1 25 ω n 2 ------ – ¸ , ¸ _ ω n 2 ω n 2 25 – = = ω n 35 5.916 = = ζ 5 35 ---------- 0.845 = = c) h 0 ( ) s 10s 10 + s 2 10s 10 + + -------------------------------- ¸ , ¸ _ 20 s ----- - s ∞ → lim 10s s 2 -------- ¸ , ¸ _ 20 s ∞ → lim 0 = = = h ∞ ( ) s 10s 10 + s 2 10s 10 + + -------------------------------- ¸ , ¸ _ 20 s ----- - s 0 → lim 10 ( )20 10 ----------------- 20 = = = page 547 22. LABORATORY GUIDE • The laboratory work will help enforce the concepts presented in this and previous courses. • Various labs will require pre- or post-lab work. • General rules include: - Unless specified, work is to be done individually. - All written work is to be clear and accurate. 22.1 Lab 1 - Introduction to Resources and Tutorials • These tutorials prepare you to use computer and other resources throughout the semester. 22.1.1 Tutorial 1a - Creating Web Pages • The general steps are: 1. Get a computer account on ‘claymore.engineer.gvsu.edu’ from Prof. Jack. This account will have a prototype web page that you can edit. 2. Go to a laboratory (EC 616), or home computer and run ‘Netscape Communica- tor’. Go to ‘claymore.engineer.gvsu.edu’ and look for your account under ‘stu- dents’. You should be able to find a page that starts with ‘YOUR_NAME_GOES_HERE’. 3. In Netscape (with your home page showing), select ‘edit’ from the tool bar, or under ‘file’ select ‘edit’ or ‘edit page’. You will be asked if you want to save the page. Create a ‘temp’ directory on the computer. This directory will be used to temporarily hold your web page files. Make sure that the files will be saved in the ‘temp’ directory, and then ‘save’ the files. An editor will start on the screen. 5. The editor behaves much like Microsoft Word, with some subtle differences. At this point add your name, and change your email address to your river account. You can change your email address by clicking on the email link, and then clicking on the chain link near the top of the screen. 6. To upload the changes you have made to the website, select ‘publish’. You will need to indicate the file name as ‘index.html’, the destination as ‘ftp://clay- more.engineer.gvsu.edu/home/YOUR_NAME/public_html’. You will also page 548 need to enter your user name and your password (DO NOT SAVE THE PASS- WORD - SOMEBODY ELSE CAN GET ACCESS TO YOUR ACCOUNT). You should see a message that indicates files have been uploaded successfully. 7. Use Netscape, not the editor, to see if the changes have occurred. Your changes may not show up on the browser. This is because Netscape does not reload pages every time to look at them. Pages are often stored for up to 1 month on the PCs hard drive, and reused when you look at them. There are two ways to update the screen before this time limit - click on the reload button. 8. Next we will add links to your home page. First, run Mathcad, and create a sim- ple file, and then save it in the same folder/directory you saved. Use a file name that is all lower case such as ‘test.mcd’ - any upper case letters cause problems in Windows 95. 9. Get your home page back in the Netscape editor. Someplace type the word ‘GVSU’. Use the mouse to select what you just typed, and then click on the link button. For the link name enter ‘http://www.gvsu.edu’, and apply the change. This will now be a link to the Grand Valley home page. For your Mathcad file type something like ‘Mathcad file’, highlight it, and add a link to ‘test.mcd’. This link will connect to your Mathcad file. 10. Publish the file, but first add the Mathcad file to the list of files at the bottom of the screen. 11. Test the page. • Some tips are, - Windows will not allow multiple applications to open the same file at the same time. If you seem to be having trouble opening a file, make sure it is not open in another application. - As you add other files to your homepage, put them in the ‘temp’ directory. This will make all of the procedures simpler. - Try to make your web pages small, and link them together. This will decrease download time and make browsers happier. - Avoid using excessive images. Anything over 10K will make it very slow down- loading over modem. Anything over 100K makes modem downloading pain- fully slow. - When putting images on the web page use ‘jpg’ for photographic images, and ‘gif’ for line images. ‘jpg’ images can be compressed more than ‘gif’, but lines will become blurred. - To link to other files or web pages there will be a ‘link’ command. If you want to add a file that is in your ‘temp’ directory, just put the name of the file in the ‘URL’ field. - Watch upper/lower case. This is a major cause of web page problems. It is best to keep to lower case for all file names. page 549 22.1.2 Tutorial 1b - Introduction to Mathcad, Working Model 2D and The Internet • Objective: Working Model 2D, Mathcad and the Internet will be used in this course. In some cases students have not been exposed to one or more of these software packages in the past. This session will be used as a refresher for those with little prior exposure, and as a tutorial for those with no experience. • Theory: Mathcad is a software package that allows us to do complex calculations both numerically and symbolically. To learn it initially will require a time invest- ment. But, when doing calculations later, it will save a significant amount of time and reduce calculation errors. Working Model 2D is a software package that allows us to set up systems of multi- ple rigid bodies. We can then apply forces, moments, etc. and then see how the system dynamics are effected. In comparison, Mathcad will allow longer, pre- cise calculations, whereas Working Model allows faster results with reduced accuracy. Working Model also presents a visual simulation - this allows a more intuitive understanding of a dynamic system. The Internet is a huge collection of computers providing information and connec- tion on an unprecedented scale. It has become a standard business tool, and con- tinues to evolve. • Procedure 1. (If needed) Go over the Mathcad tutorial provided. 2. Use Mathcad to calculate the position of a ball that has been held then released just above the surface of the earth, and add the file to your home page. 3. (If needed) Go over the Working Model tutorial provided. 4. Repeat the problem solved in Mathcad with Working Model and add the file to your home page. 5. (If needed) Get a computer account set up, and create a home page. 6. Go to a search engine and find a website for a major business that is related to your co-op position and add a link to it on your home page. Explain how the business is related to your co-op position. • Post-lab: None page 550 • Submit: 1. A Mathcad file linked to your home page. 2. A Working Model file linked to your home page. 3. An explanation and a link to a company on your home page. 22.1.3 Presentation 1a - Introduction to Library Searches • Objective: To prepare students to use the libraries resources in typical research studies. • Theory: The essential purpose of engineering is to apply principles of the arts and sciences to solve real problems. Scientific principles tend to evolve over time, but the essential principles and written works are valid for a number of decades or cen- turies. As a result, books can be excellent resources for this knowledge. The applications that make use of the basic principles tend to be more revolutionary. As a result, printed books have a value for teaching the fundamentals, but the ’state of the art’ must often be found in magazines, journals, etc. To put this in simpler terms, when we look for scientific resources, we will often use sources over a decade old. When using engineering resources, most will be less than five years old. Until recently, print has been the major means of exchanging information, and libraries have been the traditional repositories of printed mate- rials. To deal with the extensive number of publications available in a library, we need to learn how to search for needed information, and what resources are available. New technology has changed access to library materials. Libraries pool resources and share materials. Internet technology has also helped increase accessibility. In particular internet tools allow the entire library catalog to be examined with- out visiting the library. There are also a number of resources that can be searched and retrieved over the internet. • Procedure 1. A presentation will be made by Mr. Lee Lebin, the University Library Director. 2. Use the library resources to identify an application of systems modeling. • Post-lab: page 551 1. Search for library resource. • Submit: 1. A copy of the material referenced. 22.2 Lab 2 - Computer Based Data Collection 22.2.1 Prelab 2a - Tutorial for LabVIEW Programming Objective: To learn the basic use of LabVIEW. Theory: To obtain the greatest computing power and flexibility we need to write computer programs. But, traditional programming languages are not well suited to designing user interfaces and dealing with data flows. Most computer programs are written with lines of program and compiled to exe- cute. LabVIEW allows you to “write” programs using graphical symbols. This graphical programming approach allows systems to be designed by connecting the symbols with "wires" (i.e., lines). Equipment: PC with LabVIEW software Procedure: 1. Go through the LabVIEW QuickStart Guide provided in the laboratory. This will also be good review for those who have used LabVIEW in previous courses. 2. Write a Labview program that will count from 1 to 100, square the values, and print the results on a strip chart. Marking: page 552 1. The VI created should be posted to the web. 22.2.2 Prelab 2b - Overview of Labview and the DAQ Cards • To obtain the greatest computing power and flexibility we need to write computer programs. But, traditional programming languages are not well suited to designing user interfaces and dealing with data flows. • LabVIEW allows you to “write” programs using graphical symbols. This graphi- cal programming approach allows systems to be designed by connecting the symbols with "wires" (i.e., lines). • The remainder of the labs will focus on using LabVIEW to write programs to allow a computer to interact with the environment outside the computer. • The computers we will use all have DAQ (Data AcQuisition) boards - National Instruments PCI-1200 DAQ cards. These cards have capabilities that include: 24 I/O bits - TTL 0,5VDC, 20mA max. 8 single ended or 4 double ended analog inputs - 12 bits 3 counters - 16 bits 2 analog outputs - 12 bits • The connector for the card can be found on the back of the computer. It will have a connector with pinouts like the one shown below. A ribbon cable will be used to make electrical connection to the connector in the back of the computer. page 553 NOTE: LABVIEW MANUALS ARE AVAILABLE ON-LINE, AND CAN BE FOUND ON THE COURSE HOME PAGE - LEAVE THE PAPER MANUALS IN THE LAB. 22.2.3 Experiment 2 - Introduction to LabVIEW and the DAQ Cards Objective: A C H 0 A C H 2 A C H 4 A C H 6 A I S E N S E / A I G N D A G N D D G N D P A 1 P A 3 P A 5 P A 7 P B 1 P B 3 P B 5 P B 7 P C 1 P C 3 P C 5 P C 7 E X T U P D A T E O U T B 1 O U T B 2 C L K B 1 G A T B 2 + 5 V A C H 1 A C H 3 A C H 5 A C H 7 D A C 0 O U T D A C 1 O U T P A 0 P A 2 P A 4 P A 6 P B 0 P B 2 P B 4 P B 6 P C 0 P C 2 P C 4 P C 6 E X T T R I G E X T C O N V G A T B 0 G A T B 1 O U T B 2 C L K B 2 D G N D 1 3 5 7 9 1 1 1 3 1 5 1 7 1 9 2 1 2 3 2 5 2 7 2 9 3 1 3 3 3 5 3 7 3 9 4 1 4 3 4 5 4 7 4 9 2 4 6 8 1 0 1 2 1 4 1 6 1 8 2 0 2 2 2 4 2 6 2 8 3 0 3 2 3 4 3 6 3 8 4 0 4 2 4 4 4 6 4 8 5 0 LEGEND: Analog inputs - ACHx Analog input ground - AISENSE/AIGND Analog outputs - DACxOUT Analog output ground - AGND Digital inputs and outputs - PAx, PBx, PCx Digital input/output ground - DGND Control handshaking - EXTTRIG, EXTUPDATE, EXTCONV Counter inputs/outputs - OUTBx, GATBx, CLKBx pin 1 Looking at the connector (on the back of the computer) page 554 Learn to use computers equipped for A/D and digital inputs. Theory: The computer reads data at discrete points in time (like a strobe light). We can read the data into the computer and then do calculations with it. To read the data into a computer we write programs, and use "canned" software to help with the task. LabVIEW allows us to write programs for data collection, but instead of typing instructions we draw function blocks and connect them. How we connect them determines how the data (numbers) flow. The functions are things like data reads and calculations. In this lab we will be using Labview to connect to a data acquisition (DAQ) board in the computer. This will allow us to collect data from the world outside the computer, and make changes to the world outside with outputs. When interfacing to the card using a program such as Labview, there must be ways to address or request information for a specific input or output (recall memory addresses in EGR226). The first important piece of information is the board number. There can be multiple DAQ boards installed in the computer. In our case there is only one, and it is designated device ’1’. There are also many inputs and outputs available on the card. For analog outputs there are two chan- nels so we need to specify which one when using the output with 0 or 1. For analog inputs there are 8 channels, and as before, we must specify which one we plan to read from using 0 to 7. For digital I/O there are a total of 24 pin dis- tributed across 3 ports (1 byte each). Therefore when connecting inputs and out- put we must specify the port (PA=0, PB=1, PC=2) and the channel from 0 to 7. Note is that we can make the ports inputs or outputs, but not mixed - in other words we must pick whether a port will only be used for inputs or for outputs. The voltage levels for the inputs and outputs are important, and you will need to be aware of these. For the digital outputs they will only ever be 0V or 5V. But the analog inputs and outputs will vary from -5V to 5V. This is build into the board. If we exceed these voltage limits by a few volts on the inputs, the boards have built in protection and should be undamaged. If we exceed the input voltages significantly, there is a potential to permanently damage the board. Equipment: PC with LabVIEW software and PCI-1200 DAQ card Interface cable PLC trainer boards Signal generator Digital multimeter Procedure: page 555 1. Go through the LabVIEW QuickStart Guide provided in the laboratory. This will also be good review for those who have used LabVIEW in previous courses. 2. Enter the LabVIEW program (layout) schematically shown below and connect a signal generator to the analog input (ACH0). (Note: there is a pin diagram for the connector in the Labview tutorial section.) Start the signal generator with a low frequency sinusoidal wave. Use the ‘DAQ Configure’ software to test the circuitry and verify that your hardware is operational. Then run your Labview program. Record the observations seen on the screen. 2b. Use a stop watch to determine the average number of samples per second. Run additional programs such as browsers, spreadsheets, etc. and see how this affects the data colection speed. 3. Connect the multimeter as shown below. Test the circuit using the ‘DAQ Con- figure’ utility. Enter the LabVIEW program schematically illustrated below and then run it. You should be able to control the output voltage from the screen using the mouse. Record your observations. ACH0 AIGND Front Panel Wiring Diagram waveform chart + com signal generator 1 0 single analog in SGL page 556 4. Connect the digital input and output circuits to the DAQ card and use the test panel to test the circuits. To do this, run the ‘DAQ Configure’ utility, double click on the ‘PCI-1200’, run the test panel window and ensure that the inputs and outputs are working correctly. Create the LabVIEW screen schematically illustrated below. This should allow you to scan an input switch and set an out- put light. When done, quit the program and run your LabVIEW program. DAC0OUT AGND User Display Diagram + com multimeter input knob output meter DBL DBL 1 0 single analog out page 557 Marking: 1. A laboratory report should be written, including observations, and posted to the web. 2. The programs (VIs) that use the DAQ card should be posted to the web. 22.3 Lab 3 - Sensors and More Labview 22.3.1 Prelab 3 - Sensors Theory: Sensors allow us to convert physical phenomenon to measurable signals, normally voltage or current. These tend to fall into one of two categories, discrete or con- tinuous. Discrete sensors will only switch on or off. Examples of these include, Inductive Proximity Sensors - use magnetic fields to detect presence of +5V PA0 DGND 100K 2K PB0 DGND Front Panel Diagram toggle light/led 1 1 T / F single line 0 1 0 single line 0 T / F switch input LED output write read page 558 metals Capacitive Proximity Sensors - use capacitance to detect most objects Optical Proximity Sensors - use light to detect presence Contact Switches - require physical contact Continuous sensors output values over a range. Examples of these are, Potentiometers - provide a resistance proportional to an angle or displace- ment Ultrasonic range sensors - provides a voltage output proportional to dis- tance Strain Gauges - their resistance changes as they are stretched Accelerometers - output a voltage proportional to acceleration Thermocouples - output small voltages proportional to temperature In both cases these sensors will have ranges of operation, maximum/minimum res- olutions and sensitivities. Prelab: 1. Prepare a Mathcad sheet to relate sensor outputs to the physical phenomenon they are measuring. 22.3.2 Experiment 3 - Measurement of Sensor Properties Objective: To investigate popular industrial and laboratory sensors. Procedure: 1. Sensors will be set up in the laboratory at multiple stations. You and your team should circulate to each station and collect results as needed. Instructions will be provided at each station to clarify the setup. The stations might include, - a mass on a spring will be made to oscillate. The mass will be observe by measuring position and acceleration. - a signal generator with an oscilloscope to read voltages phenomenon observe should include sampling rates and clipping. 2. Enter the data into Mathcad and develop a graph for each of the sensors relating input and output. Submit: page 559 1. A full laboratory report with graphs and mathematical functions for each sensor. 22.4 Lab 4 - Motors • This set of labs will examine devices that have multiple phenomenon occurring. 22.4.1 Prelab 4a - Permanent Magnet DC Motors • Theory: DC motors will apply a torque between the rotor and stator that is related to the applied voltage or current. When a voltage is applied the torque will cause the rotor to accelerate. For any voltage and load on the motor there will tend to be a final angular velocity due to friction and drag in the motor. And, for a given voltage the ratio between steady-state torque and speed will be a straight line. The basic equivalent circuit model for the motor is shown below. We can develop equations for this model. This model must also include the rotational inertia of the rotor and any attached loads. On the left hand side is the resistance of the motor and the ’back emf’ dependent voltage source. On the right hand side the inertia components are shown. The rotational inertia J1 is the motor rotor, and the second inertia is an attached disk. ω T voltage/current increases page 560 The model can now be considered as a complete system. Looking at this relationship we see a basic first-order differential equation. We can measure motor properties using some basic measurements. • Prelab: 1. Integrate the differential equation to find an explicit function of speed as a func- tion of time. + - R Voltage + - Supply J 2 J 1 I Vs T ω , V m Next, consider the power in the motor, P V m I Tω KIω = = = Because a motor is basically wires in a magnetic field, the electron flow (current) in the wire will push against the magnetic field. And the torque (force) generated will be proportional to the current. T KI = V m ∴ Kω = M ∑ T J M d dt ----- ¸ , ¸ _ ω = = Consider the dynamics of the rotating masses by summing moments. T ∴ J M d dt ---- - ¸ , ¸ _ ω = I ∴ T K --- - = The current-voltage relationship for the left hand side of the equation can be writ- ten and manipulated to relate voltage and angular velocity. I V s V m – R ------------------ = T K ---- ∴ V s Kω – R -------------------- = J M d dt ----- ¸ , ¸ _ ω K ---------------------- ∴ V s Kω – R -------------------- = d dt ----- ¸ , ¸ _ ω ω K 2 J M R ---------- ¸ , ¸ _ + ∴ V s K J M R ---------- ¸ , ¸ _ = XXXXXXAdd friction to the model page 561 2. Develop a Mathcad document that will accept values for time constant, supplied voltage and steady-state speed and calculate the coefficients in the differential equation for the motor. 3. In the same Mathcad sheet add a calculation that will accept the motor resistance and calculate values for K and J. 4. Get the data sheets for an LM675 from the web (www.national.com). 22.4.2 Experiment 4a - Modeling of a DC Motor • Objective: To investigate a permanent magnet DC motor with the intention of determining a descriptive equation. • Procedure 1. With the motor disconnected from all other parts of the circuit, measure the resistance across the motor terminals. 2. Connect the motor amplifier, motor and computer as shown in the figure below. 3. Write a Labview program that will output an analog voltage to drive the motor amplifier. An analog input will be used to measure the motor speed from the tachometer. tachometer Computer amplifier motor feedback signal D/A output (Vo) A/D input (Vi) (a small DC motor) (use an LM675 op-amp) Note: The motor being tested is the large motor. The small motor will be driven and act as a generator. In this case we will refer to it as a tachometer. page 562 4. Use a strobe light to find the relationship between the tachometer voltage and the angular speed. 5. Obtain velocity curves for the motor with different voltage step functions. 6. Use a fish scale and a lever arm to determine the torque when the motor is stalled with an input voltage. • Post-lab: 1. Determine the values of K for the motor. Determine the J for the rotor, and cal- culate J values for different load masses added. 2. Use the values of R, J and K to compare theoretical to the actual motor response curves found in procedure step #5. 3. Use the values of R, J and K to determine what the stalled torque should be in procedure step #6. Compare this to the actual. 4. Find the time constant of the unloaded motor. • Submit: 1. All work and results. 22.5 Lab 5 - Basic Control Systems 22.5.1 Prelab 6a - Servomotor Proportional Control Systems Theory: DC servomotors typically have a first-order (velocity) response as found in the previous lab. We can develop a simple control technique for control of the velocity using the equation below. For this form of control, we need to specify a desired velocity (or position) by setting a value ’Vd’. The difference between the desired speed and actual speed is calculated (Vd-Vi). This will give a voltage difference between the two values. This difference is multiplied by a constant ’K’. The value of ’K’ will determine how the system responds. d dt ----- ¸ , ¸ _ ω ω K 2 JR ------ ¸ , ¸ _ + V s K JR ------ ¸ , ¸ _ = page 563 The basic controller is set up as shown in the figure below. We can use a Labview program to implement the basic control equation described above. The system below shows the components in the laboratory. The power supply may need to be constructed using two power supplies connected together. The ana- log output from the computer must be amplified (the computer can only output about 20mA maximum). The amplifier is constructed with an LM675 high cur- rent op-amp. The amplifier drives the large DC motor, which in turn drives a small DC motor being used as a tachometer. The voltage from the tachometer is input into the computer to determine the speed. A Labview program will sub- tract the tachometer voltage from the desired tachometer voltage, multiply the difference by a gain constant, and output the result to drive the motor. Vo P Vd Vi – ( ) = where, Vo Voltage to motor amplifier to control speed = Vi Voltage from tachometer to measure speed or position = Vd Desired motor speed voltage (user input) = P Controller gain = tachometer Computer amplifier motor feedback signal D/A output (Vo) A/D input (Vi) or potentiometer page 564 Prelab: 1. Develop a Mathcad document that will model the velocity feedback controller given, motor parameters, desired velocity, an inertial load, and a gain constant. This is to be solved two different ways i) with Runge-Kutta integration, ii) inte- gration of differential equations. 2. Test the controller model using a step function. 22.5.2 Experiment 5a - Servomotor Proportional Control Systems Objective: To investigate simple proportional servo motor control. Procedure 1. Construct the equipment described in the 2. Apply a step function input and record the response. 3. For several values of proportional gain ’P’, measure the response curves of the motor to a step function. Post-lab: Computer with Labview analog analog Amp input output power supply V+ COM V- page 565 1. Compare the theoretical and actual response curves on the same graphs. 2. Find and compare the time constants for experimental and theoretical results. Submit: 1. All work and results. 22.6 Lab 6 - Basic System Components 22.6.1 Prelab 6a - Mechanical Components • Theory: Recall that for a rigid body we can sum forces. If the body is static (not moving), these forces and moments are equal to zero. If there is motion/acceleration, we use d’Alembert’s equations for linear motion and rotation. If we have a system that is comprised of a spring connected to a mass, it will oscil- late. If the system also has a damper, it will tend to return to rest (static) as the damper dissipates energy. Recall that springs ideally follow Hooke’s law. We can find the value of the spring constant by stretching the spring and measuring the forces at different points or we can apply forces and measure the displace- ments. M ∑ Jα = F ∑ Ma = page 566 In many cases we will get springs and devices that are preloaded. Both of the devices used in this lab have a preloaded spring. This means that when the spring has no force applied and appears to be undeflected, it is already under tension or compression, and we cannot use the unloaded length as the unde- flected length. But, we can find the true undeflected length using the relation- ships from before. Next, recall that the resistance force of a damper is proportional to velocity. Con- sider that when velocity is zero, the force is zero. As the speed increases, so does the force. We can measure this using the approximate derivatives as before. Now, consider the basic mass-spring combinations. If the applied forces are static, F K s ∆x = ∆x x x 0 – = F K s x x 0 – ( ) = K s F 1 x 1 x 0 – ---------------- F 2 x 2 x 0 – ---------------- = = 1 K s ----- x 1 x 0 – F 1 ---------------- x 2 x 0 – F 2 ---------------- = = x 0 x 1 F 1 K s ------ – x 2 F 2 K s ------ – = = 1 K s ----- F 2 F 1 – ( ) x 2 x 1 – = K s F 2 F 1 – x 2 x 1 – ------------------ = ∆x F F K s OR F K s x = ∆F K s ∆x = K s ∆F ∆x ------- = K s F 2 F 1 – x 2 x 1 – ------------------ = x 1 x 0 x 2 (undeflected) x 0 x 1 F 1 K s ------ – x 2 F 2 K s ------ – = = F K d d dt -----x = F K d x t ∆T + ( ) x t ( ) – ∆T -------------------------------------- ¸ , ¸ _ = K d F∆T x t ∆T + ( ) x t ( ) – -------------------------------------- = ∆x K d F F page 567 the mass and spring will remain still, but if some unbalanced force is applied, they will oscillate. F y ∑ F s – F g – M d dt ----- ¸ , ¸ _ 2 y = = + K s y – Mg – M d dt ----- ¸ , ¸ _ 2 y = M d dt ----- ¸ , ¸ _ 2 y K s y + Mg – = y h t ( ) C 1 K s M -----t C 2 + ¸ , ¸ _ cos = y p t ( ) A = K s M y F g d dt ----- ¸ , ¸ _ y p t ( ) 0 = d dt ----- ¸ , ¸ _ 2 y ¸ , ¸ _ y p t ( ) 0 = M 0 ( ) K s A ( ) + Mg – = A ∴ Mg – K s ----------- = y t ( ) y h t ( ) y p t ( ) + C 1 K s M -----t C 2 + ¸ , ¸ _ cos Mg – K s ----------- + = = page 568 In the lab an ultrasonic sensor will be used to measure the distances to the compo- nents as they move. The sensor used is an Allen Bradley 873C Ultrasonic Proximity Sen- sor. It emits sound pulses at 200KHz and waits for the echo from an object that is 30 to 100cm from it. It outputs an analog voltage that is proportional to distance. This sensor requires a 18-30 VDC supply to operate. The positive supply voltage is connected to the Brown wire, and the common is connected to the blue wire. The analog voltage output (for distance) is the black wire. The black wire and common can be connected to a computer with a DAQ card to read and record voltages. The sound from the sensor travels outwards in an 8 degree cone. A solid target will give the best reflection. • Prelab: 1. Review the theory section. 2. Extend the theory by finding the response for a mass-spring, mass-damper, and mass-spring-damper system (assume values). 3. Set up a Mathcad sheet for the laboratory steps. Assume we start the mass at rest at the equilibrium height. y 0 ( ) 0 C 1 K s M ----- 0 ( ) C 2 + ¸ , ¸ _ cos Mg – K s ----------- + = = C 1 ∴ Mg K s C 2 ( ) cos -------------------------- = y t ( ) Mg K s -------- ¸ , ¸ _ K s M -----t ¸ , ¸ _ cos Mg – K s ----------- + = The natural frequency is found by completing one time period, 2π K s M -----T K s M ----- 1 f --- = = f ∴ 1 2π ------ K s M ----- = y' 0 ( ) 0 C 1 K s M ----- K s M ----- 0 ( ) C 2 + ¸ , ¸ _ sin = = C 2 ∴ 0 = page 569 22.6.2 Experiment 6a - Mechanical Components • Objective: This lab will explore a simple translational system consisting of a spring mass and damper using instrumentation and Labview. • Procedure 1. Use two masses to find the spring constant or stiffness of the spring. Use a mea- surement with a third mass to verify. If the spring is pretensioned determined the ’undeformed length’. 2. Hang a mass from the spring and determine the frequency of oscillation. Deter- mine if the release height changes the frequency. Hint: count the cycles over a period of time. 3. Connect the computer to the ultrasonic sensor (an Allen Bradley Bulletin 873C Ultrasonic Range Sensor, see www.ab.com), and calibrate the voltages to the position of the target (DO NOT FORGET TO DO THIS). Write a Labview pro- gram to read the voltage values and save them to a data file. In the program set a time step for the voltage readings, or measure the relationship between the reading number and actual time for later calculation. 4. Attach a mass to the damper only and use Labview to collect position as a func- tion of time as the mass drops. This can be used to find the damping coefficient. 5. Place the spring inside the damper and secure the damper. This will now be used as a combined spring damper. In this arrangement the spring will be precom- pressed. Make sure you know how much the spring has been compressed when the damper is in neutral position. 6. Use the spring-damper cylinder with an attached mass and measure the position of the mass as a function of time. 7. Use Working Model 2D to model the spring, damper and spring-damper responses. • Post-lab: 1. Determine if the frequency of oscillation measured matches theory. 2. Compare the Labview data to the theoretical data for steps 2, 4 and 6. 3. Compare the Labview data to the working model simulations. • Submit: 1. All results and calculations posted to a web page as a laboratory report. page 570 22.7 Lab 7 - Oscillating Systems • Many systems undergo periodic motion. For example, the pendulum of a clock. 22.7.1 Prelab 7a - Oscillating Systems • Theory: Suppose a large symmetric rotating mass has a rotational inertia J, and a twisting rod has a torsional spring coefficient K. Recall the basic torsional relationships. We can calculate the torsional spring coefficient using the basic mechanics of materials Finally, consider the rotating mass on the end of a torsional rod. • Prelab: T ∑ T – Jα J d dt ----- ¸ , ¸ _ 2 θ = = = T K∆θ K θ θ 0 – ( ) = = T JGθ L ---------- = θ h 2 d 2 d 1 h 1 T ∑ J 1 G L --------- ¸ , ¸ _ – θ J d dt ----- ¸ , ¸ _ 2 θ = = page 571 1. Calculate the equation for the natural frequency for a rotating mass with a tor- sional spring. 2. Set up a Mathcad sheet that will - accept material properties and a diameter of a round shaft and determine the spring coefficient. - accept geometry for a rectangular mass and calculate the polar moment of inertia. - use the spring coefficient and polar moment of inertia to estimate the nat- ural frequency. - use previous values to estimate the oscillations using Runge-Kutta. - plot the function derived using the homogeneous and particular solutions. 22.7.2 Experiment 7a - Oscillation of a Torsional Spring • Objective: To study torsional oscillation using Labview and computer data collection. • Procedure 1. Calibrate the potentiometer so that the relationship between and output voltage and angle is known. Plot this on a graph and verify that it is linear before con- necting it to the mass. 2. Set up the apparatus and connect the potentiometer to the mass. Apply a static torque and measure the deflected position. 3. Apply a torque to offset the mass, and release it so that it oscillates. Estimate the natural frequency by counting cycles over a long period of time. 4. Set up LabVIEW to measure the angular position of the large mass. The angular position of the mass will be measured with a potentiometer. • Post-lab: 1. Compare the theoretical and experimental values. • Submit: 1. All work and observations. 2. Post the laboratory report to a web page. page 572 22.8 Lab 8 - Servo Control Systems 22.8.1 Prelab 5a - Research • Theory: This lab explores the use of advanced servo control systems. In particular Allen Bradley 5000 drives will be used. These drives are programmed using C. The drives can be interfaced to digital and analog IO, as well a handle serial commonucations. • Prelab: 1. Visit the Allen Bradley web site (www.ab.com) and review the manuals for the Ultra5000 drives. In particular look at the installation manuals and program- ming manuals. 2. If necessary, review the principles of programming in C. Please note that the programming guide for the Ultra5000 drive contains a brief review of C pro- page 573 gramming practices. 22.8.2 Experiment 5a - Tutorial and programming • Objective: To be able to develop programs for an AB Ultra5000 servo control system. • Procedure 1. Follow the tutorial for the ULTRA5000 drives. 2. Develop a program that will use a voltage input (AIN1) from a potentiometer to position the drive. The drive will use forward and reverse limit switches on INPUT1 and INPUT2. When these switches are off the drive will be permitted to move in the given direction. INPUT3 should be used to stop the motor at any time, and stop the program. Ask the instructor to verify this program before continuing to the next stage. 3. Connect the servo drive to a linear slide. Attach two proximity sensors a few inches from each end of the slide to limit the stage motion. Use the ’Move’ function of the drive to verify that the forward and reverse limit switches are on the proper ends. 4. Verify that your program can be used to control the position of the slide using a potentiometer. • Submit: 1. A lab report including the fully commented C program for the drive. 22.9 TUTORIAL - ULTRA 5000 DRIVES AND MOTORS 1. (If not installed, install the Ultraware software, version 1.1.) Connect the ULTRA 5000 drive to the serial port, set the drive to ’01’ on the front of the drive, and then apply power. 2. Run the ’Motor Configuration’ program and open the ’Motors’ file. Select the correct motor type and then select ’New Rotary....’. Notice the motor parame- ters. Close the program. 3. Run the ’Ultraware’ software. Select ’Create new file....’ and give it a unique name such as ’lab.udb’ (Note: you should put this file on a floppy disk, or zip disk so that you may use it again later.). It will scan the available drives to page 574 locate the drive. When done, a ’5KDrive’ should appear under ’On-line drives’. 4. Right click on the ’%KDrive’ and select properties. For the ’Drive Type’ select the correct version indicated on the Ultra 5000 drive. Use ’Setup’ to update the drive parameters, then close the window. 5. Under the ’5KDrive’ select ’Motor’ and then select the motor type. Then select ’Setup’ to update the motor parameters. Notice the values and units. Close the window. 6. Turn the motor shaft by hand, it should turn easily. Enable the motor with ’Com- mands’ ’Enabled’ on the tool bar. The motor should now be controlled, and the shaft hard to turn. 7. For the motor select ’Motion’ then ’Jog’. In the window set the values below. After this hold the shaft and hit ’Jog forward’ then ’Jog reverse’ then ’Stop’. Notice how the values at the bottom of the screen change. Program Velocity 100,000 Program Acceleration 100,000 Program Deceleration 100,000 8. Now select ’Motion’ then ’Move’ and set the values below. When done, click ’Start’ to cause the motion. Change the value in ’Profile Distance’ and click ’Start’ again. Profile Distance 40,000 Velocity 20,000 Acceleration 20,000 Deceleration 20,000 9. Create a project with ’Insert’ then ’Project’. Click on the ’Project’ that was cre- ated on the tree, then ’Insert Source File’. Type in the following file, and then click ’Build’. If there are any errors fix them before continuing to the next step. page 575 10. Drag the new file ’Project.exe’ to the ’Programs’ under the ’5KDrive’. Hold the shaft of the motor and right click on the new file just dropped and click ’Run’. The motor shaft should move forward, pause for 1 second, reverse, then stop. 11. Enter the following program and observe the results. It should behave the same as the previous program, but it has more structure. When developing control applications it is important to structure the programs so that they are easier to write and debug. #include <motion.h> int main(void){ InitMotionLibrary(); // Start the motor control functions AxisEnable(); // Enable control of the motor MoveSetAcc(2000); // Set the maximum accelerations and velocity MoveSetVel(1000); MoveSetDec(2000); MoveDistance(10000);// Move in the positive direction while(MoveInProgress()){};// Wait until the move is complete Sleep(1000); // Pause for 1 second MoveDistance(-10000);// Move in the negative direction while(MoveInProgress()){}; Sleep(1000); AxisDisable(); // Release the motor drive control return 1; } page 576 12. Digital inputs and outputs for the drive are located on the upper connector, CN1A. The pin out for this connector is given below. Wires can be connected by pushing a thin slot screwdriver into the slot to release the pressure clamp, and then inserting the wire. The nominal voltages to activate an input are between 12V and 24V - do not exceed the maximum voltage as this may dam- age the drive. #include <motion.h> void setup(){ InitMotionLibrary(); AxisEnable(); MoveSetAcc(2000); MoveSetVel(1000); MoveSetDec(2000); } void shutdown(){ AxisDisable(); } void jog(int distance){ MoveDistance(distance); while(MoveInProgress()){}; } int main(void){ setup(); jog(10000); Sleep(1000); jog(-10000); Sleep(1000); shutdown(); return 1; } page 577 13. Connect an external power supply to the digital IO and connect a proximity sensor to input 1, as shown in the diagram below. Verify that the sensor is con- nected properly using the Ultraware software. Also connect a multimeter to OUTPUT1 to read the output voltage. Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Function INPUT 1 - Digital input 1 INPUT 2 - Digital input 2 INPUT 3 - Digital input 3 INPUT 4 - Digital input 4 INPUT 5 - Digital input 5 INPUT 6 - Digital input 6 INPUT 7 - Digital input 7 INPUT 8 - Digital input 8 OUTPUT 1 - Digital output 1 OUTPUT 2 - Digital output 2 OUTPUT 3 - Digital output 3 OUTPUT 4 - Digital output 4 SHIELD - for shielded cable termination IOPWR - V+ from external supply power for the IO INPUT 9 - Digital input 9 INPUT 10 - Digital input 10 INPUT 11 - Digital input 11 INPUT 12 - Digital input 12 INPUT 13 - Digital input 13 INPUT 14 - Digital input 14 INPUT 16 - Digital input 15 INPUT 16 - Digital input 16 OUTPUT 5 - Digital output 5 OUTPUT 6 - Digital output 6 OUTPUT 7 - Digital output 7 OUTPUT 8+ - Relay output 8 OUTPUT 8- - Relay output 8 IOCOM - common from external IO power supply Connector CN1A page 578 14. Enter the program below and determine what the program does. power supply V+ V- sensor V- (blue) V+ (brown) out (black) Ultra 5000 drive IOPWR IOCOM INPUT1 page 579 15. Analog outputs (and connections for additional encoders) are available on con- nector CN1B. Connect a variable power supply to act as an analog input across AIN1 and +5VCOM (WARNING: TURN THE POWER SUPPLY OFF AND SET THE VOLTAGE AT THE MINIMUM BEFORE TURNING THE SUP- PLY BACK ON). Connect a multimeter across AOUT1 and +5VCOM to read #include <motion.h> void setup(){ InitMotionLibrary(); AxisEnable(); MoveSetAcc(2000); MoveSetVel(1000); MoveSetDec(2000); } void shutdown(){ AxisDisable(); } void jog(int distance){ MoveDistance(distance); while(MoveInProgress()){}; } int main(void){ int count = 0, state_last = OFF, state_now; setup(); while(count < 10){ state_now = InputGetState(1); // get the state of INPUT1 if( (state_now == ON) && (state_last == OFF) ){ jog(1000); count++; } state_last = state_now; OutputSetState(1, state_now);// set OUTPUT1 to the INPUT1 value } shutdown(); return 1; } page 580 an analog output voltage. Verify the connection using the Ultraware software. 16. Enter the program below and determine what it does. Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Function +5V - internal power supply AX+ Encoder input/output A+ AX- Encoder input/output A- BX+ Encoder input/output B+ BX- Encoder input/output B- IX+ Encoder input/output I+ IX- Encoder input/output I- +5VCOM internal power supply common AIN1 - analog input 1 AIN2 - analog input 2 +5VCOM internal power supply common AOUT1 - analog output 1 AOUT2 - analog output 2 SHIELD - termination point for shielded cables Connector CN1B page 581 17. Communications????????????????????? #include <motion.h> void setup(){ InitMotionLibrary(); AxisEnable(); MoveSetAcc(2000); MoveSetVel(1000); MoveSetDec(2000); } void shutdown(){ AxisDisable(); } void locate(int position){ MovePosition(position); while(MoveInProgress()){}; } int main(void){ float a_in; int new_location; setup(); while(1 == 1){ // loop forever a_in = AnalogInputGetVoltage(1);// Get the voltage in from AIN1 new_location = a_in * 1000; locate(new_location); AnalogOutputSetVoltage(1, a_in/2.0); // output half the input voltage } shutdown(); return 1; } page 582 22.10 Lab 9 - Filters 22.10.1 Prelab 9 - Filtering of Audio Signals Theory: We can build simple filters using op-amps, and off the shelf components such as resistors and capacitors. The figure below shows a band pass filter. This filter will pass frequencies near a central frequency determined by the resistor and capacitor values. By changing the values we can change the overall gain of the amplifier, or the tuned frequency. C 1 R 1 R 2 + - R 3 V i V o + + - - gain (dB) C 2 freq page 583 The equations for this filter can be derived with the node voltage method, and the final transfer function is shown below. As dictated by the ear, audio signals have frequencies that are between 10Hz and 16KHz as illustrated in the graph below. This graph shows perceived sound level, with the units of ’phons’. For example, we can follow the 100 phons curve (this would be like a loud concert or very noisy factory requiring ear pro- tection). At much lower and higher frequencies there would have to be more sound pressure for us to perceive the same loudness, or phon value. If the sound were at 50Hz and 113 dB it would sound as loud as 100dB sound at 1KHz. V o V i ------ 1 R 1 ------ – ¸ , ¸ _ DC 1 R 1 R 2 1 DC 2 R 1 DC 1 R 1 D 2 C 1 C 2 R 1 R 2 + + + ------------------------------------------------------------------------------------------ - ¸ , ¸ _ = page 584 You may appreciate that these curves are similar to transfer functions, but they are non-linear. For this lab it is important to know how the ear works because you will be using your ear as one of the experimental devices today. Prelab: 1. Derive the transfer function given in the theory section. 2. Draw the Bode plot for the circuit given R1=R2=1000ohms and C1=C2=0.1uF. You are best advised to use Mathcad to do this. 100 200 500 1000 2000 5000 50 10000 20000 120 110 100 90 80 70 60 50 40 30 20 10 0 Phons 120 110 100 90 80 70 60 50 40 30 20 10 S o u n d P r e s s u r e L e v e l ( d B ) freq (Hz.) page 585 22.10.2 Experiment 9 - Filtering of Audio Signals Objective: To build and test a filter for an audio system. Procedure: 1. Set up the circuit shown in the theory section. Connect a small speaker to the output of the amplifier. 2. Apply a sinusoidal input from a variable frequency source. Use an oscilloscope to compare the amplitudes and the phase difference. Also record the relative volumes you notice. 3. Supply an audio signal, from a radio, CD player, etc. Record your observations about the sound. Submit: 1. Bode plots for both theory and actual grain and phase angle. 2. A discussion of the sound levels you perceived. page 586 22.11 Lab 10 - Stepper Motors 22.11.1 Prelab 10 - Stepper Motors Theory: Stepper motors move to positions, steps, but don’t rotate continuously. To achieve continuous rotation the motor is moved, or stepped, continuosly in one direc- tion. A full rotation of the motor is often divided into 200 steps (of 1.8 degrees each), although other resolutions are common. The motors we will use in the lab have 400 steps per revolution. When rotating the motor it can be stepped in the clockwise (CW) or counterclockwise (CCW) direction. The equipment to be used in the lab is comprised of a stepper motor, a drive unit, a motion controller (indexer), and a computer running terminal software for pro- gramming. The motor is connected to the drive unit which will power the coils and step in the positive or negative directions, as indicated by pulses from the motion controller. The motion controller will accept motion commands, or run programs which generate the overall motion. The motion controller commands the motor drive to move by sending it pulses. The motor controller varies the period of the pulses. When motion is starting or ending a longer period corre- sponds to a slower angular velocity. At the midpoint of motion the pulse period is the shortest, at the maximum velocity. The motion is normally described with a velocity profile. This can be given by defining the maximim acceleration/deceleration and maximum velocity. An alternative way to define these limits is to provide an acceleration and decelera- tion time, with a total motion time. page 587 Figure 427 Velocity curves for motor control Prelab: 1. In the textbook review the sections on stepper motors and motion control. Make sure you are familiar with the basic operation of a stepper motor and the struc- ture of a velocity profile. 2. Review the manuals for the stepper motor on the course home page on clay- more. 22.11.2 Experiment 9 - Stepper Motors Objective: To develop a stepper motor control program. Procedure: 1. Follow the attached tutorial 2. Develop a program to accept an input to the motion controller and then move the -90 90 180 time(sec) motor angle (degrees) motor velocity (degrees/sec) θ 1 α max ω max t acc t max t dec page 588 motor to different positions. Submit: 1. The questions answered during the tutorial. 2. The program developed (with comments). 22.12 TUTORIAL - STEPPER MOTOR CONTROLLERS (by A. Blauch and H. Jack) 1. Examine the manuals for the stepper motor and controller. 2. Obtain and examine the stepper motor equipment. There are three main compo- nents: stepper motor, drive unit, and indexer. Identify each unit. Verify the com- ponents are connected together properly based on the diagram shown below. Note that the drive unit obtains power from an AC source (outlet) while the indexer receives power from a DC source (power supply). Once all of the con- nections have been verified, apply power to the system. If set up properly, the power LEDs on the drive unit and indexer will turn on and the stepper motor will have holding torque (the shaft won’t turn freely). Figure 428 The stepper motor control system components 3. The indexer communicates with the PC via text transfers across a serial port. Connect a serial cable from the indexer to the COM port on the back of the PC. On the PC, run HyperTerminal (located under Programs->Accessories- >Communications) or any other terminal emulation program. Set it to go "Direct to Com 1". Check to make sure the communication parameters are set to 9600 baud, 8 data bits, 1 stop bit, no parity, and no flow control/handshaking. Once connected the prompt 0> will appear on the screen. If nothing appears, press enter several times. Cycling power on the indexer will cause a reset ban- personal computer with terminal software RS-232 serial cable SC8800 motor controller UMK 2112A drive 2 phase stepper 10-24V power supply 115Vac cw/pls ccw/dir (indexer) motor p/cw d/ccw unit page 589 ner to appear. To display all of the available indexer commands, type HELP. 4. The indexer commands of interest are the ones used to generate and execute dif- ferent velocity profiles. The list below highlights the commands used in this lab. Typing HELP2, HELP3, HELP4, etc... will display a more detailed lists of these and other profiling commands 5. To see what the current velocity profile parameters are, type the parameter name followed immediately by a question mark (i.e. T? will display the current accel- eration/deceleration time). 6. Type in the following series of commands. Observe how the stepper motor responds and how the response relates to the parameter values entered. 7. Change the acceleration and decelleration times to be longer and shorter and observe the effects using the values below. As part of your observations, hold the shaft while the motion is in progress. Command H<+/-> T<xx.xx> VS<xxxxx> V<xxxxx> D<xxxxx> MC MI R RESET S STOP Description Sets the direction of motion Sets the acceleration/deceleration time in seconds Sets the starting velocity in pulses per second Sets the run velocity in pulses per second Sets the distance in pulses for the MI command Starts continuous motion Starts incremental motion Displays the status of system parameters Resets the system Controlled stop of current motion Immediate stop of current motion VS0 V2000 T0.5 D10000 MI acc/dec 0.01 0.5 0.01 vel 20000 10 2000 distance 50000 100 6000 page 590 8. Generate and execute a velocity profile that will cause the motor to rotate at one revolution/second using the continuous motion command. Based on the run velocity parameter value, determine what angle one pulse (step) corresponds to. Compare your number to the resolution value on the stepper motor label. 9. Set the acceleration/deceleration parameter to several seconds. Using the run velocity parameter and the continuous motion command, make the stepper motor rotate at various velocities. Determine the maximum speed of rotation for the stepper motor (i.e. at what point does the motor lose synchronization with the input pulses). 10. Decrease the run velocity to about one half the maximum speed determined previously. Using the acceleration/deceleration parameter and the continuous motion command, make the stepper motor accelerate at various rates. Deter- mine the maximum acceleration for the stepper motor (i.e. at what point does the motor lose synchronization with the input pulses). Make a note of any strange phenomena that may occur. 11. Determine the parameter values for a velocity profile with an acceleration of 18000 rpm 2 , maximum velocity of 600 rpm, and a total run time of 10 seconds. Generate, execute, and verify the profile. For this profile you will need to use the incremental motion command. 12. Based on your experiences in lab with motors, discuss some advantages and disadvantages of using a stepper motor compared to a DC motor. Some issues to think about are torque, position control, velocity control, and interface. 13. Enter a program with the following commands. Notice that the editor has com- mands to alter ’Ax’ line ’x’, delete ’Dx’ line ’x’ or insert ’Ix’ a line ’x’. Each program will be assigned a number between 0 and 49. The program can be run with ’RUN TEST’. NOTE: After this point you should use the manual for a source of examples. 14. You can see a list of programs in the memory using ’LIST’. Programs can be deleted with ’DELETE’. EDIT TEST PC0 TA0.5 TD0.5 VS2000 D6000 MI Q page 591 15. The motion controller has a limited set of variables available for user pro- grams. Unlike normal programming variables, there are a fixed set availabe, as indicated below. The integers values are all 4 bytes and can range in value between +/-2,147,483,647. Write a simple program that sets a general variable value. W, X, Y, Z - general purpose integer V- velocity VS - LOOP - D - distance INx - input bit ’x’ PC - position counter, the current motor position in steps 16. Outputs can be set using the ’OUTx’ command, where ’x’ is the output bit number. Connect a voltage supply to the inputs and a multimeter to the outputs and create a program to read an input and set an output as shown below. Refer to the manual for pinouts and electrical specifications. 17. Logical operations can be performed using ’IF’ and ’WHILE’ statements. The operations can include =, !=, <, <=, >, >=. The if statements can include ’ELSE’ conditions and should terminate with ’ENDIF’ statements. The while loops must end with ’ENDW’ statements. The equivalent to a for-loop is the ’LOOP x’ statement. It will loop the code ’x’ times to the ’ENDL’ statement. Write a simple program that will loop until an input becomes true. 18. It is possible to branch within a program using ’JMP’. To jump to another pro- gram (subroutine) the ’JMP_SEQ’ command can be used, the program can then return using the ’RET’ command. Write a program that has a subroutine. page 592 22.13 Lab 11 - Variable Frequency Drives 22.13.1 Prelab 11 - Variable Frequency Drives Theory: AC induction motors are designed with motor winding on the stator (out- side) of the motor. The AC current in the stator coils sets up an alternating magnetic field. This field induces currents in the conductors (squirrel cage) in the rotor. This current cre- ates a magnetic field that opposes the field from the stator. As a result a torque is created. In actuality the rotor must rotate somewhat slower than the field changes in the stator, this difference is called slip. For example a 3 phase motor (with two poles) that has a 60Hz power applied will with absolutly no rotational resistance rotate at 60 times per second. But in use it might rotate at 58 or 59Hz. As the number of poles in the motor rises, the speed of rotation decreases. For example a motor with four poles would rotate at half the speed of a two pole motor. The speed of the motor can be controlled by changing the fre- quency of the AC power supplied to the motor.The motor that we will use in the lab is a 3 phase AC motor made by Marathon Electric. It is a Black Max model number 8VF56H17T2001. The motor drives are Allen Bradley model 160 and 161 motor drives. Prelab: 1. Visit the Marathon Electric and Allen Bradley web sites and review the manuals for the motor and controllers. Don’t print these, but make a not of the web address so that you can find the manuals easily during the lab. 22.13.2 Experiment 11 - Variable Frequency Drives Objective: To learn the basic operation of Varaible Frequency Drives (VFD) and motors. Procedure: 1. Follow the attached tutorial. (and make notes and observations.) 2. Connect the 3 phase motor to a tachometer for a velocity feedback. Using the manual determine how to change the PID parameters. Run a number of tests to see what it does. 3. Determine how to use an analog input to control the speed. Set it up and find the relationship between the input voltage and the motor speed. 4. Replace the 161 controller with the 160 controller, and determine how this con- troller operates. page 593 22.14 TUTORIAL - ALLEN BRADLEY 161 VARIABLE FREQUENCY DRIVES 1. The motor should be connected the the drive as shown in the figure below. The three phase power lines are T1, T2 and T3. These can be connected to the drive by loosening the screw on the front face of the drive. (WARNING: make sure the power is off before opening the drive, and relseal the drive when done) The two other lines P1 and P2 from the drive are for a thermal overload relay, we will not use these. For general caution the ends of the wires should be covered with electrical tape to prevent accidental contact with other conductors. The wire from P24 (a 24V power source) and input 3 are for an emergency stop and must be connected for the drive to work. These terminals can be found under a flip up panel on the bottom front of the drive that can be opened by pulling on the right side of the face. 2. Notice the display and lights on the front face of the drive. When a program is running the ’RUN’ light is on. The program can be started using the green ’1’ button, and stopped with the red ’0’ button. 3. Program the unit using the buttons on the front panel, following the steps below (from page 17 in the manual). After the steps have been followed press the run button and turn the potentiometer to vary the speed. Try holding the shaft (cover the shaft to avoid cuts) at high and low speeds. What do you notice at very low speeds? 4. Connect a proximity to the controller as shown in the diagram below. Display P1 P2 T1 T2 T3 3 phase motor AB 161 drive 115Vac green L1 N GND P24 3 T1 T2 T3 estop button(s) sel up or down sel up or down sel up or down enter up or down sel up or down enter description move the the parameter number, from frequency move to the ’A’ parameters select the ’A’ parameter group (use up or down if not A01) select the velocity input source display the current setting select the potentiometer (on the controller) as the input accept the new value move the the start button selector move to parameter select the value for start to the ’run’ button accept the value result d01 A-- A01 00 01 00 A01 A02 01 02 A02 page 594 the input values using ’D05’.The bits on the screen should move up for an active input, and down for an inactive input. Input 3 will always be active because it is being used for the emergency stop (a factory default). 5. Various display parameters are listed below. Try these to see what information they show. D02 - display the motor current (try holding the shaft while turning slowly) D01 - display the frequency of rotation D03 - the direction of rotation D04 - PID parameters (when in use) D05 - input status D06 - output status D16 - total drive run time in 10 hour blocks 6. Function parameters can be set with the ’F’ locations. Change the acceleration and decelleration times to 1 second using the ’F02’ and ’F03’ locations. 7. Restore the controller to the factory defaults using the sequence below from page 16 of the manual. sensor drive P24 1 L BRN BLK BLU V+ V- signal button(s) up or down sel up or down sel sel sel+up+down+0 sel+up+down description move to the ’B’ parameter groups enter the move to the reset function select the function, make sure the value is ’01’ select the value hold down the keys for 3 seconds release the ’0’ key and continue to hold the others until the display blinks. result b-- b01 b84 01 b84 b84 00 then 0.0 page 595 22.15 TUTORIAL - ULTRA 100 DRIVES AND MOTORS 1. Obtain the motor and controller sets. This should include a brushless servo motor (Y-1003-2H), an Ultra 100 Controller and miscellaneous cables. The cables are described below. Locate and verify they are connected as indicated in the sequence given below. a) The motor is connected to the controller with two cables, one for the power to drive the motor, and the other a feedback from the encoder. The encoder is used to measure the position and velocity of the motor. If not connected already, connect these to the motor controller. b) The controller should also have a serial cable for connecting to a PC serial port. Connect this to a PC. c) A breakout board is provided with that will connect to the motor control- ler through a ribbon cable to J1. The pin mapping from the motor con- troller to the terminal numbers on the motor controller are given below. d) A power cord to be connected to a normal 120Vac power source. DO controller pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 breakout pin 9 25 41 8 24 40 7 23 39 6 22 38 5 21 37 4 20 36 3 19 35 2 18 34 1 controller pin 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 breakout pin 50 17 33 49 16 32 48 15 31 47 14 30 46 13 29 45 12 28 44 11 27 43 10 26 42 page 596 NOT CONNECT THIS YET. 2. The controller needs to be connected as shown below. In this case it will require that the breakout board be connected to the motor controller by a ribbon cable. Note: the pins on the breakout board don’t have the same numbers as on the motor controller. Connect the wires as shown below but do not turn on the devices yet. 3. Plug in the power cord for the Ultra 100 drive and look for a light on the front to indicate that it is working. WARNING: The motor might begin to turn after the next step --> Turn on the power supplies and the oscilloscope. 4. Run the ’Ultramaster’ software on the PC. When prompted select ’drive 0’. At this point the software should find the drive and automatically load the control- ler parameters from the controller. When it is done a setup window will appear. 5. In the "drive setup" window ensure the following settings are made. When done close the setup window. Motor Model: Y-1003-2-H - this is needed so that the proper electrical and mechanical properties of the motor will be used in the control of the motor (including rotor inertia). Operation Mode Override: Analog Velocity Input - This will allow the voltage input (C+ and C-) to control motor velocity. 6. Select the ’IO Configuration’ window and make the following settings. Analog Output 1: Velocity - Motor Feedback - this will make the analog voltage output from the controller (R+ and R-) indicate the velocity of the motor, as measured by the encoder. Scale: 500 RPM/VOLT - this will set the output voltage so that every connector on Ultra drive 5 6 22 23 31 28 Power Supply 18-24V + - Variable Power Supply + - Oscilloscope A com -10V to 10V B com 26 20 breakout board 24 40 2 18 32 33 50 19 page 597 500RPM will produce an increase of 1V. 7. Open the "Oscilloscope" on the computer screen and make the following set- tings. When done position the oscilloscope to the side of the window so that it can be seen later. Channel A: Velocity - command Channel B: Velocity - motor feedback Time Base: 12.5ms 8. Open the control panel and change the speed with the slider, or by typing it in. Observe the corresponding changes on the oscilloscope on the screen, and the actual oscilloscope. Notice that the velocity change follows a ramp. The slope of the ramp is a function of the maximum acceleration. 9. Hold the motor shaft while it is turning slowly and notice the response on the oscilloscopes. 10. Open the tuning window and change the ’I’ value to 0. Change the motor speed again and notice the final error. It should be larger than in previous trials. 11. Leave the ’I’ value at ’0’ and change the ’P’ value to 50 and then change the speed again. This time the error should be larger, and the response to the change should be slower. Hold the shaft again, it should be easier to stop. 12. Try other motor parameters and see how the motor behaves. Note that very small or large values of the parameters may lead to controller faults - if this occurs set more reasonable ’P’ or ’I’ values and then reset the fault. 13. Notice that the left hand side of the tuning window has an autotune function. Select this to automatically pick the controller values. To perform this function click the ’stop’ then ’start’ buttons. The motor will move, and then reverse direction to determine the dynamic load. It will then pick parameters to leave the motor controller critically damped. 14. Set the parameters back to ’P’ = 200 and ’I’ = 66. 15. Stop the ’Control Panel’, this will allow the motor to be controlled by the external voltage supply. Change the voltage supply and notice how the motor responds. Reverse the voltage supply and notice that the motor turns in the other direction - remember to return it to normal when done. 16. Connect proximity sensors to digital inputs 1 and 2. The pins on the controllers are 32 and 33 respectively. The pins on the breakout board are 48 and 15 respectively. The wires for the proximity sensors are standardized as brown for V+, blue for the common and black for the signal. 17. Once the proximity sensors are attached test them with the "Display Digital IO" window. After this change the "IO Configuration window to set input 1 as "forward enable" and input 2 as the reverse enable". Test these to see that they actually stop the motor in both directions when not on. 18. Attach the motor to a ball screw slide and attach the proximity sensors. Change the motor controller to follow a position command. You should be able to con- trol the position of the motor by changing the variable power supply voltage. page 598 22.16 TUTORIAL - DVT CAMERAS (UPDATE FROM 450???) (******To be done outside the lab without the hardware) 1. If the DVT software is not installed yet, install it now. 2. In either case put the DVT CDRom in the computer and follow the tutorials on the CD. 3. Run the ’Framework’ software. When it starts to run a window called ’PC Com- munications’ will appear. In this case we will only use the simulator, so select ’Emulator’ then ’Model 630’, then ’Connect’. The emulator will also start as another program. 4. At this point we can set up a simple set of vision tests for the camera. The cam- era is capable of supporting tests for more than one product. You can select which product the tests will be for by first selecting ’Products’ then ’Product Management...’. This will put up a window to define the product details. Select ’New’ and then enter ’part1’. Use ’OK’ to dismiss the windows and get back to the main programming window. 5. We need to now set up the emulator to feed images to the programming soft- ware. We can do this by loading a set of test images. To do this open the ’DVT SmartImage Sensor Emulator’ window. Then select ’Configure’ then ’Image sequence...’. Select ’Browse for Image’ and then look for images on the CD in the ’emulator\images\Measurement’ directory. Pick the file ’Measurement001.bmp’. The next window will ask for the last image so select ’Measurement010.bmp’. Select ’OK’ to get back to the main emulator window. 6. Go back to the Framework programming screen. The emulator can be started by selecting the right pointing black triangle near the red circle. You should see images appear in a sequence. Pause the images using the single vertical line. 7. Next we will add a test to the product. On the left hand side of the screen select ’Measurement’, select the small line with two red arrows and then move the mouse over the picture and draw a line over a single section of the part, for example the right hand most side by the large circle. 8. In the pop-up window enter the test name ’test1’. Apply the changes and dismiss the window and run the camera again. Notice that as the images flip by the result of the test is shown at the bottom of the screen. As the images are cap- tured the part may move around. It is common to delete and recreate the sensor a number of times to find the right position for the line. Double click on the sen- sor and look at some of the options possible. Try changing these and see what happens. 9. Delete the previous sensor and create a sensor (rotational positioning: find edge in parallelogram), and a translation sensor (translational positioning: fudicial rectangle). For the translation sensor, under the ’Threshold’ select ’Dark Fudi- cial’. Run the software and note the rotation and translation data at the bottom of the screen as the images are processed. 10. Delete the sensors. Go to the emulator and load the two ’1dBarCode’ images in page 599 the ’emulator\images\1DReader’. In Framework run the camera so that these appear on the screen, then pause the camera. On the left hand side of the screen select ’Readers’ then ’Barcode Sensor: Line for 1D codes’. Draw the sensor line over the middle of the barcode. page 600 23. WRITING REPORTS • As engineers, reports are the most common form of document we will write. • Report writing is an art that we often overlook, but in many cases can make a dra- matic impact on our progression. • Your reports are most likely to find their way to a superiors desk than you are to meet the individual. • Note: typically these documents are done as a long written document -this is done in point form for more mercenary reasons. 23.1 WHY WRITE REPORTS? • Reports are written for a number of reasons, - (lets forget about this one) as a student you must do them to get marks - to let other engineers know the results of an experiment - to leave a record of work done so that others may continue on - as a record you may use yourself if you must do work again some time later - they are required for legal reasons (contract or legislation) - they bring closure to the project 23.2 THE TECHNICAL DEPTH OF THE REPORT • This is the most common question for beginning report writers. • Always follow the doctrine - “What happens if I am hit by a car; could another pick up my report and continue?” if the answer to this question is no the report is too short. • Always ask the question - “If I was reading this before starting the project would I look at this section and say it is not needed?”. If the question we are probably best to con- dense the section or leave it out. • Avoid more artistic sections. If you put these in, make it clear that they are an optional part of the report and can be skipped. It is somewhat arrogant to force the reader page 601 to 23.3 TYPES OF REPORTS • We do different types of reports, including, Laboratory - Theses ‘Lab Reports’ describe one or more experiments, the results, and the conclusions drawn from them. Consulting - A summary of details, test results, observations, and a set of conclu- sions. Typically they will also contain a recommendation. Project - A description of work done in a project to inform other engineers who may be asked to take up further work on the project. Research - A summary of current advances in a topic. This should end with some comparison of alternatives. Interim - A report to apprise supervisors and others as to the progress of a project or other major undertaking. Executive - A brief summary of the report, and any implications for decision mak- ing at the management levels. 23.3.1 Laboratory • Purpose: These reports should outline your procedure and results in detail. They should also contain the analysis and conclusions. The completeness of detail allows you (and others) to review these and verify the correctness of what has been done. These have been historically used for hundreds of years and are accepted as a form of scientific and legal evidence. It is completely unacceptable to make incorrect entries or leave out impor- tant steps or data. • Standard Format: 1. Title, Author, Date - these make it clear what the labs contain, who did the work, and when it was done. 2. Purpose - a brief one line statement that allows a quick overview of what the experiment is about. This is best written in the form of a scientific goal using the scientific methods. 3. Theory - a review of applicable theory and calculations necessary. Any design work is done at this stage 4. Equipment - a list of the required equipment will help anybody trying to repli- cate the procedure. Specific identifying numbers should be listed when possi- ble. If there are problems in the data, or an instrument is found to be out of page 602 calibration, we can track the problems to specific sets of data and equipment. 5. Procedure - these are sequential operations that describe what was done during the experiment. The level of detail should be enough that somebody else could replicate the procedure. We want to use this as a scientific protocol. 6. Results (Note: sometimes procedure and results are mixed) - the results are recorded in tables, graphs, etc. as appropriate. It will also be very helpful to note other events that occur (e.g. power loss, high humidity, etc.) 7. Discussion - At this stage the results are reviewed for trends and other observa- tions. At this point we want to consider the scientific method. 8. Conclusions - To conclude we will summarize the significant results, and make general statements either upholding or rejecting our purpose. • Style: These are meant to be written AS the work is done. As a result the work should be past tense • Laboratory reports should have one or more hypotheses that are to be tested. If testing designs these are the specifications. Examples might be, - what is the thermal capacity of a material? - what is the bandwidth of an amplifier? - will the counter increment/decrement between 0 to 9? • NOTE: These reports are much easier to write if you prepare all of the calcula- tions, graphs, etc. before you start to write. If you sit down and decide to do things as you write it will take twice as long and get you half the marks...... believe me, I have written many in the past and I mark them now. 23.3.1.1 - An Example First Draft of a Report Grand Valley State University Padnos School of Engineering EGR 345 Dynamics Systems Modeling and Control Laboratory Exercise 7 Title: The Cooling of Coffee Author: I. M. Wyred page 603 Date: Dec., 23, 1998 Purpose: To derive a theoretical model of the rate at which coffee cools and exper- imentally verify the model and find coefficients. Theory: When coffee is heated kinetic energy is added, when coffee is cooled kinetic energy is removed. In a typical use, coffee cools as heat is lost through convection and conduction to the air and solids in contact. The factors involved in this convection/conduc- tion can be difficult to measure directly, but we can approximate them with a simple ther- mal resistance. Consider the temperature difference between the coffee and the ambient temperature. The greater the temperature difference, the higher the rate of heat flow out of the coffee. This relationship can be seen formally in the equation below. We can also assume that the atmosphere is so large that the heat transfer will not change the tempera- ture. We can also consider that coffee has a certain thermal capacity for the heat energy. As the amount of energy rises, there will be a corresponding temperature increase. This is known as the thermal capacitance, and this value is unique for every material. The basic relationships are given below. I will assume that the energy flow rate into the coffee is negligible. q 1 R --- θ coffee θ air – ( ) = where, q heat flow rate from coffee to air (J/s) = R thermal resistance between air and coffee = θ temperatures in the coffee and air = page 604 The temperatures can be found by consider that the energy flowing out of the cup, and into the atmosphere is governed by the resistance. And, the temperature in the coffee and air are governed by the two capacitances. We will make two assumptions, that the thermal capacitance of the atmosphere is infinite, and that there is no energy flowing into the coffee. This differential equation can then be solved to find the temperature as a function of time. ∆θ coffee 1 C coffee ---------------- q in q out – ( ) 1 – C coffee ----------------q = = where, C coffee thermal capacitance = C coffee M coffee σ coffee = where, M coffee mass of thermal body = σ coffee specific heat of material in mass = dθ coffee dt ------------------ 1 – C coffee ----------------q = dθ coffee dt ------------------ 1 – C coffee ----------------q = dθ coffee dt ------------------ ∴ 1 – M coffee σ coffee --------------------------------- 1 R --- θ coffee θ air – ( ) ¸ , ¸ _ = dθ coffee dt ------------------ 1 M coffee σ coffee R ------------------------------------- ¸ , ¸ _ θ coffee + ∴ 1 M coffee σ coffee R ------------------------------------- ¸ , ¸ _ θ air = page 605 The time constant of this problem can be taken from the differential equation above. Equipment: 1 ceramic coffee cup (14 oz.) 2 oz. ground coffee 1 coffee maker - Proctor Silex Model 1234A 1 thermocouple (gvsu #632357) 1 temperature meter (gvsu #234364) 1 thermometer BCe Ct 1 M coffee σ coffee R ------------------------------------- ¸ , ¸ _ A Be Ct + ( ) + ∴ 1 M coffee σ coffee R ------------------------------------- ¸ , ¸ _ θ air = θ A Be Ct + = Guess d dt ---- - θ BCe Ct = e Ct BC B M coffee σ coffee R ------------------------------------- + ¸ , ¸ _ A M coffee σ coffee R ------------------------------------- 1 – M coffee σ coffee R ------------------------------------- ¸ , ¸ _ θ air + ¸ , ¸ _ + ∴ 0 = BC B M coffee σ coffee R ------------------------------------- + 0 = C 1 – M coffee σ coffee R ------------------------------------- = A M coffee σ coffee R ------------------------------------- 1 – M coffee σ coffee R ------------------------------------- ¸ , ¸ _ θ air + 0 = A θ air = To find B, the initial temperature of the coffee should be used, θ 0 A Be C 0 ( ) + θ air B + = = B θ 0 θ air – = θ θ air θ 0 θ air – ( )e t – M coffee σ coffee R ----------------------------------- + = The final equation is, τ M coffee σ coffee R = page 606 2 quarts of tap water 1 standard #2 coffee filter 1 clock with second hand 1 small scale (gvsu# 63424) Procedure and Results: 1. The coffee pot was filled with water and this was put into the coffee maker. The coffee filter and grounds were put into the machine, and the machine was turned on. After five minutes approximately the coffee was done, and the pot was full. 2. The mass of the empty coffee cup was measured on the scale and found to be 214g. 3. The air temperature in the room was measured with the thermometer and found to be 24C. The temperature of the coffee in the pot was measured using the thermocouple and temperature meter and found to be 70C. 4. Coffee was poured into the cup and, after allowing 1 minute for the temperature to equalize, the temperature was measured again. The temperature was 65C. Readings of the coffee temperature were taken every 10 minutes for the next 60 minutes. These values were recorded in Table 1 below. During this period the cup was left on a table top and allowed to cool in the ambient air temperature. During this period the mass of the full cof- fee cup was measured and found to be 478g. Discussion: The difference between the temperature of the coffee in the pot and in the cup was time (min) 0 10 20 30 40 50 60 temperature (deg C) 65 53 43 35 30 28 26 Table 1: Coffee temperatures at 10 minute intervals page 607 5C. This indicates that some of the heat energy in the coffee was lost to heating the cup. This change is significant, but I will assume that the heating of the cup was complete within the first minute, and this will have no effect on the data collected afterwards. The readings for temperature over time are graphed in Figure 1 below. These show the first-order response as expected, and from these we can graphically estimate the time constant at approximately 32 minutes. We can compare the theoretical and experimental models by using plotting both on the same graph. The graph clearly shows that there is good agreement between the two curves, except for the point at 30 minutes, where there is a difference of 3.5 degrees C. 60 40 20 0 20 40 60 temp (deg C) t (min) Figure 1 - A graph of coffee temperature measured at 10 minute intervals τ 32min ≈ 24 page 608 This gives an overall error of 8.5% between these two curves, compared to the total range of the data. Finally, the results can be used to calculate a thermal resistance. If we know the mass of the coffee and assume that the coffee has the same specific heat as water, and have the time constant, the thermal resistance is found to be 1731sC/J. Conclusion: In general the models agreed well, except for a single data point. This error was relatively small, only being 8.5% of the entire data range. This error was most likely 60 40 20 0 20 40 60 temp (deg C) t (min) Figure 2 - Comparison of experimental and modelled curves max. difference of 3.5 deg. C experimental data mathematical model error 3.5 65 24 – ------------------100 8.5% = = τ M coffee σ coffee R = M coffee 478g 214g – 0.264Kg = = σ coffee 4.2 C KgJ ---------- = R τ M coffee σ coffee --------------------------------- 1731 sC J ------ = = τ 32min 1920s = = page 609 caused by a single measurement error. The error value is greater than the theoretical value, which suggests that the temperature might have been read at a "hot spot". In the procedure the temperature measuring location was not fixed, which probably resulted in a variation in measurement location. 23.3.1.2 - An Example Final Draft of a Report • A final draft of the report is available on the course website in Mathcad format, and it will be distributed in the lab. 23.3.2 Research • Purpose: After looking at a technical field we use these reports to condense the important details and differences. After reading a research report another reader should be able to discuss advanced topics in general terms. • Strategy A: 1. Clearly define the objectives for the report 2. Outline what you know on a word processor in point form and find the ‘holes’ 3. Do research to find the missing information 4. Incorporate the new and old information (still in point form) 5. Rearrange the points into a logical structure 6. Convert point form into full text 7. Proof read and edit 23.3.3 Project • Purpose: These reports allow the developer or team to document all of the design decisions made during the course of the project. This report should also mention avenues not taken. Quite often the projects that we start will be handed off to others after a period of time. In many cases they will not have the opportunity to talk to us, or we may not have the time. These reports serve as a well known, central document that gathers all relevant information. • Strategy A: 1. Define the goals for the project clearly in point form page 610 2. Examine available options and also add these in point form 3. Start to examine engineering aspects of the options 4. Make engineering decisions, and add point form to the document 5. As work continues on the project add notes and figures 6. When the project is complete, convert the point form to full text. 7. Proof read and edit 23.3.4 Executive • Purpose: These reports condense long topics into a very brief document, typically less than one page in length. Basically these save a manager from having to read a com- plete report to find the details that interest him/her. 23.3.5 Consulting • Purpose: These reports are typically commissioned by an independent third party to review a difficult problem. The consultant will review the details of the problem, do tests as required, and summarize the results. The report typically ends with conclusions, suggestions or recommendations. 23.3.6 Interim • Purpose: This report is normally a formal report to track the progress of a project. When a project is initially planned, it will be given a timeline to follow. The interim report will indicate progress relative to the initial timeline, as well as major achievements and problems. 23.4 ELEMENTS • In reports we must back up our opinions with data, equations, drawings, etc. As a result we use a number of common items, - figures - tables - equations - page 611 • When these elements are included, there MUST be a mention of them in the writ- ten text. • These days it is common to cut and paste figures in software. Make sure - the resolution is appropriate - the colors print properly in the final form or print well as black and white - the smallest features are visible - scanned drawings are clean and cropped to size - scanned photographs are clear and cropped to size - digital photographs should be properly lit, and cropped to size - screen captures are clipped to include only relevant data 23.4.1 Figures • Figures include drawings, schematics, graphs, charts, etc. • They should be labelled underneath sequentially and given a brief title to distin- guish it from other graphs. For example “Figure 1 - Voltage and currents for 50 ohm resis- tor” • In the body of the report the reference may be shortened to ‘Fig. 1’ • The figures do not need to immediately follow the reference, but they should be kept in sequence. We will often move figures to make the type setting work out better. • If drawing graphs by computer, - if fitting a line/curve to the points indicate the method used (e.g. linear regres- sion) - try not to use more than 5 curves on the same graph - use legends that can be seen in black and white - clearly label units and scales - label axes with descriptive term. For example “Hardness (RHC)” instead of “RHC” - scale the curve to make good use of the graph - avoid overly busy graphs page 612 23.4.2 Tables • Tables are often treated as figures. • They allow dense information presentation, typically numerical in nature. • Legends can be added to tables to help condense size. Table 2: A Comparison of Toy Vehicle Properties Description Number Color Shape Material car 3 red rectangular die cast truck 6 blue long polyprop. motorcycle 2 green small wood Figure 2 - Various Techniques for Making a Sphere with AMP page 613 23.4.3 Equations • When presenting equations, use a good equation editor, and watch to make sure subscripts, etc are visible. • Number equations that are referred to in the text. • Box in equations of great significance. 23.4.4 Experimental Data • When analyzing the results from an experiment there are a few basic methods that may be used, Percent difference - Mean and standard deviation - Point by point - Matching functions - F x ∑ T 1 60° sin – F R θ R sin + 0 = = F y ∑ T 1 T 1 60° ( ) cos – F R θ R cos + – 0 = = + + F R ∴ T 1 60° sin θ R sin ---------------------- T 1 T 1 60° cos + θ R cos ------------------------------------ = = 60° sin 1 60° cos + --------------------------- ∴ θ R sin θ R cos --------------- θ R tan = = θ R tan ∴ 0.866 1 0.5 + ---------------- = θ R ∴ 30° = 98 60° sin F R 30° sin = F R ∴ 170N = (1) (2) sub (1) into (2) page 614 etc...... XXXXXXXXXXXXXX Add more XXXXXXXXXXXXXXXXX 23.4.5 Result Summary • It is very important to put a summary of results at the end of a report. XXXXXXXXXXXXX 23.4.6 References • References help provide direction to the sources of information when the infor- mation may be questioned, or the reader may want to get additional detail. • Reference formats vary between publication sources. But, the best rule is be con- sistent. • One popular method for references is to number them. The numbers are used in the body of the paper (eg, [14]), and the references are listed numerically at the end. • Another method is to list the author name and year (eg, [Yackish, 1997]) and then list the references at the end of the report. • Footnotes are not commonly used in engineering works. 23.4.7 Acknowledgments • When others have contributed to the work but are not listed as authors we may choose to recognize them. • Acknowledgments are brief statements that indicate who has contributed to a work. page 615 23.4.8 Appendices • When we have information that is needed to support a report, but is too bulky to include, one option is to add an appendix. • Examples of appendices include, - reviews of basic theory - sample calculations - long tables of materials data - program listings - long test results 23.5 GENERAL FORMATTING • Some general formatting items are, - number all pages sequentially, roman numerals starting from ‘i)’ on the first page arabic numerals starting from ‘1’ on the - or, number pages by section. This is very useful for multi part manuals for example ‘4-7’ would be the 7th page in the 4th section - if pages are blank label them ‘this page left blank’ - number sections sequentially with roman or Arabic numerals - • For numbers, - use engineering notation (move exponents 3 places) so that units are always micro, milli, kilo, mega, giga, etc. - use significant figures to round the numbers - units are required always • General English usage, - check spelling - note that you must read to double guess the smell checker. - check grammar - avoid informal phrases (e.g. “show me the money”) - define acronyms and jargon the first time you use them (e.g., IBM means “Ion Beam Manufacturing”) page 616 • General style rules, - keep it simple (especially the introduction) - most authors trying to be eloquent end up sounding long winded and pretentious. For example, “Electronic com- puter based digital readings can provided a highly accurate data source to improve the quality of the ascertained data.” could be replaced with “Computer based data collection is more accurate.” - get to the point and be concise. For example, “Readings of the pressure, as the probe was ascending up the chimney towards the top, were taken.” is better put “Pressure probe readings were taken as the probe was inserted”. - it is fine to say ‘I’ or ‘we’, but don’t get carried away. - don’t be afraid to reuse terms, phases or words if it is an exact description. For example, we could increase confusion by also describing translation as motion, movement, sliding, displacing, etc. • General engineering rules are, - all statements should be justified, avoid personal opinions or ‘gut feels’ - use exact engineering terms when needed, don’t try to get creative. page 617 24. MATHEMATICAL TOOLS ***** This contains additions and sections by Dr. Andrew Sterian. • We use math in almost every problem we solve. As a result the more relevant top- ics of mathematics are summarized here. • This is not intended for learning, but for reference. 24.1 INTRODUCTION • This section has been greatly enhanced, and tailored to meet our engineering requirements. • The section outlined here is not intended to teach the elements of mathematics, but it is designed to be a quick reference guide to support the engineer required to use techniques that may not have been used recently. • For those planning to write the first ABET Fundamentals of Engineering exam, the following topics are commonly on the exam. - quadratic equation - straight line equations - slop and perpendicular - conics, circles, ellipses, etc. - matrices, determinants, adjoint, inverse, cofactors, multiplication - limits, L’Hospital’s rule, small angle approximation - integration of areas - complex numbers, polar form, conjugate, addition of polar forms - maxima, minima and inflection points - first-order differential equations - guessing and separation - second-order differential equation - linear, homogeneous, non-homogeneous, second-order - triangles, sine, cosine, etc. - integration - by parts and separation - solving equations using inverse matrices, Cramer’s rule, substitution - eigenvalues, eigenvectors - dot and cross products, areas of parallelograms, angles and triple product - divergence and curl - solenoidal and conservative fields - centroids - integration of volumes page 618 - integration using Laplace transforms - probability - permutations and combinations - mean, standard deviation, mode, etc. - log properties - taylor series - partial fractions - basic coordinate transformations - cartesian, cylindrical, spherical - trig identities - derivative - basics, natural log, small angles approx., chain rule, partial fractions 24.1.1 Constants and Other Stuff • A good place to start a short list of mathematical relationships is with greek let- ters lower case α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ φ χ ψ ω upper case Α Β Γ ∆ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω name alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega page 619 Figure 429 The greek alphabet • The constants listed are amount some of the main ones, other values can be derived through calculation using modern calculators or computers. The values are typi- cally given with more than 15 places of accuracy so that they can be used for double preci- sion calculations. Figure 430 Some universal constants 24.1.2 Basic Operations • These operations are generally universal, and are described in sufficient detail for our use. • Basic properties include, Figure 431 Basic algebra properties e 2.7182818 1 1 n --- + ¸ , ¸ _ n n ∞ → lim natural logarithm base = = = π 3.1415927 pi = = γ 0.57721566 Eulers constant = = 1radian 57.29578° = a b + b a + = a b c + ( ) ab ac + = a bc ( ) ab ( )c = a b c + ( ) + a b + ( ) c + = commutative distributive associative page 620 24.1.2.1 - Factorial • A compact representation of a series of increasing multiples. Figure 432 The basic factorial operator 24.1.3 Exponents and Logarithms • The basic properties of exponents are so important they demand some sort of mention Figure 433 Properties of exponents • Logarithms also have a few basic properties of use, n! 1 2 3 4 … n ⋅ ⋅ ⋅ ⋅ ⋅ = 0! 1 = x n ( ) x m ( ) x n m + = x n ( ) x m ( ) ---------- x n m – = x n ( ) m x n m ⋅ = x 0 1 , if x is not 0 = x p – 1 x p ----- = xy ( ) n x n ( ) y n ( ) = x 1 n --- x n = x m n ---- x m n = x y -- n x n y n ------- = page 621 Figure 434 Definitions of logarithms • All logarithms observe a basic set of rules for their application, Figure 435 Properties of logarithms 24.1.4 Polynomial Expansions • Binomial expansion for polynomials, x log y = x 10 y = The basic base 10 logarithm: log n x y = x n y = The basic base n logarithm: x ln log e x y = = x e y = The basic natural logarithm (e is a constant with a value found near the start of this section: log n xy ( ) log n x ( ) log n y ( ) + = log n x y -- ¸ , ¸ _ log n x ( ) log n – y ( ) = log n x y ( ) ylog n x ( ) = log n x ( ) log m x ( ) log m n ( ) ------------------- = A θ ∠ ( ) ln A ( ) ln θ 2πk + ( )j + = k I ∈ log n 1 ( ) 0 = log n n ( ) 1 = page 622 Figure 436 A general expansion of a polynomial 24.1.5 Practice Problems 1. Are the following expressions equivalent? 2. Simplify the following expressions. a x + ( ) n a n na n 1 – x n n 1 – ( ) 2! --------------------a n 2 – x 2 … x n + + + + = A 5 B + ( ) C – 5A B C – + = a) A B + C D + -------------- A C ---- B D ---- + = b) ab ( ) log a ( ) log b ( ) log + = c) 5 5 4 ( ) 5 5 = d) 3 4 ( ) log 16 ( ) log = e) x 6 + ( ) x 6 – ( ) x 2 36 + = f) 10 5 ( ) log 10 5 ------ = g) x 1 + ( ) 6 x 1 + ( ) 2 ------------------- x 2 2x 1 + + = h) x x 2 + ( ) 2 3x – a) x 3 + ( ) x 1 + ( )x 2 x 1 + ( ) 2 x --------------------------------------- b) x 3 ( ) log c) 64 16 ------ d) 15 21 ------ 3 28 ------ + e) 5 3 --- 8 9 --- ¸ , ¸ _ h) 5 4 --- ¸ , ¸ _ 5 -------- i) y 4 + ( ) 3 y 2 – ( ) j) x 2 y k) x 1 + x 2 + ------------ 4 = l) x 2 y 3 ( ) 4 f) 4x 2 8y 4 – g) page 623 3. Simplify the following expressions. 4. Simplify the following expressions. A B + AB ------------- a) AB A B + ------------- b) x 4 y 5 ( ) x 2 --------------- ¸ , ¸ _ 3 c) x 5 ( ) log x 3 ( ) log + d) A B + AB ------------- A AB ------- B AB ------- + 1 B --- 1 A --- + = = a) AB A B + ------------- b) x 4 y 5 ( ) x 2 --------------- ¸ , ¸ _ 3 x 2 y 5 ( ) 3 x 6 y 15 = = c) x 5 ( ) log x 3 ( ) log + 5 x ( ) log 3 x ( ) log + 8 x ( ) log = = d) (ans. cannot be simplified n x 2 ( ) log m x 3 ( ) log x 4 ( ) log – + a) a) (ans. n x 2 ( ) log m x 3 ( ) log x 4 ( ) log – + 2n x ( ) log 3m x ( ) log 4 x ( ) log – + 2n 3m 4 – + ( ) x ( ) log 2n 3m 4 – + ( ) x ( ) log page 624 5. Rearrange the following equation so that only ‘y’ is on the left hand side. 6. Find the limits below. y x + y z + ----------- x 2 + = (ans. y x + y z + ----------- x 2 + = y x + x 2 + ( ) y z + ( ) = y x + xy xz 2y 2z + + + = y xy – 2y – xz 2z x – + = y x – 1 – ( ) xz 2z x – + = y xz 2z x – + x – 1 – -------------------------- = t 3 5 + 5t 3 1 + ---------------- ¸ , ¸ _ t 0 → lim t 3 5 + 5t 3 1 + ---------------- ¸ , ¸ _ t ∞ → lim a) b) t 3 5 + 5t 3 1 + ---------------- ¸ , ¸ _ t 0 → lim 0 3 5 + 5 0 ( ) 3 1 + ----------------------- 5 = = t 3 5 + 5t 3 1 + ---------------- ¸ , ¸ _ t ∞ → lim ∞ 3 5 + 5 ∞ ( ) 3 1 + ------------------------ ∞ 3 5 ∞ ( ) 3 -------------- 0.2 = = = a) b) (ans. page 625 24.2 FUNCTIONS 24.2.1 Discrete and Continuous Probability Distributions Figure 437 Distribution functions 24.2.2 Basic Polynomials • The quadratic equation appears in almost every engineering discipline, therefore is of great importance. Figure 438 Quadratic equation P m ( ) n t ¸ , ¸ _ p t q n t – t m ≤ ∑ = q 1 p – = q p 0 1 , [ ] ∈ , Binomial P m ( ) λ t e λ – t! ------------ t m ≤ ∑ = λ 0 > Poisson P m ( ) r t ¸ , ¸ _ s n t – ¸ , ¸ _ r s + n ¸ , ¸ _ ------------------------ t m ≤ ∑ = Hypergeometric P x ( ) 1 2π ---------- e t 2 – t d ∞ – x ∫ = Normal ax 2 bx c + + 0 a x r 1 – ( ) x r 2 – ( ) = = r 1 r 2 , b – b 2 4ac – t 2a -------------------------------------- = page 626 • Cubic equations also appear on a regular basic, and as a result should also be con- sidered. Figure 439 Cubic equations • On a few occasions a quartic equation will also have to be solved. This can be done by first reducing the equation to a quadratic, Figure 440 Quartic equations Q 3b a 2 – 9 ----------------- = x 3 ax 2 bx c + + + 0 x r 1 – ( ) x r 2 – ( ) x r 3 – ( ) = = R 9ab 27c – 2a 3 – 54 --------------------------------------- = S R Q 3 R 2 + + 3 = T R Q 3 R 2 + – 3 = r 1 S T a 3 --- – + = r 2 S T + 2 ------------ a 3 --- – j 3 2 --------- S T – ( ) + = r 3 S T + 2 ------------ a 3 -- - – j 3 2 --------- S T – ( ) – = First, calculate, Then the roots, y 3 by 2 – ac 4d – ( )y 4bd c 2 – a 2 d – ( ) + + 0 = x 4 ax 3 bx 2 cx d + + + + 0 x r 1 – ( ) x r 2 – ( ) x r 3 – ( ) x r 4 – ( ) = = First, solve the equation below to get a real root (call it ‘y’), Next, find the roots of the 2 equations below, r 1 r 2 , z 2 a a 2 4b – 4y + + 2 ------------------------------------------- ¸ , ¸ _ z y y 2 4d – + 2 ------------------------------ ¸ , ¸ _ + + 0 = = r 3 r 4 , z 2 a a 2 4b – 4y + – 2 ------------------------------------------- ¸ , ¸ _ z y y 2 4d – – 2 ------------------------------ ¸ , ¸ _ + + 0 = = page 627 24.2.3 Partial Fractions • The next is a flowchart for partial fraction expansions. Figure 441 The methodolgy for solving partial fractions • The partial fraction expansion for, start with a function that has a polynomial numerator and denominator is the order of the numerator >= denominator? yes no use long division to reduce the order of the numerator Find roots of the denominator and break the equation into partial fraction form with unknown values Done OR use algebra technique use limits technique. If there are higher order roots (repeated terms) then derivatives will be required to find solutions page 628 Figure 442 A partial fraction example • Consider the example below where the order of the numerator is larger than the denominator. x s ( ) 1 s 2 s 1 + ( ) --------------------- A s 2 ---- B s --- C s 1 + ----------- + + = = C s 1 + ( ) 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 1 – → lim 1 = = A s 2 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 0 → lim 1 s 1 + ----------- s 0 → lim 1 = = = B d ds ----- s 2 1 s 2 s 1 + ( ) --------------------- ¸ , ¸ _ s 0 → lim d ds ----- 1 s 1 + ----------- ¸ , ¸ _ s 0 → lim s 1 + ( ) 2 – – [ ] s 0 → lim 1 – = = = = page 629 Figure 443 Solving partial fractions when the numerator order is greater than the denominator • When the order of the denominator terms is greater than 1 it requires an expanded partial fraction form, as shown below. Figure 444 Partial fractions with repeated roots x s ( ) 5s 3 3s 2 8s 6 + + + s 2 4 + -------------------------------------------- = This cannot be solved using partial fractions because the numerator is 3rd order and the denominator is only 2nd order. Therefore long division can be used to reduce the order of the equation. s 2 4 + 5s 3 3s 2 8s 6 + + + 5s 3 + 5s 3 20s + 3s 2 12s – 6 + 3s 2 12 + 12s – 6 – This can now be used to write a new function that has a reduced portion that can be solved with partial fractions. x s ( ) 5s 3 12s – 6 – s 2 4 + ---------------------- + + = solve 12s – 6 – s 2 4 + ---------------------- A s 2j + ------------- B s 2j – ------------- + = F s ( ) 5 s 2 s 1 + ( ) 3 ------------------------ = 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = page 630 • We can solve the previous problem using the algebra technique. Figure 445 An algebra solution to partial fractions 24.2.4 Summation and Series • The notation is equivalent to assuming and are integers and . The index variable is a placeholder whose name does not matter. • Operations on summations: 5 s 2 s 1 + ( ) 3 ------------------------ A s 2 ---- B s --- C s 1 + ( ) 3 ------------------- D s 1 + ( ) 2 ------------------- E s 1 + ( ) ---------------- + + + + = A s 1 + ( ) 3 Bs s 1 + ( ) 3 Cs 2 Ds 2 s 1 + ( ) Es 2 s 1 + ( ) 2 + + + + s 2 s 1 + ( ) 3 ------------------------------------------------------------------------------------------------------------------------------------------ = s 4 B E + ( ) s 3 A 3B D 2E + + + ( ) s 2 3A 3B C D E + + + + ( ) s 3A B + ( ) A ( ) + + + + s 2 s 1 + ( ) 3 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- = 0 1 0 0 1 1 3 0 1 2 3 3 1 1 1 3 1 0 0 0 1 0 0 0 0 A B C D E 0 0 0 0 5 = A B C D E 0 1 0 0 1 1 3 0 1 2 3 3 1 1 1 3 1 0 0 0 1 0 0 0 0 1 – 0 0 0 0 5 5 15 – 5 10 15 = = 5 s 2 s 1 + ( ) 3 ------------------------ 5 s 2 ---- 15 – s --------- 5 s 1 + ( ) 3 ------------------- 10 s 1 + ( ) 2 ------------------- 15 s 1 + ( ) ---------------- + + + + = x i i a = b ∑ x a x a 1 + x a 2 + … x b + + + + a b b a ≥ i x i i a = b ∑ x i i b = a ∑ = page 631 • Some common summations: for both real and complex . for both real and complex . For , the summation does not converge. αx i i a = b ∑ α x i i a = b ∑ = x i i a = b ∑ y j j a = b ∑ + x i y i + ( ) i a = b ∑ = x i i a = b ∑ x i i b 1 + = c ∑ + x i i a = c ∑ = x i i a = b ∑ ¸ , ¸ _ y j j c = d ∑ ¸ , ¸ _ x i y j j c = d ∑ i a = b ∑ = i i 1 = N ∑ 1 2 --- N N 1 + ( ) = α i i 0 = N 1 – ∑ 1 α N – 1 α – ---------------- α 1 ≠ , N α , 1 = ¹ ¹ ' ¹ ¹ = α α i i 0 = ∞ ∑ 1 1 α – ------------ = α 1 < , α α 1 ≥ page 632 24.2.5 Practice Problems 1. Convert the following polynomials to multiplied terms as shown in the example. 2. Solve the following equation to find ‘x’. 3. Reduce the following expression to partial fraction form. x 2 2x 1 + + x 1 + ( ) x 1 + ( ) = a) e.g., x 2 2x – 1 + b) x 2 1 – c) x 2 1 + d) x 2 x 10 + + e) f) 2x 2 8x + 8 – = (ans. 2x 2 8x + 8 – = x 2 4x 4 + + 0 = x 2 + ( ) 2 0 = x 2 – 2 – , = x 4 + x 2 8x + ----------------- x 4 + x 2 8x + ----------------- x 4 + x x 8 + ( ) ------------------- A x --- B x 8 + ------------ + Ax 8A Bx + + x 2 8x + --------------------------------- = = = (ans. 1 ( )x 4 + A B + ( )x 8A + = 8A 4 = A 0.5 = 1 A B + = B 0.5 = x 4 + x 2 8x + ----------------- 0.5 x ------- 0.5 x 8 + ------------ + = page 633 24.3 SPATIAL RELATIONSHIPS 24.3.1 Trigonometry • The basic trigonometry functions are, • Graphs of these functions are given below, θ x y r θ sin y r -- 1 θ csc ----------- = = θ cos x r -- 1 θ sec ----------- = = θ tan y x -- 1 θ cot ----------- θ sin θ cos ------------ = = = Pythagorean Formula: r 2 x 2 y 2 + = 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 Sine - sin page 634 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 Cosine - cos Tangent - tan 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 Cosecant - csc 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 page 635 • NOTE: Keep in mind when finding these trig values, that any value that does not lie in the right hand quadrants of cartesian space, may need additions of ±90° or ±180°. Secant - sec 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 Cotangent -cot 0° 90° 180° 270° 360° -90° -180° -270° 450° 1 -1 page 636 • Now a group of trigonometric relationships will be given. These are often best used when attempting to manipulate equations. θ A θ B θ C a b c c 2 a 2 b 2 2ab θ c cos – + = Cosine Law: Sine Law: a θ A sin -------------- b θ B sin -------------- c θ C sin -------------- = = page 637 • These can also be related to complex exponents, 24.3.2 Hyperbolic Functions • The basic definitions are given below, θ – ( ) sin θ sin – = θ – ( ) cos θ cos = θ – ( ) tan θ tan – = θ 1 θ 2 t ( ) sin θ 1 θ 2 cos sin θ 1 cos θ 2 sin t = θ 1 θ 2 t ( ) cos θ 1 cos θ 2 cos θ 1 sin θ 2 sin + − = θ 1 θ 2 t ( ) tan θ 1 tan θ 2 tan t 1 θ 1 tan θ 2 tan + − ------------------------------------- = θ 1 θ 2 t ( ) cot θ 1 cot θ 2 cot 1 + − θ 2 tan θ 1 tan t ------------------------------------- = θ sin θ 90° – ( ) cos 90° θ – ( ) cos etc. = = = θ 2 --- sin 1 θ cos – 2 --------------------- t = θ 2 --- cos 1 θ cos + 2 --------------------- t = θ 2 --- tan θ sin 1 θ cos + --------------------- 1 θ cos – θ sin --------------------- = = -ve if in left hand quadrants θ cos ( ) 2 θ sin ( ) 2 + 1 = 2θ ( ) sin 2 θ θ cos sin = 2θ ( ) cos θ cos ( ) 2 θ sin ( ) 2 + = OR OR θ cos e jθ e j – θ + 2 ---------------------- = θ sin e jθ e j – θ – 2j --------------------- = page 638 • some of the basic relationships are, • Some of the more advanced relationships are, x ( ) sinh e x e x – – 2 ------------------ hyperbolic sine of x = = x ( ) cosh e x e x – + 2 ------------------ hyperbolic cosine of x = = x ( ) tanh x ( ) sinh x ( ) cosh ------------------- e x e x – – e x e x – + ------------------ hyperbolic tangent of x = = = x ( ) csch 1 x ( ) sinh ------------------ 2 e x e x – – ------------------ hyperbolic cosecant of x = = = x ( ) sech 1 x ( ) cosh ------------------- 2 e x e x – + ------------------ hyperbolic secant of x = = = x ( ) coth x ( ) cosh x ( ) sinh ------------------- e x e x – + e x e x – – ------------------ hyperbolic cotangent of x = = = x – ( ) sinh x ( ) sinh – = x – ( ) cosh x ( ) cosh = x – ( ) tanh x ( ) tanh – = x – ( ) csch x ( ) csch – = x – ( ) sech x ( ) sech = x – ( ) coth x ( ) coth – = page 639 • Some of the relationships between the hyperbolic, and normal trigonometry func- tions are, 24.3.2.1 - Practice Problems 1. Find all of the missing side lengths and corner angles on the two triangles below. 2. Simplify the following expressions. x y t ( ) sinh x ( ) y ( ) cosh sinh x ( ) y ( ) sinh cosh t = x y t ( ) cosh x ( ) y ( ) cosh cosh x ( ) y ( ) sinh sinh t = x y t ( ) tanh x ( ) tanh y ( ) tanh t 1 x ( ) y ( ) tanh tanh t ----------------------------------------------- = x cosh ( ) 2 x sinh ( ) 2 – x sech ( ) 2 x tanh ( ) 2 + x coth ( ) 2 x csch ( ) 2 – 1 = = = jx ( ) sin j x ( ) sinh = jx ( ) cos x ( ) cosh = jx ( ) tan j x ( ) tanh = j x ( ) sin jx ( ) sinh = x ( ) cos jx ( ) cosh = j x ( ) tan jx ( ) tanh = 10° 3 5 3 5 θ cos θ cos θ θ sin sin – = s 3j + ( ) s 3j – ( ) s 2j + ( ) 2 = page 640 3. Solve the following partial fraction 24.3.3 Geometry • A set of the basic 2D and 3D geometric primitives are given, and the notation used is described below, (ans. θ cos θ cos θ θ sin sin – θ θ + ( ) cos 2θ ( ) cos = = s 3j + ( ) s 3j – ( ) s 2j + ( ) 2 s 2 9j 2 – ( ) s 2 4js 4j 2 + + ( ) = s 4 4js 3 4j 2 s 2 9j 2 s 2 – 9j 2 4js – 9j 2 4j 2 – + + s 4 4j ( )s 3 5 ( )s 2 36j ( )s 36 – ( ) + + + + 4 x 2 3x 2 + + -------------------------- = Note: there was a typo here, so an acceptable answer is also. 1 x 0.5 + ---------------- 4 x 2 3x 2 + + -------------------------- A x 1 + ------------ B x 2 + ------------ + Ax 2A Bx B + + + x 2 3x 2 + + ------------------------------------------- 2A B + ( ) A B + ( )x + x 2 3x 2 + + ------------------------------------------------- = = = (ans. 2A B + 4 2B – B + B – = = = A B + 0 = A B – = B 4 – = A 4 = 4 x 1 + ------------ 4 – x 2 + ------------ + A contained area = P perimeter distance = V contained volume = S surface area = x y z , , centre of mass = x y z , , centroid = I x I y I z , , moment of inertia of area (or second moment of inertia) = page 641 I x y 2 A d A ∫ the second moment of inertia about the y-axis = = I y x 2 A d A ∫ the second moment of inertia about the x-axis = = I xy xy A d A ∫ the product of inertia = = J O r 2 A d A ∫ x 2 y 2 + ( ) A d A ∫ I x I y + The polar moment of inertia = = = = x x A d A ∫ A d A ∫ ------------- centroid location along the x-axis = = y y A d A ∫ A d A ∫ ------------- centroid location along the y-axis = = AREA PROPERTIES: page 642 Rectangle/Square: a b I x ba 3 12 -------- = A ab = P 2a 2b + = Centroid: Moment of Inertia x b 2 --- = y a 2 --- = I y b 3 a 12 -------- = x y I x ba 3 3 -------- = Moment of Inertia I y b 3 a 3 -------- = I xy 0 = I xy b 2 a 2 4 ----------- = (about centroid axes): (about origin axes): page 643 Triangle: a b I x bh 3 36 -------- = A bh 2 ------ = P = Centroid: Moment of Inertia x a b + 3 ------------ = y h 3 --- = I y bh 36 ------ a 2 b 2 ab – + ( ) = h θ x y I x bh 3 12 -------- = Moment of Inertia I y bh 12 ------ a 2 b 2 ab – + ( ) = I xy bh 2 72 -------- 2a b – ( ) = I xy bh 2 24 -------- 2a b – ( ) = (about centroid axes): (about origin axes): Circle: I x πr 4 4 -------- = A πr 2 = P 2πr = Centroid: Moment of Inertia x r = y r = I y πr 4 4 -------- = r x y I x = Moment of Inertia I y = I xy 0 = I xy = (about centroid axes): (about origin axes): J z Mr 2 2 ---------- = Mass Moment of Inertia (about centroid): page 644 Half Circle: I x π 8 --- 8 9π ------ – ¸ , ¸ _ r 4 = A πr 2 2 -------- = P πr 2r + = Centroid: Moment of Inertia x r = y 4r 3π ------ = I y πr 4 8 -------- = x y r I x πr 4 8 -------- = Moment of Inertia I y πr 4 8 -------- = I xy 0 = I xy 0 = (about centroid axes): (about origin axes): r Quarter Circle: I x 0.05488r 4 = A πr 2 4 -------- = P πr 2 ----- 2r + = Centroid: Moment of Inertia x 4r 3π ------ = y 4r 3π ------ = I y 0.05488r 4 = x y I x πr 4 16 -------- = Moment of Inertia I y πr 4 16 -------- = I xy 0.01647 – r 4 = I xy r 4 8 ---- = (about centroid axes): (about origin axes): page 645 r Circular Arc: I x = A θr 2 2 -------- = P θr 2r + = Centroid: Moment of Inertia x 2r θ 2 --- sin 3θ ----------------- = y 0 = I y = x y θ I x r 4 8 ---- θ θ sin – ( ) = Moment of Inertia I y r 4 8 ---- θ θ sin + ( ) = I xy = I xy 0 = (about centroid axes): (about origin axes): page 646 Ellipse: I x πr 1 3 r 2 4 ------------- = A πr 1 r 2 = P 4r 1 1 r 1 2 r 2 2 + a -------------------- θ sin ( ) 2 – 0 π 2 --- ∫ dθ = Centroid: Moment of Inertia x r 2 = y r 1 = I y πr 1 r 2 3 4 ------------- = r 1 x y r 2 P 2π r 1 2 r 2 2 + 2 ---------------- ≈ I x = Moment of Inertia I y = I xy = I xy = (about centroid axes): (about origin axes): page 647 Half Ellipse: I x 0.05488r 2 r 1 3 = A πr 1 r 2 2 ------------- = P 2r 1 1 r 1 2 r 2 2 + a -------------------- θ sin ( ) 2 – 0 π 2 --- ∫ dθ 2r 2 + = Centroid: Moment of Inertia x r 2 = y 4r 1 3π -------- = I y 0.05488r 2 3 r 1 = r 1 x y r 2 P π r 1 2 r 2 2 + 2 ---------------- 2r 2 + ≈ I x πr 2 r 1 3 16 ------------- = Moment of Inertia I y πr 2 3 r 1 16 ------------- = I xy 0.01647r 1 2 r 2 2 – = I xy r 1 2 r 2 2 8 --------- = (about centroid axes): (about origin axes): page 648 Quarter Ellipse: I x = A πr 1 r 2 4 ------------- = P r 1 1 r 1 2 r 2 2 + a -------------------- θ sin ( ) 2 – 0 π 2 --- ∫ dθ 2r 2 + = Centroid: Moment of Inertia x 4r 2 3π -------- = y 4r 1 3π -------- = I y = r 1 x y r 2 P π 2 --- r 1 2 r 2 2 + 2 ---------------- 2r 2 + ≈ (about centroid axes): I x πr 2 r 1 3 = Moment of Inertia I y πr 2 3 r 1 = (about origin axes): I xy = I xy r 2 2 r 1 2 8 --------- = Parabola: I x = A 2 3 --- ab = P b 2 16a 2 + 2 --------------------------- b 2 8a ------ 4a b 2 16a 2 + + b ---------------------------------------- ¸ , ¸ _ ln + = Centroid: Moment of Inertia x b 2 --- = y 2a 5 ------ = I y = a x y b (about centroid axes): I x = Moment of Inertia I y = (about origin axes): I xy = I xy = page 649 • A general class of geometries are conics. This for is shown below, and can be used to represent many of the simple shapes represented by a polynomial. Half Parabola: I x 8ba 3 175 ------------ = A ab 3 ------ = P b 2 16a 2 + 4 --------------------------- b 2 16a --------- 4a b 2 16a 2 + + b ---------------------------------------- ¸ , ¸ _ ln + = Centroid: Moment of Inertia x 3b 8 ------ = y 2a 5 ------ = I y 19b 3 a 480 --------------- = a x y b I x 2ba 3 7 ------------ = Moment of Inertia I y 2b 3 a 15 ------------ = I xy b 2 a 2 60 ----------- = I xy b 2 a 2 6 ----------- = (about centroid axes): (about origin axes): page 650 Ax 2 2Bxy Cy 2 2Dx 2Ey F + + + + + 0 = Conditions A B C 0 = = = straight line B 0 A , C = = circle B 2 AC – 0 < ellipse B 2 AC – 0 = parabola B 2 AC – 0 > hyperbola page 651 I x r x 2 V d V ∫ the moment of inertia about the x-axi s = = I y r y 2 V d V ∫ the moment of inertia about the y-axi s = = x x V d V ∫ V d V ∫ ------------- centroid location along the x-axis = = y y V d V ∫ V d V ∫ ------------- centroid location along the y-axis = = VOLUME PROPERTIES: I z r z 2 V d V ∫ the moment of inertia about the z-axis = = z z V d V ∫ V d V ∫ ------------- centroid location along the z-axis = = page 652 Parallelepiped (box): I x M a 2 b 2 + ( ) 12 --------------------------- = V abc = S 2 ab ac bc + + ( ) = Centroid: Moment of Inertia x a 2 -- - = y b 2 --- = I y M a 2 c 2 + ( ) 12 --------------------------- = c x y a b z c 2 --- = I z M b 2 a 2 + ( ) 12 --------------------------- = z (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): J x = Mass Moment of Inertia J y = J z = (about centroid): Sphere: I x 2Mr 2 5 ------------- = V 4 3 --- πr 3 = S 4πr 2 = Centroid: Moment of Inertia x r = y r = I y 2Mr 2 5 ------------- = x y r z r = I z 2Mr 2 5 ------------- = z (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): J x 2Mr 2 5 ------------- = Mass Moment of Inertia J y 2Mr 2 5 ------------- = J z 2Mr 2 5 ------------- = (about centroid): page 653 Hemisphere: I x 83 320 -------- -Mr 2 = V 2 3 --- πr 3 = S = Centroid: Moment of Inertia x r = y 3r 8 ----- = I y 2Mr 2 5 ------------- = x y r z r = I z 83 320 -------- - Mr 2 = z (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): Cap of a Sphere: I x = V 1 3 --- πh 2 3r h – ( ) = S 2πrh = Centroid: Moment of Inertia x r = y = I y = x y r z r = I z = z h (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): page 654 Cylinder: I x M h 2 12 ------ r 2 4 ---- + ¸ , ¸ _ = V hπr 2 = S 2πrh 2πr 2 + = Centroid: Moment of Inertia x r = y h 2 --- = I y Mr 2 2 ---------- = x y r z r = I z M h 2 12 ------ r 2 4 ---- + ¸ , ¸ _ = z h (about centroid axis): I x M h 2 3 ----- r 2 4 ---- + ¸ , ¸ _ = Moment of Inertia I y = I z M h 2 3 ----- r 2 4 ---- + ¸ , ¸ _ = (about origin axis): J x M 3r 2 h 2 + ( ) 12 ------------------------------ = Mass Moment of Inertia J y Mr 2 2 ---------- = J z M 3r 2 h 2 + ( ) 12 ------------------------------ = (about centroid): Cone: I x M 3h 3 80 -------- 3r 2 20 -------- + ¸ , ¸ _ = V 1 3 --- πr 2 h = S πr r 2 h 2 + = Centroid: Moment of Inertia x r = y h 4 --- = I y 3Mr 2 10 ------------- = x y r z r = I z M 3h 3 80 -------- 3r 2 20 -------- + ¸ , ¸ _ = z h (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): page 655 Tetrahedron: I x = V 1 3 --- Ah = Centroid: Moment of Inertia x = y h 4 --- = I y = x y z = I z = z h A (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): Torus: I x = V 1 4 --- π 2 r 1 r 2 + ( ) r 2 r 1 – ( ) 2 = S π 2 r 2 2 r 1 2 – ( ) = Centroid: Moment of Inertia x r 2 = y r 2 r 1 – 2 --------------- ¸ , ¸ _ = I y = x y r 1 z r 2 = I z = z r 2 (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): page 656 Ellipsoid: I x = V 4 3 --- πr 1 r 2 r 3 = S = Centroid: Moment of Inertia x r 1 = y r 2 = I y = x y r 1 z r 3 = I z = z r 2 r 3 (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): Paraboloid: I x = V 1 2 --- πr 2 h = S = Centroid: Moment of Inertia x r = y = I y = x y r z r = I z = z h (about centroid axes): I x = Moment of Inertia I y = I z = (about origin axes): page 657 24.3.4 Planes, Lines, etc. • The most fundamental mathematical geometry is a line. The basic relationships are given below, • If we assume a line is between two points in space, and that at one end we have a local reference frame, there are some basic relationships that can be derived. m y 2 y 1 – x 2 x 1 – ---------------- = the slope using two points m perpendicular 1 m ---- = a slope perpendicular to a line y mx b + = defined with a slope and intercept x a --- y b -- - + 1 = as defined by two intercepts page 658 • The relationships for a plane are, x 2 y 2 z 2 , , ( ) x 1 y 1 z 1 , , ( ) x 0 y 0 z 0 , , ( ) x y z θ α θ β θ γ d d x 2 x 1 – ( ) 2 y 2 y 1 – ( ) 2 z 2 z 1 – ( ) 2 + + = θ α x 2 x 1 – d ---------------- ¸ , ¸ _ acos = θ β y 2 y 1 – d ---------------- ¸ , ¸ _ acos = θ γ z 2 z 1 – d --------------- ¸ , ¸ _ acos = θ α cos ( ) 2 θ β cos ( ) 2 θ γ cos ( ) 2 + + 1 = x x 1 – x 2 x 1 – ---------------- y y 1 – y 2 y 1 – ---------------- z z 1 – z 2 z 1 – --------------- = = The direction cosines of the angles are, The equation of the line is, x y z , , ( ) x 1 y 1 z 1 , , ( ) t x 2 y 2 z 2 , , ( ) x 1 y 1 z 1 , , ( ) – ( ) + = Explicit Parametric t=[0,1] page 659 24.3.5 Practice Problems 1. What is the circumferenece of a circle? What is the area? What is the ratio of the area to the cir- cumference? N x y z a b c The explicit equation for a plane is, Ax By Cz D + + + 0 = A 1 a --- = B 1 b --- = C 1 c -- - = D 1 – = where the coefficients defined by the intercepts are, P 1 x 1 y 1 z 1 , , ( ) = P 3 x 3 y 3 z 3 , , ( ) = P 2 x 2 y 2 z 2 , , ( ) = The determinant can also be used, det x x 1 – y y 1 – z z 1 – x x 2 – y y 2 – z z 2 – x x 3 – y y 3 – z z 3 – 0 = det y 2 y 1 – z 2 z 1 – y 3 y 1 – z 3 z 1 – x x 1 – ( ) det z 2 z 1 – x 2 x 1 – z 3 z 1 – x 3 x 1 – y y 1 – ( ) + ∴ det x 2 x 1 – y 2 y 1 – x 3 x 1 – y 3 y 1 – z z 1 – ( ) + 0 = The normal to the plane (through the origin) is, x y z , , ( ) t A B C , , ( ) = page 660 2. What is the equation of a line that passes through the points below? 3. Find a line that is perpendicular to the line through the points (2, 1) and (1, 2). The perpendicu- lar line passes through (3, 5). 4. Manipulate the following equations to solve for ‘x’. 5. Simplify the following expressions. a) (0, 0) to (2, 2) b) (1, 0) to (0, 1) c) (3, 4) to (2. 9) x 2 3x + 2 – = a) x sin x cos = b) x 2 3x + 2 – = a) x sin x cos = b) (ans. x 2 3x 2 + + 0 = x 3 – 3 2 4 1 ( ) 2 ( ) – t 2 1 ( ) ------------------------------------------------ 3 – 9 8 – t 2 ----------------------------- - 3 – 1 t 2 ---------------- 1 – 2 – , = = = = x sin x cos ----------- 1 = x tan 1 = x 1 atan = x … 135° – 45° 225° … , , , , = 2θ sin 2θ cos ( ) 2 2θ sin ---------------------- 2θ sin + ¸ , ¸ _ a) 2θ sin 2θ cos ( ) 2 2θ sin ---------------------- 2θ sin + ¸ , ¸ _ 2θ cos ( ) 2 2θ sin ( ) 2 + 1 = = a) (ans. page 661 6. A line that passes through the point (1, 2) and has a slope of 2. Find the equation for the line, and for a line perpendicular to it. 24.4 COORDINATE SYSTEMS 24.4.1 Complex Numbers • In this section, as in all others, ‘j’ will be the preferred notation for the complex number, this is to help minimize confusion with the ‘i’ used for current in electrical engi- neering. • The basic algebraic properties of these numbers are, (ans. y mx b + = m 2 = given, x 1 = y 2 = 2 2 1 ( ) b + = substituting y 2x = b 0 = m perp 1 m ---- – 0.5 – = = perpendicular y 0.5 – x = page 662 • We can also show complex numbers graphically. These representations lead to alternative representations. If it in not obvious above, please consider the notation above uses a cartesian notation, but a polar notation can also be very useful when doing large cal- culations. j 1 – = j 2 1 – = The Complex Number: a bj + Complex Numbers: where, a and b are both real numbers N a bj + = Complex Conjugates (denoted by adding an asterisk ‘*’ the variable): N* a bj – = a bj + ( ) c dj + ( ) + a c + ( ) b d + ( )j + = Basic Properties: a bj + ( ) c dj + ( ) – a c – ( ) b d – ( )j + = a bj + ( ) c dj + ( ) ⋅ ac bd – ( ) ad bc + ( )j + = N M ----- a bj + c dj + -------------- N M ---- - N* N* ------- ¸ , ¸ _ a bj + c dj + -------------- ¸ , ¸ _ c dj – c dj – ------------- ¸ , ¸ _ ac bd + c 2 d 2 + ------------------ bc ad – c 2 d 2 + ------------------ ¸ , ¸ _ j + = = = = page 663 • We can also do calculations using polar notation (this is well suited to multiplica- tion and division, whereas cartesian notation is easier for addition and subtraction), CARTESIAN FORM real imaginary (j) R Ij N R Ij + = POLAR FORM real imaginary (j) R Ij N A θ ∠ = θ A R 2 I 2 + = θ I R --- ¸ , ¸ _ atan = R A θ cos = I A θ sin = A amplitude = θ phase angl e = page 664 • Note that DeMoivre’s theorem can be used to find exponents (including roots) of complex numbers • Euler’s formula: • From the above, the following useful identities arise: 24.4.2 Cylindrical Coordinates • Basically, these coordinates appear as if the cartesian box has been replaced with a cylinder, A 1 θ 1 ∠ ( ) A 2 θ 2 ∠ ( ) --------------------- A 1 A 2 ------ ¸ , ¸ _ θ 1 θ 2 – ( ) ∠ = A 1 θ 1 ∠ ( ) A 2 θ 2 ∠ ( ) A 1 A 2 ( ) θ 1 θ 2 + ( ) ∠ = A θ ∠ ( ) n A n ( ) nθ ( ) ∠ = (DeMoivre’s theorem) A θ ∠ A θ cos j θ sin + ( ) Ae jθ = = e jθ θ cos j θ sin + = θ cos e jθ e jθ – + 2 ---------------------- = θ sin e jθ e jθ – – 2j --------------------- = page 665 24.4.3 Spherical Coordinates • This system replaces the cartesian box with a sphere, y z x z x y z z r θ x y z , , ( ) r θ z , , ( ) ↔ x r θ cos = y r θ sin = r x 2 y 2 + = θ y x -- ¸ , ¸ _ atan = page 666 24.4.4 Practice Problems 1. Simplify the following expressions. y z x z x y z r θ x y z , , ( ) r θ φ , , ( ) ↔ x r θ φ cos sin = y r θ φ sin sin = r x 2 y 2 z 2 + + = θ y x -- ¸ , ¸ _ atan = φ z r θ cos = φ z r -- ¸ , ¸ _ acos = 16 4j 4 + ( ) 2 --------------------- a) 3j 5 + 4j 3 + ( ) 2 --------------------- b) 3 5j + ( )4j c) j 1 – = where, page 667 2. For the shape defined below, 24.5 MATRICES AND VECTORS 24.5.1 Vectors • Vectors are often drawn with arrows, as shown below, 16 4j 4 + ( ) 2 --------------------- 16 16 – 32j 16 + + ------------------------------------- 16 32j ------- - 0.5j – = = = a) (ans. 3j 5 + 4j 3 + ( ) 2 --------------------- 3j 5 + 16 – 24j 9 + + ---------------------------------- 3j 5 + 7 – 24j + --------------------- 7 – 24j – 7 – 24j – --------------------- ¸ , ¸ _ 35 – 141j – 72 + 49 576 + --------------------------------------- 37 141j – 625 ----------------------- = = = = b) 3 5j + ( )4j 12j 20j 2 + 12j 20 – = = c) y x 2 + ( ) 2 = x y 4 a) find the area of the shape. b) find the centroid of the shape. c) find the moment of inertia of the shape about the centroid. origin tail head terminus A vector is said to have magnitude (length or strength) and direction. page 668 • Cartesian notation is also a common form of usage. • Vectors can be added and subtracted, numerically and graphically, 24.5.2 Dot (Scalar) Product • We can use a dot product to find the angle between two vectors x y z x y z i j k i j k becomes A 2 3 4 , , ( ) = B 7 8 9 , , ( ) = A B + 2 7 + 3 8 + 4 9 + , , ( ) = A B – 2 7 – 3 8 – 4 9 – , , ( ) = Parallelogram Law A A B B A+B page 669 • We can use a dot product to project one vector onto another vector. • We can consider the basic properties of the dot product and units vectors. F 1 2i 4j + = F 2 5i 3j + = x y θ cos F 1 F 2 • F 1 F 2 ------------------ = θ ∴ 2 ( ) 5 ( ) 4 ( ) 3 ( ) + 2 2 4 2 + 5 2 3 2 + ------------------------------------------- ¸ , ¸ _ acos = θ ∴ 22 4.47 ( ) 6 ( ) ----------------------- ¸ , ¸ _ acos 32.5° = = θ F 1 3i – 4j 5k + + ( )N = V 1j 1k + = x y z We want to find the component of force F 1 that projects onto the vector V. To do this we first con- vert V to a unit vector, if we do not, the component we find will be multiplied by the magnitude of V. λ V V V ------ 1j 1k + 1 2 1 2 + --------------------- 0.707j 0.707k + = = = F 1 V λ V F 1 • 0.707j 0.707k + ( ) 3i – 4j 5k + + ( )N • = = F 1 V ∴ 0 ( ) 3 – ( ) 0.707 ( ) 4 ( ) 0.707 ( ) 5 ( ) + + 6N = = V F 1 F 1 V page 670 Unit vectors are useful when breaking up vector magnitudes and direction. As an exam- ple consider the vector, and the displaced x-y axes shown below as x’-y’. x y x’ y’ 45° 60° F 10N = We could write out 5 vectors here, relative to the x-y axis, x axis 2i = y axis 3j = x‘ axis 1i 1j + = y‘ axis 1i – 1j + = F 10N 60° ∠ 10 60° cos ( )i 10 60° sin ( )j + = = None of these vectors has a magnitude of 1, and hence they are not unit vectors. But, if we find the equivalent vectors with a magnitude of one we can simplify many tasks. In particular if we want to find the x and y components of F relative to the x-y axis we can use the dot product. λ x 1i 0j + = (unit vector for the x-axis) F x λ x F • 1i 0j + ( ) 10 60° cos ( )i 10 60° sin ( )j + [ ] • = = ∴ 1 ( ) 10 60° cos ( ) 0 ( ) 10 60° sin ( ) + 10N 60° cos = = This result is obvious, but consider the other obvious case where we want to project a vector onto itself, page 671 λ F F F ------ 10 60°i cos 10 60°j sin + 10 --------------------------------------------------------- 60°i cos 60°j sin + = = = Incorrect - Not using a unit vector F F F F • = 10 60° cos ( )i 10 60° sin ( )j + ( ) 10 60° cos ( )i 10 60° sin ( )j + ( ) • = 10 60° cos ( ) 10 60° cos ( ) 10 60° sin ( ) 10 60° sin ( ) + = 100 60° cos ( ) 2 60° sin ( ) 2 + ( ) 100 = = Using a unit vector F F F λ F • = 10 60° cos ( )i 10 60° sin ( )j + ( ) 60° cos ( )i 60° sin ( )j + ( ) • = 10 60° cos ( ) 60° cos ( ) 10 60° sin ( ) 60° sin ( ) + = 10 60° cos ( ) 2 60° sin ( ) 2 + ( ) 10 = = Correct Now consider the case where we find the component of F in the x’ direction. Again, this can be done using the dot product to project F onto a unit vector. u x' 45°i cos 45°j sin + = F x' F λ x' • 10 60° cos ( )i 10 60° sin ( )j + ( ) 45° cos ( )i 45° sin ( )j + ( ) • = = 10 60° cos ( ) 45° cos ( ) 10 60° sin ( ) 45° sin ( ) + = 10 60° 45° cos cos 60° 45° sin sin + ( ) 10 60° 45° – ( ) cos ( ) = = Here we see a few cases where the dot product has been applied to find the vector pro- jected onto a unit vector. Now finally consider the more general case, page 672 V 1 V 2 θ 1 θ 2 x y V 2 V1 V 2 V1 V 2 θ 2 θ 1 – ( ) cos = Next, we can manipulate this expression into the dot product form, First, by inspection, we can see that the component of V 2 (projected) in the direction of V 1 will be, V 2 θ 1 θ 2 cos cos θ 1 θ 2 sin sin + ( ) = V 2 θ 1 i cos θ 1 j sin + ( ) θ 2 i cos θ 2 j sin + ( ) • [ ] = V 2 V 1 V 1 --------- V 2 V 2 --------- • V 2 V 1 V 2 • V 1 V 2 ------------------ V 1 V 2 • V 1 ------------------ V 2 λ V 1 • = = = = Or more generally, V 2 V1 V 2 θ 2 θ 1 – ( ) cos V 2 V 1 V 2 • V 1 V 2 ------------------ = = V 2 ∴ θ 2 θ 1 – ( ) cos V 2 V 1 V 2 • V 1 V 2 ------------------ = θ 2 θ 1 – ( ) cos ∴ V 1 V 2 • V 1 V 2 ------------------ = *Note that the dot product also works in 3D, and similar proofs are used. page 673 24.5.3 Cross Product • First, consider an example, • The basic properties of the cross product are, F 6.43i – 7.66j 0k + + ( )N = d 2i 0j 0k + + ( )m = M d F × i j k 2m 0m 0m 6.43N – 7.66N 0N = = NOTE: note that the cross prod- uct here is for the right hand rule coordinates. If the left handed coordinate system is used F and d should be reversed. M ∴ 0m0N 0m 7.66N ( ) – ( )i 2m0N 0m 6.43N – ( ) – ( ) – j + = 2m 7.66N ( ) 0m 6.43N – ( ) – ( )k 15.3k mN ( ) = NOTE: there are two things to note about the solution. First, it is a vector. Here there is only a z component because this vector points out of the page, and a rotation about this vector would rotate on the plane of the page. Second, this result is positive, because the positive sense is defined by the vector system. In this right handed system find the positive rotation by pointing your right hand thumb towards the positive axis (the ‘k’ means that the vector is about the z-axis here), and curl your fingers, that is the positive direction. page 674 • When using a left/right handed coordinate system, • The properties of the cross products are, The cross (or vector) product of two vectors will yield a new vector perpendicular to both vectors, with a magnitude that is a product of the two magnitudes. V 1 V 2 V 1 V 2 × V 1 V 2 × y 1 z 2 z 1 y 2 – ( )i z 1 x 2 x 1 z 2 – ( )j x 1 y 2 y 1 x 2 – ( )k + + = V 1 V 2 × i j k x 1 y 1 z 1 x 2 y 2 z 2 = V 1 V 2 × x 1 i y 1 j z 1 k + + ( ) x 2 i y 2 j z 2 k + + ( ) × = We can also find a unit vector normal ‘n’ to the vectors ‘V1’ and ‘V2’ using a cross product, divided by the magnitude. λ n V 1 V 2 × V 1 V 2 × --------------------- = The positive orientation of angles and moments about an axis can be determined by pointing the thumb of the right hand along the axis of rotation. The fingers curl in the positive direction. x y z + z x y + y z x + page 675 24.5.4 Triple Product 24.5.5 Matrices • Matrices allow simple equations that drive a large number of repetitive calcula- tions - as a result they are found in many computer applications. • A matrix has the form seen below, The cross product is distributive, but not associative. This allows us to collect terms in a cross product operation, but we cannot change the order of the cross product. r 1 F × r 2 F × + r 1 r 2 + ( ) F × = DISTRIBUTIVE r F × F r × ( ) – = NOT ASSOCIATIVE r F × F r × ≠ but When we want to do a cross product, followed by a dot product (called the mixed triple product), we can do both steps in one operation by finding the determinant of the follow- ing. An example of a problem that would use this shortcut is when a moment is found about one point on a pipe, and then the moment component twisting the pipe is found using the dot product. d F × ( ) u • u x u y u z d x d y d z F x F y F z = page 676 • Matrix operations are available for many of the basic algebraic expressions, examples are given below. There are also many restrictions - many of these are indicated. a 11 a 21 … a n1 a 12 a 22 … a n2 … … … … a 1m a 2m … a nm n columns m rows If n=m then the matrix is said to be square. Many applications require square matrices. We may also represent a matrix as a 1-by-3 for a vector. A 2 = B 3 4 5 6 7 8 9 10 11 = C 12 13 14 15 16 17 18 19 20 = D 21 22 23 = E 24 25 26 = A B + 3 2 + 4 2 + 5 2 + 6 2 + 7 2 + 8 2 + 9 2 + 10 2 + 11 2 + = B D + not valid = B C + 3 12 + 4 13 + 5 14 + 6 15 + 7 16 + 8 17 + 9 18 + 10 19 + 11 20 + = Addition/Subtraction B A – 3 2 – 4 2 – 5 2 – 6 2 – 7 2 – 8 2 – 9 2 – 10 2 – 11 2 – = B D – not valid = B C + 3 12 – 4 13 – 5 14 – 6 15 – 7 16 – 8 17 – 9 18 – 10 19 – 11 20 – = page 677 A B ⋅ 3 2 ( ) 4 2 ( ) 5 2 ( ) 6 2 ( ) 7 2 ( ) 8 2 ( ) 9 2 ( ) 10 2 ( ) 11 2 ( ) = D E ⋅ 21 24 22 25 23 26 ⋅ + ⋅ + ⋅ = Multiplication/Division B D ⋅ 3 21 4 22 5 23 ⋅ + ⋅ + ⋅ ( ) 6 21 7 22 8 23 ⋅ + ⋅ + ⋅ ( ) 9 21 10 22 11 23 ⋅ + ⋅ + ⋅ ( ) = B A --- 3 2 -- - 4 2 --- 5 2 -- - 6 2 -- - 7 2 --- 8 2 -- - 9 2 -- - 10 2 ----- - 11 2 ----- - = B C ⋅ 3 12 4 15 5 18 ⋅ + ⋅ + ⋅ ( ) 3 13 4 16 5 19 ⋅ + ⋅ + ⋅ ( ) 3 14 4 17 5 20 ⋅ + ⋅ + ⋅ ( ) 6 12 7 15 8 18 ⋅ + ⋅ + ⋅ ( ) 6 13 7 16 8 19 ⋅ + ⋅ + ⋅ ( ) 6 14 7 17 8 20 ⋅ + ⋅ + ⋅ ( ) 9 12 10 15 11 18 ⋅ + ⋅ + ⋅ ( ) 9 13 10 16 11 19 ⋅ + ⋅ + ⋅ ( ) 9 14 10 17 11 20 ⋅ + ⋅ + ⋅ ( ) = Note: To multiply matrices, the first matrix must have the same number of columns as the second matrix has rows. B C ---- B D ---- D B ---- etc , , , not allowed (see inverse) = page 678 B 3 7 8 10 11 4 6 8 9 11 5 6 7 9 10 ⋅ + ⋅ – ⋅ 3 3 – ( ) 4 6 – ( ) 5 3 – ( ) ⋅ + ⋅ – ⋅ 0 = = = D E , not valid (matrices not square) = Determinant 7 8 10 11 7 11 ⋅ ( ) 8 10 ⋅ ( ) – 3 – = = 6 8 9 11 6 11 ⋅ ( ) 8 9 ⋅ ( ) – 6 – = = 6 7 9 10 6 10 ⋅ ( ) 7 9 ⋅ ( ) – 3 – = = B T 3 6 9 4 7 10 5 8 11 = E T 24 25 26 = D T 21 22 23 = Transpose page 679 B 7 8 10 11 6 8 10 11 – 6 7 9 10 4 5 10 11 – 3 5 9 11 3 4 9 10 – 4 5 7 8 3 5 6 8 – 3 4 6 7 T = Adjoint D invalid (must be square) = The matrix of determinant to the left is made up by get- ting rid of the row and col- umn of the element, and then finding the determi- nant of what is left. Note the sign changes on alter- nating elements. B 1 – B B --------- = Inverse D 1 – invalid (must be square) = In this case B is singular, so the inverse is undetermined, and the matrix is indeterminate. D B x y z ⋅ = To solve this equation for x,y,z we need to move B to the left hand side. To do this we use the inverse. B 1 – D B 1 – B x y z ⋅ ⋅ = B 1 – D I x y z ⋅ x y z = = page 680 • The eigenvalue of a matrix is found using, 24.5.6 Solving Linear Equations with Matrices • We can solve systems of equations using the inverse matrix, B I ⋅ I B ⋅ B = = 1 1 0 0 1 1 0 0 0 1 0 0 0 1 etc=I , , , B 1 – B ⋅ I = Identity Matrix This is a square matrix that is the matrix equivalent to ‘1’. D I ⋅ I D ⋅ D = = A λI – 0 = 2 x 4 y 3 z ⋅ + ⋅ + ⋅ 5 = 9 x 6 y 8 z ⋅ + ⋅ + ⋅ 7 = 11 x 13 y 10 z ⋅ + ⋅ + ⋅ 12 = 2 4 3 9 6 8 11 13 10 x y z 5 7 12 = Write down the matrix, then rearrange, and solve. Given, x y z ∴ 2 4 3 9 6 8 11 13 10 1 – 5 7 12 = = page 681 • We can solve systems of equations using Cramer’s rule (with determinants), 24.5.7 Practice Problems 1. Perform the matrix operations below. 2 x 4 y 3 z ⋅ + ⋅ + ⋅ 5 = 9 x 6 y 8 z ⋅ + ⋅ + ⋅ 7 = 11 x 13 y 10 z ⋅ + ⋅ + ⋅ 12 = A 2 4 3 9 6 8 11 13 10 = Write down the coefficient and parameter matrices, Given, x 5 4 3 7 6 8 12 13 10 A ------------------------------ = = B 5 7 12 = Calculate the determinant for A (this will be reused), and calculate the determinants for matrices below. Note: when trying to find the first parameter ‘x’ we replace the first column in A with B. y 2 5 3 9 7 8 11 12 10 A ------------------------------ = = z 2 4 5 9 6 7 11 13 12 A ------------------------------ = = page 682 2. Perform the vector operations below, 4. Solve the following equations using any technique, 5. Solve the following set of equations using a) Cramer’s rule and b) an inverse matrix. 1 2 3 4 5 6 7 8 9 10 11 12 = 1 2 3 4 2 6 7 8 9 = Multiply Determinant 1 2 3 4 2 6 7 8 9 1 – = Inverse 1 2 3 4 5 6 7 8 9 10 11 12 68 167 266 = 1 2 3 4 2 6 7 8 9 36 = 1 2 3 4 2 6 7 8 9 1 – 0.833 – 0.167 0.167 0.167 0.333 – 0.167 0.5 0.167 0.167 – = ANS. A 1 2 3 = B 6 2 1 = Cross Product Dot Product A B × = A B • = A B × 4 – 17 10 – , , ( ) = A B • 13 = ANS. 2x 3y – 6z + 3 – = 5x 2y – 4z + 1 – = 6x 7y 5z + + 2 – = x= 0.273 y= -0.072 z= -0.627 ANS. 2x 3y + 4 = 5x 1y + 0 = page 683 6. Perform the following matrix calculation. Show all work. 7. Perform the matrix calculations given below. (ans. a) b) 2 3 5 1 x y 4 0 = x 4 3 0 1 2 3 5 1 ---------------- 4 13 – --------- = = y 2 4 5 0 2 3 5 1 ---------------- 20 – 13 – --------- 20 13 ----- - = = = x y 2 3 5 1 1 – 4 0 1 5 ( ) – 3 ( ) – 2 T 2 3 5 1 -------------------------------- 4 0 1 3 – 5 – 2 13 – ------------------- 4 0 1 13 ----- - – ¸ , ¸ _ 4 20 – 4 13 ----- - – 20 13 ----- - = = = = = A B C D E F G H I X Y Z L M N + T A B C D E F G H I X Y Z L M N + T AX BY CZ + + DX EY FZ + + GX YH IZ + + L M N + T AX BY CZ L + + + DX EY FZ M + + + GX YH IZ N + + + T = = (ans. AX BY CZ L + + + DX EY FZ M + + + GX YH IZ N + + + = A B C D E F G H I X Y Z = a) A B C D E F G H I X Y Z = b) page 684 8. Find the dot product, and the cross product, of the vectors A and B below. 9. Perform the following matrix calculations. B p q r = A x y z = A B × i j k x y z p q r i yr zq – ( ) j zp xr – ( ) k xq yp – ( ) + + yr zq – zp xr – xq yp – = = = A B • xp yq zr + + = (ans. a) a b c T d e f g h k m n p b) a b c d 1 – c) a b c d a b c T d e f g h k m n p a b c d e f g h k m n p ad bg cm + + ( ) ae bh cn + + ( ) af bk cp + + ( ) = = b) a b c d 1 – a b c d adj a b c d ------------------- d c – b – a ad bc – ------------------- d ad bc – ------------------ c – ad bc – ------------------ b – ad bc – ------------------ a ad bc – ------------------ = = = c) a b c d ad bc – = (ans. a) page 685 10. Find the value of ‘x’ for the following system of equations. 11. Perform the matrix calculations given below. x 2y 3z + + 5 = x 4y 8z + + 0 = 4x 2y z + + 1 = 1 2 3 1 4 8 4 2 1 x y z 5 0 1 = (ans. x 5 2 3 0 4 8 1 2 1 1 2 3 1 4 8 4 2 1 ------------------ 5 4 16 – ( ) 2 8 0 – ( ) 3 0 4 – ( ) + + 1 4 16 – ( ) 2 32 1 – ( ) 3 2 16 – ( ) + + ---------------------------------------------------------------------------------- 60 – 16 12 – + 12 – 62 42 – + ---------------------------------- 56 – 8 --------- 7 – = = = = = A B C D E F G H I X Y Z = a) A B C D E F G H I X Y Z = b) det A B C D = c) A B C D A = d) A B C D 1 – = e) page 686 12. Solve the following set of equations with the specified methods. 24.6 CALCULUS • NOTE: Calculus is very useful when looking at real systems. Many students are turned off by the topic because they "don’t get it". But, the secret to calculus is to remem- ber that there is no single "truth" - it is more a loose collection of tricks and techniques. Each one has to be learned separately, and when needed you must remember it, or know where to look. 24.6.1 Single Variable Functions 24.6.1.1 - Differentiation • The basic principles of differentiation are, 3x 5y + 7 = 4x 6y – 2 = a) Inverse matrix b) Cramer’s rule c) Gauss-Jordan row reduction d) Substitution page 687 • Differentiation rules specific to basic trigonometry and logarithm functions d dx ------ uv ( ) u ( ) d dx ------ v ( ) v ( ) d dx ------ u ( ) + = d dx ------ u n ( ) nu n 1 – ( ) d dx ------ u ( ) = Both u, v and w are functions of x, but this is not shown for brevity. d dx ------ C ( ) 0 = d dx ------ u v --- ¸ , ¸ _ v v 2 ----- ¸ , ¸ _ d dx ------ u ( ) u v 2 ----- ¸ , ¸ _ d dx ------ v ( ) – = d dx ------ Cu ( ) C ( ) d dx ------ u ( ) = d dx ------ u v … + + ( ) d dx ------ u ( ) d dx ----- - v ( ) … + + = Also note that C is used as a constant, and all angles are in radians. d dx ------ uvw ( ) uv ( ) d dx ------ w ( ) uw ( ) d dx ------ v ( ) vw ( ) d dx ----- - u ( ) + + = d dx ------ y ( ) d du ------ y ( ) d dx ------ u ( ) chain rule = = d dx ------ u ( ) 1 d du ------ x ( ) -------------- = d dx ------ y ( ) d du ------ y ( ) d du ------ x ( ) -------------- = page 688 • L’Hospital’s rule can be used when evaluating limits that go to infinity. • Some techniques used for finding derivatives are, d dx ----- - u sin ( ) u cos ( ) d dx ------ u ( ) = d dx ----- - u cos ( ) u sin – ( ) d dx ------ u ( ) = d dx ----- - u tan ( ) 1 u cos ----------- ¸ , ¸ _ 2 d dx ------ u ( ) = d dx ----- - u sec ( ) u u sec tan ( ) d dx ----- - u ( ) = d dx ----- - u cot ( ) u csc – ( ) 2 d dx ------ u ( ) = d dx ----- - u sinh ( ) u cosh ( ) d dx ------ u ( ) = d dx ----- - u csc ( ) u u cot csc – ( ) d dx ------ u ( ) = d dx ----- - u cosh ( ) u sinh ( ) d dx ------ u ( ) = d dx ------ e u ( ) e u ( ) d dx ------ u ( ) = d dx ----- - u tanh ( ) u sech ( ) 2 d dx ------ u ( ) = d dx ------ x ln ( ) 1 x --- = f x ( ) g x ( ) ---------- ¸ , ¸ _ x a → lim d dt ----- ¸ , ¸ _ f x ( ) d dt ----- ¸ , ¸ _ g x ( ) --------------------- ¸ , ¸ _ x a → lim d dt ---- - ¸ , ¸ _ 2 f x ( ) d dt ---- - ¸ , ¸ _ 2 g x ( ) ------------------------ ¸ , ¸ _ x a → lim … = = = page 689 24.6.1.2 - Integration • Some basic properties of integrals include, • Some of the trigonometric integrals are, Leibnitz’s Rule, (notice the form is similar to the binomial equation) can be used for d dx ------ ¸ , ¸ _ n uv ( ) d dx ------ ¸ , ¸ _ 0 u ( ) d dx ------ ¸ , ¸ _ n v ( ) n 1 ¸ , ¸ _ d dx ----- - ¸ , ¸ _ 1 u ( ) d dx ----- - ¸ , ¸ _ n 1 – v ( ) + = n 2 ¸ , ¸ _ d dx ------ ¸ , ¸ _ 2 u ( ) d dx ----- - ¸ , ¸ _ n 2 – v ( ) … n n ¸ , ¸ _ d dx ----- - ¸ , ¸ _ n u ( ) d dx ----- - ¸ , ¸ _ 0 v ( ) + + finding the derivatives of multiplied functions. In the following expressions, u, v, and w are functions of x. in addition to this, C is a constant. and all angles are radians. C x d ∫ ax C + = Cf x ( ) x d ∫ C f x ( ) x d ∫ = u v w … + + + ( ) x d ∫ u x d ∫ v x d ∫ w x d ∫ … + + + = u v d ∫ uv v u d ∫ – integration by parts = = f Cx ( ) x d ∫ 1 C ---- f u ( ) u d ∫ = F f x ( ) ( ) x d ∫ F u ( ) d du ------ x ( ) u d ∫ F u ( ) f' x ( ) ----------- u d ∫ = = x n x d ∫ x n 1 + n 1 + ------------ C + = e x x d ∫ e x C + = u f x ( ) = 1 x --- x d ∫ x C + ln = a x x d ∫ a x a ln -------- C + = u Cx = page 690 • Some other integrals of use that are basically functions of x are, x x d sin ∫ x cos – C + = x x d cos ∫ x sin C + = x sin ( ) 2 x d ∫ x x cos sin x + 2 ------------------------------- – C + = x cos ( ) 2 x d ∫ x x cos sin x + 2 ------------------------------- C + = x sin ( ) 3 x d ∫ x x sin ( ) 2 2 + ( ) cos 3 -------------------------------------------- – C + = x cos ( ) 3 x d ∫ x sin x cos ( ) 2 2 + ( ) 3 -------------------------------------------- C + = x cos ( ) 4 x d ∫ 3x 8 ------ 2x sin 4 ------------- 4x sin 32 ------------- C + + + = x x sin ( ) cos n x d ∫ x sin ( ) n 1 + n 1 + ------------------------ - C + = x sinh x d ∫ x cosh C + = x cosh x d ∫ x sinh C + = x tanh x d ∫ x cosh ( ) ln C + = x ax ( ) x d cos ∫ ax ( ) cos a 2 ------------------- x a --- ax ( ) sin C + + = x 2 ax ( ) x d cos ∫ 2x ax ( ) cos a 2 -------------------------- a 2 x 2 2 – a 3 ------------------- ax ( ) sin C + + = page 691 x n x d ∫ x n 1 + n 1 + ------------ C + = a bx + ( ) 1 – x d ∫ a bx + ln b ----------------------- C + = a bx 2 + ( ) 1 – x d ∫ 1 2 b – ( )a ---------------------- a 2 b – + a x b – – --------------------------- ¸ , ¸ _ ln C a 0 b 0 < , > , + = x a bx 2 + ( ) 1 – x d ∫ bx 2 a + ( ) ln 2b ---------------------------- C + = x 2 a bx 2 + ( ) 1 – x d ∫ x b --- a b ab ------------- x ab a ------------- ¸ , ¸ _ atan – C + = a 2 x 2 – ( ) 1 – x d ∫ 1 2a ------ a x + a x – ------------ ¸ , ¸ _ ln C a 2 x 2 > , + = a bx + ( ) 1 – x d ∫ 2 a bx + b ---------------------- C + = x x 2 a 2 t ( ) 1 2 --- – x d ∫ x 2 a 2 t C + = a bx cx 2 + + ( ) 1 – x d ∫ 1 c ------ a bx cx 2 + + x c b 2 c ---------- + + ln C c 0 > , + = a bx cx 2 + + ( ) 1 – x d ∫ 1 c – ---------- 2cx – b – b 2 4ac – ------------------------- asin C c 0 < , + = CORRECT?? page 692 a bx + ( ) 1 2 --- x d ∫ 2 3b ------ a bx + ( ) 3 2 --- = a bx + ( ) 1 2 --- x d ∫ 2 3b ------ a bx + ( ) 3 2 --- = x a bx + ( ) 1 2 --- x d ∫ 2 2a 3bx – ( ) a bx + ( ) 3 2 --- 15b 2 ----------------------------------------------------- – = 1 a 2 x 2 + ( ) 1 2 --- x d ∫ x 1 a 2 x 2 + ( ) 1 2 --- x 1 a 2 ----- x 2 + ¸ , ¸ _ 1 2 --- + ¸ , ¸ _ ln a --------------------------------------------- + 2 ----------------------------------------------------------------------------------- = x 1 a 2 x 2 + ( ) 1 2 --- x d ∫ a 1 a 2 ----- x 2 + ¸ , ¸ _ 3 2 --- 3 ---------------------------- = x 2 1 a 2 x 2 + ( ) 1 2 --- x d ∫ ax 4 ------ 1 a 2 ----- x 2 + ¸ , ¸ _ 3 2 --- 8 8a 2 --------x 1 a 2 x 2 + ( ) 1 2 --- – x 1 a 2 ----- x 2 + ¸ , ¸ _ 1 2 --- + ¸ , ¸ _ ln 8a 3 --------------------------------------------- – = 1 a 2 x 2 – ( ) 1 2 --- x d ∫ 1 2 --- x 1 a 2 x 2 – ( ) 1 2 --- ax ( ) asin a --------------------- + = x 1 a 2 x 2 – ( ) 1 2 --- x d ∫ a 3 --- 1 a 2 ----- x 2 – ¸ , ¸ _ 3 2 --- – = x 2 a 2 x 2 – ( ) 1 2 --- x d ∫ x 4 --- a 2 x 2 – ( ) 3 2 --- – 1 8 --- x a 2 x 2 – ( ) 1 2 --- a 2 x a --- ¸ , ¸ _ asin + + = 1 a 2 x 2 + ( ) 1 2 --- – x d ∫ 1 a --- x 1 a 2 ----- x 2 + ¸ , ¸ _ 1 2 --- + ln = 1 a 2 x 2 – ( ) 1 2 --- – x d ∫ 1 a --- ax ( ) asin 1 a --- ax ( ) acos – = = page 693 • Integrals using the natural logarithm base ‘e’, 24.6.2 Vector Calculus • When dealing with large and/or time varying objects or phenomenon we must be able to describe the state at locations, and as a whole. To do this vectors are a very useful tool. • Consider a basic function and how it may be represented with partial derivatives. e ax x d ∫ e ax a ------- C + = xe ax x d ∫ e ax a 2 ------- ax 1 – ( ) C + = page 694 • Gauss’s or Green’s or divergence theorem is given below. Both sides give the flux across a surface, or out of a volume. This is very useful for dealing with magnetic fields. y f x y z , , ( ) = d ( )y x ∂ ∂ ¸ , ¸ _ f x y z , , ( ) ¸ , ¸ _ dx y ∂ ∂ ¸ , ¸ _ f x y z , , ( ) ¸ , ¸ _ dy z ∂ ∂ ¸ , ¸ _ f x y z , , ( ) ¸ , ¸ _ dz + + = d ( )y x ∂ ∂ ¸ , ¸ _ dx y ∂ ∂ ¸ , ¸ _ dy z ∂ ∂ ¸ , ¸ _ dz + + f x y z , , ( ) = We can write this in differential form, but the right hand side must contain partial derivatives. If we separate the operators from the function, we get a simpler form. We can then look at them as the result of a dot product, and divide it into two vec- tors. d ( )y x ∂ ∂ i y ∂ ∂ j z ∂ ∂ k + + ¸ , ¸ _ dxi dyj dzk + + ( ) • f x y z , , ( ) = d ( )y ∇ dX • [ ]f x y z , , ( ) = d ( )y ∇f x y z , , ( ) dX • = d ( )y ∇f x y z , , ( ) dX θ cos = We then replace these vectors with the operators below. In this form we can manipu- late the equation easily (whereas the previous form was very awkward). In summary, ∇ x ∂ ∂ i y ∂ ∂ j z ∂ ∂ k + + = ∇ F • the divergence of function F = ∇ F × the curl of function F = F F x i F y j F z k + + = ∇ F • ( ) V d V ∫ FdA A ∫ ° = where, V A , a volume V enclosed by a surface are a A = F a field or vector value over a volume = page 695 • Stoke’s theorem is given below. Both sides give the flux across a surface, or out of a volume. This is very useful for dealing with magnetic fields. 24.6.3 Differential Equations • Solving differential equations is not very challenging, but there are a number of forms that need to be remembered. • Another complication that often occurs is that the solution of the equations may vary depending upon boundary or initial conditions. An example of this is a mass spring combination. If they are initially at rest then they will stay at rest, but if there is some dis- turbance, then they will oscillate indefinitely. • We can judge the order of these equations by the highest order derivative in the equation. • Note: These equations are typically shown with derivatives only, when integrals occur they are typically eliminated by taking derivatives of the entire equation. • Some of the terms used when describing differential equations are, ordinary differential equations - if all the derivatives are of a single variable. In the example below ’x’ is the variable with derivatives. first-order differential equations - have only first-order derivatives, ∇ F × ( ) A d A ∫ FdL L ∫ ° = where, A L , A surface area A, with a bounding parimeter of length L = F a field or vector value over a volume = d dt ----- ¸ , ¸ _ 2 x d dt ----- ¸ , ¸ _ x + y = e.g., d dt ----- ¸ , ¸ _ x d dt ----- ¸ , ¸ _ y + 2 = e.g., page 696 second-order differential equations - have at least on second derivative, higher order differential equations - have at least one derivative that is higher than second-order. partial differential equations - these equations have partial derivatives • Note: when solving these equations it is common to hit blocks. In these cases backtrack and try another approach. • linearity of a differential equation is determined by looking at the dependant vari- ables in the equation. The equation is linear if they appear with an exponent other than 1. 24.6.3.1 - First-order Differential Equations • These systems tend to have a relaxed or passive nature in real applications. • Examples of these equations are given below, • Typical methods for solving these equations include, guessing then testing separation d dt ----- ¸ , ¸ _ 2 x d dt ---- - ¸ , ¸ _ y + 2 = e.g., y'' y' 2 + + 5x = linear y'' ( ) 2 y' 2 + + 5x = non-linear y'' y' ( ) 3 2 + + 5x = non-linear y'' y' ( ) sin 2 + + 5x = non-linear eg. y' 2xy 2 4x 3 – + 0 = y' 2y – 0 = page 697 homogeneous 24.6.3.1.1 - Guessing • In this technique we guess at a function that will satisfy the equation, and test it to see if it works. • The previous example showed a general solution (i.e., the value of ’C’ was not found). We can also find a particular solution. 24.6.3.1.2 - Separable Equations • In a separable equation the differential can be split so that it is on both sides of the equation. We then integrate to get the solution. This typically means there is only a sin- gle derivative term. y' y + 0 = the given equation y Ce t – = the guess now try to substitute into the equation y' Ce t – – = y' y + Ce t – – Ce t – + 0 = = therefore the guess worked - it is correct y Ce t – = y Ce t – = a general solution y 5e t – = a particular solution page 698 24.6.3.1.3 - Homogeneous Equations and Substitution • These techniques depend upon finding some combination of the variables in the equation that can be replaced with another variable to simplify the equation. This tech- nique requires a bit of guessing about what to substitute for, and when it is to be applied. dx dy ------ y 2 2y 3 + + + 0 = e.g., dx ∴ y 2 – 2y – 3 – ( )dy = x ∴ y 3 – 3 -------- y 2 – 3y – C + = dx dy ------ x + 0 = e.g., 1 x --- – ¸ , ¸ _ dx ∴ dy = x – ( ) ln ∴ y = page 699 24.6.3.2 - Second-order Differential Equations • These equations have at least one second-order derivative. • In engineering we will encounter a number of forms, - homogeneous - nonhomogeneous 24.6.3.2.1 - Linear Homogeneous • These equations will have a standard form, dy dx ------ y x -- 1 – = e.g., the equation given u y x -- = the substitution chosen dy dx ------ u 1 – = u x du dx ------ + ∴ u 1 – = du dx ------ ∴ 1 – x ------ = du dx ------ – ∴ 1 x --- = u – ∴ x ( ) ln C + = Put the substitution in and solve the differential equation, Substitute the results back into the original substitution equation to get rid of ’u’, y x -- – x ( ) ln C + = y ∴ x x ( ) ln – Cx – = page 700 • An example of a solution is, 24.6.3.2.2 - Nonhomogeneous Linear Equations • These equations have the general form, d dt ----- ¸ , ¸ _ 2 y A d dt ----- ¸ , ¸ _ y By + + 0 = d dt ----- ¸ , ¸ _ 2 y 6 d dt ----- ¸ , ¸ _ y 3y + + 0 = y e Bt = e.g., Guess, d dt ----- ¸ , ¸ _ y Be Bt = d dt ----- ¸ , ¸ _ 2 y B 2 e Bt = substitute and solve for B, B 2 e Bt 6Be Bt 3e Bt + + 0 = B 2 6B 3 + + 0 = B 3 – 2.449j + 3 – 2.449j – , = substitute and solve for B, y e 3 – 2.449j + ( )t = y e 3 – t e 2.449jt = y e 3 – t 2.449t ( ) cos j 2.449t ( ) sin + ( ) = Note: if both the roots are the same, y C 1 e Bt C 2 te Bt + = page 701 • to solve these equations we need to find the homogeneous and particular solu- tions and then add the two solutions. • Consider the example below, d dt ----- ¸ , ¸ _ 2 y A d dt ----- ¸ , ¸ _ y By + + Cx = y y h y p + = d dt ----- ¸ , ¸ _ 2 y A d dt ----- ¸ , ¸ _ y B + + 0 = to find yh solve, to find yp guess at a value of y and then test for validity, A good table of guesses is, A Cx form C Guess Ax B + Cx D + e Ax Ce Ax B Ax ( ) sin C Ax ( ) sin D Ax ( ) cos + Cxe Ax B Ax ( ) cos Cx Ax ( ) sin xD Ax ( ) cos + or or page 702 24.6.3.3 - Higher Order Differential Equations 24.6.3.4 - Partial Differential Equations • Partial difference equations become critical with many engineering applications involving flows, etc. d dt ----- ¸ , ¸ _ 2 y d dt ----- ¸ , ¸ _ y 6y – + e 2x – = First solve for the homogeneous part, d dt ----- ¸ , ¸ _ 2 y d dt ----- ¸ , ¸ _ y 6y – + 0 = B 2 e Bx Be Bx 6e Bx – + 0 = try y e Bx = d dt ----- ¸ , ¸ _ y Be Bx = d dt ----- ¸ , ¸ _ 2 y B 2 e Bx = B 2 B 6 – + 0 = B 3 – 2 , = y h e 3x – e 2x + = Next, solve for the particular part. We will guess the function below. y Ce 2x – = d dt ----- ¸ , ¸ _ y 2C – e 2x – = d dt ----- ¸ , ¸ _ 2 y 4Ce 2x – = 4Ce 2x – 2C – e 2x – 6Ce 2x – – + e 2x – = 4C 2C – 6C – 1 = C 0.25 = y p 0.25e 2x – = Finally, y e 3x – e 2x 0.25e 2x – + + = page 703 24.6.4 Other Calculus Stuff • The Taylor series expansion can be used to find polynomial approximations of functions. 24.6.5 Practice Problems 1. Find the derivative of the function below with respect to time. 2. Solve the following differential equation, given the initial conditions at t=0s. f x ( ) f a ( ) f' a ( ) x a – ( ) f'' a ( ) x a – ( ) 2 2! ------------------------------- … f n 1 – ( ) a ( ) x a – ( ) n 1 – n 1 – ( )! ------------------------------------------------ + + + + = 3t 2 t + ( ) 2 ------------------ e 2t + (ans. d dt ---- - ¸ , ¸ _ 3t 2 t + ( ) 2 ------------------ e 2t + ¸ , ¸ _ d dt ----- ¸ , ¸ _ 3t 2 t + ( ) 2 – ( ) d dt ----- ¸ , ¸ _ e 2t ( ) + 3 2 t + ( ) 2 – 6t 2 t + ( ) 3 – – 2e 2t + = = x'' 4x' 4x + + 5t = x 0 0 = x' 0 0 = page 704 3. Find the following derivatives. (ans. homogeneous solution: x'' 4x' 4x + + 0 = guess: x h e At = x h ' Ae At = x h '' A 2 e At = 0 ( ) 4 A ( ) 4 At B + ( ) + + 5t = A 2 e At 4Ae At 4e At + + 0 A 2 4A 4 + + A 2 + ( ) A 2 + ( ) = = = A 5 4 --- 1.25 = = x p At B + = x h C 1 e 2t – C 2 te 2t – + = particular solution: guess: x p ' A = x p '' 0 = 4A 4B + ( ) 4A ( )t + 0 ( ) 5 ( )t + = 4 1.25 ( ) 4B + 0 = B 1.25 – = x p 1.25t 1.25 – = combine and solve for constants: x t ( ) x h x p + C 1 e 2t – C 2 te 2t – 1.25t 1.25 – + + = = C 2 1.25 = C 1 1.25 = for x(0) = 0 0 C 1 e 2 0 ( ) – C 2 0 ( )e 2 0 ( ) – 1.25 0 ( ) 1.25 – + + C 1 1.25 – = = 2 – C 1 C 2 1.25 + + 0 2 – 1.25 ( ) C 2 1.25 + + = = for (d/dt)x(0) = 0 0 2 – ( )C 1 e 2 0 ( ) – 2 – ( )C 2 0 ( )e 2 0 ( ) – C 2 e 2 0 ( ) – 1.25 + + + = x t ( ) 1.25e 2t 1.25te 2t 1.25t 1.25 – + + = d dt ----- t sin t cos + ( ) a) d dt ----- t 2 + ( ) 2 – ( ) b) d dt ----- 5te 8t ( ) c) d dt ---- - 5 t ln ( ) d) page 705 4. Find the following integrals 5. Find the following derivative. d dt ---- - t sin t cos + ( ) d dt ----- t sin ( ) d dt ---- - t cos ( ) + t cos t sin – = = a) d dt ----- t 2 + ( ) 2 – ( ) 2 – t 2 + ( ) 3 – = b) d dt ---- - 5te 8t ( ) 5e 8t 40te 8t + = c) d dt ---- - 5 t ln ( ) 5 t --- = d) (ans. 6 ∫ t 2 dt a) 14 ∫ e 7t dt b) 0.5t ( ) sin t d ∫ c) 5 x --- x d ∫ d) 6 ∫ t 2 dt 6 t 3 3 ---- ¸ , ¸ _ 2t 3 C + = = a) 14 ∫ e 7t dt 14 e 7t 7 ------ ¸ , ¸ _ C + 2e 7t C + = = b) 0.5t ( ) sin t d ∫ 0.5t ( ) cos – 0.5 -------------------------- C + 2 0.5t ( ) cos – C + = = c) 5 x --- x d ∫ 5 x ( ) ln C + = d) (ans. d dt ---- - 5te 4t t 4 + ( ) 3 – + ( ) page 706 6. Find the following derivatives. 7. Solve the following integrals. 8. Solve the following differential equation. d dx ------ 1 x 1 + ------------ ¸ , ¸ _ d dt ----- e t – 2t 4 – ( ) sin ( ) a) b) d dx ------ 1 x 1 + ------------ ¸ , ¸ _ 1 – x 1 + ( ) 2 ------------------- = d dt ----- e t – 2t 4 – ( ) sin ( ) e t – – 2t 4 – ( ) sin 2e t – 2t 4 – ( ) cos + = a) b) (ans. e 2t t d ∫ θ sin 3θ cos + ( ) θ d ∫ a) b) e 2t t d ∫ 0.5e 2t C + = θ sin 3θ cos + ( ) θ d ∫ θ cos – 1 3 --- 3θ sin C + + = a) b) (ans. x'' 5x' 3x + + 3 = x 0 ( ) 1 = x' 0 ( ) 1 = page 707 9. Set up an integral and solve it to find the volume inside the shape below. The shape is basically a cone with the top cut off. x'' 5x' 3x + + 3 = x 0 ( ) 1 = x' 0 ( ) 1 = Homogeneous: (ans. Particular: A 2 5A 4 + + 0 = A 5 – 25 16 – t 2 ------------------------------------ 5 – 3 t 2 ---------------- 4 – 1 – , = = = x h C 1 e 4t – C 2 e t – + = x p A = x' p 0 = x'' p 0 = 0 5 0 ( ) 3A + + 3 = A 1 = x p 1 = Initial values: x x h x p + C 1 e 4t – C 2 e t – 1 + + = = x' 4C – 1 e 4t – C 2 e t – – = 1 4C – 1 1 ( ) C 2 1 ( ) – = 1 C 1 1 ( ) C 2 1 ( ) 1 + + = C 1 C 2 – = 4 C 2 – ( ) C 2 + 1 – = C 2 1 3 --- = C 1 1 3 --- – = x 1 3 --- – e 4t – 1 3 ---e t – 1 + + = page 708 10. Solve the first order non-homogeneous differential equation below. Assume the system starts at rest. 11. Solve the second order non-homogeneous differential equation below. a b c x y z (ans. V V d ∫ A x d 0 a ∫ = = r b c b – a ----------- ¸ , ¸ _ x + = A πr 2 π b c b – a ----------- ¸ , ¸ _ x + ¸ , ¸ _ 2 πb 2 2π c b – a ----------- ¸ , ¸ _ x π c b – a ----------- ¸ , ¸ _ 2 x 2 + + = = = V πb 2 2π c b – a ----------- ¸ , ¸ _ x π c b – a ----------- ¸ , ¸ _ 2 x 2 + + ¸ , ¸ _ x d 0 a ∫ = V πb 2 x π c b – a ----------- ¸ , ¸ _ x 2 π 3 --- c b – a ----------- ¸ , ¸ _ 2 x 3 + + 0 a = V πb 2 a π c b – a ----------- ¸ , ¸ _ a 2 π 3 --- c b – a ----------- ¸ , ¸ _ 2 a 3 + + = V πb 2 a π c b – ( )a π 3 --- c b – ( ) 2 a 2 + + = 2x' 4x + 5 4t sin = 2x'' 4x' 2x + + 5 = where, x 0 ( ) 2 = x' 0 ( ) 0 = page 709 24.7 NUMERICAL METHODS • These techniques approximate system responses without doing integrations, etc. 24.7.1 Approximation of Integrals and Derivatives from Sampled Data • This form of integration is done numerically - this means by doing repeated cal- culations to solve the equation. Numerical techniques are not as elegant as solving differ- ential equations, and will result in small errors. But these techniques make it possible to solve complex problems much faster. • This method uses forward/backward differences to estimate derivatives or inte- grals from measured data. T T y i 1 – y i 1 + t i y i t i 1 – t i 1 + y t ( ) y t i ( ) t i 1 – t i ∫ y i y i 1 – + 2 --------------------- ¸ , ¸ _ t i t i 1 – – ( ) ≈ T 2 --- y i y i 1 – + ( ) = d dt -----y t i ( ) y i y i 1 – – t i t i 1 – – --------------------- ¸ , ¸ _ ≈ y i 1 + y i – t i 1 + t i – --------------------- ¸ , ¸ _ 1 T --- y i y i 1 – – ( ) 1 T --- y i 1 + y i – ( ) = = = d dt ----- ¸ , ¸ _ 2 y t i ( ) 1 T --- y i 1 + y i – ( ) 1 T --- y i y i 1 – – ( ) – T ----------------------------------------------------------------- ≈ 2 – y i y i 1 – y i 1 + + + T 2 --------------------------------------------- = page 710 24.7.2 Euler First-order Integration • We can also estimate the change resulting from a derivative using Euler’s equa- tion for a first-order difference equation. 24.7.3 Taylor Series Integration • Recall the basic Taylor series, • When h=0 this is called a MacLaurin series. • We can integrate a function by, y t h + ( ) y t ( ) h d dt ----- y t ( ) + ≈ x t h + ( ) x t ( ) h d dt ----- ¸ , ¸ _ x t ( ) 1 2! ---- -h 2 d dt ---- - ¸ , ¸ _ 2 x t ( ) 1 3! ---- -h 3 d dt ---- - ¸ , ¸ _ 3 x t ( ) 1 4! ---- -h 4 d dt ---- - ¸ , ¸ _ 4 x t ( ) … + + + + + = d dt ----- ¸ , ¸ _ x 1 x 2 t 3 + + = d dt ----- ¸ , ¸ _ x 0 0 = x 0 0 = h 0.1 = t (s) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 x(t) 0 d/dt x(t) 0 page 711 24.7.4 Runge-Kutta Integration • The equations below are for calculating a fourth order Runge-Kutta integration. 24.7.5 Newton-Raphson to Find Roots • When given an equation where an algebraic solution is not feasible, a numerical solution may be required. One simple technique uses an instantaneous slope of the func- tion, and takes iterative steps towards a solution. • The function f(x) is supplied by the user. x t h + ( ) x t ( ) 1 6 --- F 1 2F 2 2F 3 F 4 + + + ( ) + = F 1 hf t x , ( ) = F 2 hf t h 2 --- + x F 1 2 ------ + , ¸ , ¸ _ = F 3 hf t h 2 --- + x F 2 2 ------ + , ¸ , ¸ _ = F 4 hf t h + x F 3 + , ( ) = where, x = the state variables f = the differential function t = current point in time h = the time step to the next integration point x i 1 + x i f x i ( ) d dx ------f x i ( ) ¸ , ¸ _ ----------------------- – = page 712 • This method can become divergent if the function has an inflection point near the root. • The technique is also sensitive to the initial guess. • This calculation should be repeated until the final solution is found. 24.8 LAPLACE TRANSFORMS • The Laplace transform allows us to reverse time. And, as you recall from before the inverse of time is frequency. Because we are normally concerned with response, the Laplace transform is much more useful in system analysis. • The basic Laplace transform equations is shown below, 24.8.1 Laplace Transform Tables • Basic Laplace Transforms for operational transformations are given below, F s ( ) f t ( )e st – t d 0 ∞ ∫ = where, F s ( ) the function in terms of the Laplace s = f t ( ) the function in terms of time t = page 713 • A set of useful functional Laplace transforms are given below, Kf t ( ) f 1 t ( ) f 2 t ( ) f 3 – t ( ) … + + df t ( ) dt ----------- d 2 f t ( ) dt 2 -------------- d n f t ( ) dt n -------------- f t ( ) t d 0 t ∫ f t a – ( )u t a – ( ) a 0 > , f at ( ) a 0 > , tf t ( ) t n f t ( ) f t ( ) t -------- Kf s ( ) f 1 s ( ) f 2 s ( ) f 3 – s ( ) … + + sf s ( ) f 0 – ( ) – s 2 f s ( ) sf 0 – ( ) – df 0 – ( ) dt ------------------ – s n f s ( ) s n 1 – f 0 – ( ) – s n 2 – df 0 – ( ) dt ------------------ – … – d n f 0 – ( ) dt n -------------------- – f s ( ) s --------- e as – f s ( ) 1 a -- - f s a --- ¸ , ¸ _ df s ( ) – ds --------------- 1 – ( ) nd n f s ( ) ds n --------------- f u ( ) u d s ∞ ∫ e at – f t ( ) f s a – ( ) TIME DOMAIN FREQUENCY DOMAIN page 714 • Laplace transforms can be used to solve differential equations. A t e at – ωt ( ) sin ωt ( ) cos te at – e at – ωt ( ) sin e at – ωt ( ) cos A s a – ----------- A s a – ( ) 2 ------------------ A s α βj – + ----------------------- A complex conjugate s α βj + + ------------------------------------- - + A s α βj – + ( ) 2 ------------------------------- A complex conjugate s α βj + + ( ) 2 -------------------------------------- + A s --- 1 s 2 ---- 1 s a + ----------- ω s 2 ω 2 + ----------------- s s 2 ω 2 + ----------------- 1 s a + ( ) 2 ------------------- ω s a + ( ) 2 ω 2 + -------------------------------- s a + s a + ( ) 2 ω 2 + -------------------------------- Ae at – Ate at – 2 A e αt – βt θ + ( ) cos 2t A e αt – βt θ + ( ) cos TIME DOMAIN FREQUENCY DOMAIN page 715 24.9 z-TRANSFORMS • For a discrete-time signal , the two-sided z-transform is defined by . The one-sided z-transform is defined by . In both cases, the z-transform is a polynomial in the complex variable . • The inverse z-transform is obtained by contour integration in the complex plane . This is usually avoided by partial fraction inversion tech- niques, similar to the Laplace transform. • Along with a z-transform we associate its region of convergence (or ROC). These are the values of for which is bounded (i.e., of finite magnitude). x n [ ] X z ( ) x n [ ]z n – n ∞ – = ∞ ∑ = X z ( ) x n [ ]z n – n 0 = ∞ ∑ = z x n [ ] 1 j2π -------- X z ( )z n 1 – dz ∫ ° = z X z ( ) page 716 • Some common z-transforms are shown below. Table 3: Common z-transforms Signal z-Transform ROC 1 All x n [ ] X z ( ) δ n [ ] z u n [ ] 1 1 z 1 – – ---------------- z 1 > nu n [ ] z 1 – 1 z 1 – – ( ) 2 ----------------------- z 1 > n 2 u n [ ] z 1 – 1 z 1 – + ( ) 1 z 1 – – ( ) 3 ----------------------------- z 1 > a n u n [ ] 1 1 az 1 – – ------------------- z a > na n u n [ ] az 1 – 1 az 1 – – ( ) 2 -------------------------- z a > a n – ( )u n – 1 – [ ] 1 1 az 1 – – ------------------- z a < na n – ( )u n – 1 – [ ] az 1 – 1 az 1 – – ( ) 2 -------------------------- z a < ω 0 n ( ) cos u n [ ] 1 z 1 – ω 0 cos – 1 2z 1 – ω 0 cos – z 2 – + ------------------------------------------------- z 1 > ω 0 n ( ) sin u n [ ] z 1 – ω 0 sin 1 2z 1 – ω 0 cos – z 2 – + ------------------------------------------------- z 1 > a n ω 0 n ( ) cos u n [ ] 1 az 1 – ω 0 cos – 1 2az 1 – ω 0 cos – a 2 z 2 – + ---------------------------------------------------------- z a > page 717 • The z-transform also has various properties that are useful. The table below lists properties for the two-sided z-transform. The one-sided z-transform properties can be derived from the ones below by considering the signal instead of simply . Table 4: Two-sided z-Transform Properties Property Time Domain z-Domain ROC Notation Linearity At least the intersec- tion of and Time Shifting That of , except if and if z-Domain Scaling Time Reversal z-Domain Differentiation Table 3: Common z-transforms Signal z-Transform ROC x n [ ] X z ( ) a n ω 0 n ( ) sin u n [ ] az 1 – ω 0 sin 1 2az 1 – ω 0 cos – a 2 z 2 – + ---------------------------------------------------------- z a > n! k! n k – ( )! -----------------------u n [ ] z k – 1 z 1 – – ( ) k 1 + ------------------------------ z 1 > x n [ ]u n [ ] x n [ ] x n [ ] x 1 n [ ] x 2 n [ ] X z ( ) X 1 z ( ) X 2 z ( ) r 2 z r 1 < < ROC 1 ROC 2 αx 1 n [ ] βx 2 n [ ] + αX 1 z ( ) βX 2 z ( ) + ROC 1 ROC 2 x n k – [ ] z k – X z ( ) X z ( ) z 0 = k 0 > z ∞ = k 0 < a n x n [ ] X a 1 – z ( ) a r 2 z a r 1 < < x n – [ ] X z 1 – ( ) 1 r 1 ---- z 1 r 2 ---- < < nx n [ ] z – dX z ( ) dz -------------- r 2 z r 1 < < page 718 24.10 FOURIER SERIES • These series describe functions by their frequency spectrum content. For example a square wave can be approximated with a sum of a series of sine waves with varying magnitudes. • The basic definition of the Fourier series is given below. 24.11 TOPICS NOT COVERED (YET) • To ensure that the omissions are obvious, I provide a list of topics not covered below. Some of these may be added later if their need becomes obvious. • Frequency domain - Fourier, Bessel Convolution At least the intersec- tion of and Multiplication At least Initial value theo- rem causal Table 4: Two-sided z-Transform Properties Property Time Domain z-Domain ROC x 1 n [ ]*x 2 n [ ] X 1 z ( )X 2 z ( ) ROC 1 ROC 2 x 1 n [ ]x 2 n [ ] 1 j2π -------- X 1 v ( )X 2 z v -- ¸ , ¸ _ v 1 – dv ∫ ° r 1l r 2l z r 1u r 2u < < x n [ ] x 0 [ ] X z ( ) z ∞ → lim = f x ( ) a 0 2 ----- a n nπx L --------- ¸ , ¸ _ cos b n nπx L --------- ¸ , ¸ _ sin + n 1 = ∞ ∑ + = a n 1 L --- f x ( ) nπx L --------- ¸ , ¸ _ cos x d L – L ∫ = b n 1 L --- f x ( ) nπx L --------- ¸ , ¸ _ sin x d L – L ∫ = page 719 24.12 REFERENCES/BIBLIOGRAPHY Spiegel, M. R., Mathematical Handbook of Formulas and Tables, Schaum’s Outline Series, McGraw-Hill Book Company, 1968. page 720 25. A BASIC INTRODUCTION TO ‘C’ 25.1 WHY USE ‘C’? • ‘C’ is commonly used to produce operating systems and commercial software. Some examples of these are UNIX, Lotus-123, dBase, and some ‘C’ compilers. • Machine Portable, which means that it requires only small changes to run on other computers. • Very Fast, almost as fast as assembler. • Emphasizes structured programming, by focusing on functions and subroutines. • You may easily customize ’C’ to your own needs. • Suited to Large and Complex Programs. • Very Flexible, allows you to create your own functions. 25.2 BACKGROUND • Developed at Bell Laboratories in the Early 70’s, and commercial compilers became available in the Late 70’s.Recnetly has become more popular because of its ties to UNIX. Over 90% of UNIX is written in ‘C’. AT&T originally developed ‘C’ with the intention of making it an in- house standard. 25.3 PROGRAM PARTS • /* is the start of a comment. • */ is the end of comment. • The main program is treated like a function, and thus it has the name main(). • lower/UPPER case is crucial, and can never be ignored. • Statements are separated by semi-colons ‘;’ page 721 • Statements consist of one operation, or a set of statements between curly brackets {, } • There are no line numbers. • lines may be of any length. • A very common function in ‘C’ is printf(). This function will do a formatted print. The format is the first thing which appears between the brackets. In this case the format says print an integer %d followed by a space then a ‘+’ then another space, another integer, another space, ‘=’, and another space, another integer, then a line feed ‘\n’. All variables that follow the format state- ment are those to be printed. x, y, and z are the three integers to be printed, in their respective orders. • Major Data Types for variables and functions are (for IBM PC): int (2 byte integer), short (1 byte integer), long (4 byte integer), char (1 byte integer), float (4 byte IEEE floating point standard), double (8 byte IEEE floating point standard). •int, short, long, char can be modified by the addition of unsigned, and register. An unsigned inte- ger will not use 1 bit for number sign. A register variable will use a data register in the micro- processor, if possible, and it will speed things up (this is only available for integers). Program to Add two Numbers: /* A simple program to add two numbers and print the results */ main() { int x, y = 2, z; /* define three variables and give one a value */ x = 3; /* give another variable a value */ z = x + y; /* add the two variables */ printf(“%d + %d = %d\n”, x, y, z); /*print the results */ } Results (output): 3 + 2 = 5 page 722 • A function consists of a sub-routine or program, which has been assigned a name. This function is capable of accepting an argument list, and returning a single value. The function must be defined before it is called from within the program. (e.g. sin() and read()). • Every variable has a scope. This determines which functions are able to use that variable. If a variable is global, then it may be used by any function. These can be modified by the addition of static, extern and auto. If a variable is defined in a function, then it will be local to that func- tion, and is not used by any other function. If the variable needs to be initialized every time the subroutine is called, this is an auto type. static variables can be used for a variable that must keep the value it had the last time the function was called. Using extern will allow the variable Example of Defining Different Data Types: main() { unsigned int i; register j; short k; char l; double m; etc Program to add numbers with a function: /* A simple program to add two numbers and print the results */ int add(); /* Declare a integer function called ‘add’ */ main() { int x = 3, y = 2, z; /* define three variables and give values */ z = add(x, y); /* pass the two values to ‘add’ and get the sum*/ printf(“%d + %d = %d\n”, x, y, z); /*print the results */ } int add(a, b) /* define function and variable list */ int a, b; /* describe types of variable lists */ { int c; /* define a work integer */ c = a + b; /* add the numbers */ return(c); /* Return the number to the calling program */ } page 723 types from other parts of the program to be used in a function. • Other variable types of variables are union, enum, struct, etc. • Some basic control flow statements are while(), do-while(), for(), switch(), and if(). A couple of example programs are given below which demonstrate all the ’C’ flow statements. Program example using global variables: /* A simple program to add two numbers and print the results */ int x = 3, /* Define global x and y values */ y = 2, add(); /* Declare an integer function called ‘add’ */ main() { printf(“%d + %d = %d\n”, x, y, add()); /*print the results */ } int add() /* define function */ { return(x + y); /* Return the sumto the calling program */ } Program example with a for loop: /* A simple program toprint numbers from 1 to 5*/ main() { int i; for(i = 1; i <= 5; i = i + 1){ printf(“number %d \n”, i); /*print the number */ } } page 724 or example with a while loop: main() { int i = 1; while(i <= 5){ printf(“number %d \n”, i); i = i + 1; } } or example with a do while loop main() { int i = 1; do{ printf(“number %d \n”, i); i = i + 1; }while(i <= 5) } or example with a do until loop: main() { int i = 1; do{ printf(“number %d \n”, i); i = i + 1; }until(i > 5) } page 725 • #include <filename.h> will insert the file named filename.h into the program. The *.h extension is used to indicate a header file which contains ‘C’ code to define functions and constants. This almost always includes “stdio.h”. As we saw before, a function must be defined (as with the ‘add’ function). We did not define printf() before we used it, this is normally done by using #include <stdio.h> at the top of your programs. “stdio.h” contains a line which says ‘int printf();’. If we needed to use a math function like y = sin(x) we would have to also use Example Program with an if else: main() { int x = 2, y = 3; if(x > y){ printf(“Maximum is %d \n”, x); } else if(y > x){ printf(“Maximum is %d \n”, y); } else { printf(“Both values are %d \n”, x); } } Example Program using switch-case: main() { int x = 3; /* Number of People in Family */ switch(x){ /* choose the numerical switch */ case 0: /* Nobody */ printf(“There is no family \n”); break; case 1: /* Only one person, but a start */ printf(“There is one parent\n”); break; case 2: /* You need two to start something */ printf(“There are two parents\n”); break; default: /* critical mass */ printf(“There are two parents and %d kids\n”, x-2); break; } } page 726 #include <math.h>, or else the compiler would not know what type of value that sin() is sup- posed to return. •#define CONSTANT TEXT will do a direct replacement of CONSTANT in the program with TEXT, before compilation. #undef CONSTANT will undefine the CONSTANT. • #ifdef, #ifndef, #if, #else and #else can be used to conditionally include parts of a program. This is use for including and eliminating debugging lines in a program. • #define, #include, #ifdef, #ifndef, #if, #else, /* and */ are all handled by the Preprocessor, before the compiler touches the program. • Matrices are defined as shown in the example. In ‘C’ there are no limits to the matrix size, or dimensions. Arrays may be any data type. Strings are stored as arrays of characters. • i++ is the same as i = i + 1. A Sample Program to Print Some sin() values (using defined constatnts) #include “stdio.h” #include “math.h” #define TWO_PI 6.283185307 #define STEPS 5 main() { double x; /* Current x value*/ for(x = 0.0; x <= TWO_PI; x = x + (TWO_PI / STEPS)){ printf(“%f = sin(%f) \n”, sin(x), x); } } page 727 • Pointers are a very unique feature of ‘C’. First recall that each variable uses a real location in memory. The computer remembers where the location of that variable is, this memory of loca- tion is called a pointer. This pointer is always hidden from the programmer, and uses it only in the background. In ‘C’, the pointer to a variable may be used. We may use some of the opera- tions of ‘C’ to get the variable that the pointer, points to. This allows us to deal with variables in a very powerful way. A Sample Program to Get a String Then Print its ASCII Values (with matrix) #include “stdio.h” #define STRING_LENGTH 5 main() { int i; char string[STRING_LENGTH]; /* character array */ gets(string); /* Input string from keyboard */ for(i = 0; i < STRING_LENGTH; i++){ printf(“pos %d, char %c, ASCII %d \n”, i, string[i], string[i]); } } INPUT: HUGH<return> OUTPUT: pos 0, char H, ASCII 72 pos 0, char U, ASCII 85 pos 0, char G, ASCII 71 pos 0, char H, ASCII 72 pos 0, char , ASCII 0 page 728 25.4 HOW A ‘C’ COMPILER WORKS • A ‘C’ compiler has three basic components: Preprocessor, First and Second Pass Compiler, and Linker. A Sample Program to Get a String Then Print its ASCII Values (with pointers): #include “stdio.h” main() { int i; char *string; /* character pointer */ gets(string); /* Input string from keyboard */ for(i = 0; string[i] != 0; i++){ printf(“ pos %d, char %c, ASCII %d \n”, i, string[i], string[i]); } } INPUT: HUGH<return> OUTPUT: pos 0, char H, ASCII 72 pos 0, char U, ASCII 85 pos 0, char G, ASCII 71 pos 0, char H, ASCII 72 page 729 25.5 STRUCTURED ‘C’ CODE • A key to well designed and understandable programs. The Preprocessor Will remove comments, replace strings which have a defined value, include programs, and remove unneeded characters. The First and Second Pass The compiler will parse the program and check the syn- tax. TheSecond Pass produces some simple machine language, which performs the basic functions of the program. The Linker The compiler will combine the basic machine language from the first pass and combine it with the pieces of machine language in the compiler libraries. An opti- mization operation may be used to reduce execution time. Source code “filename.c” #include files (like “stdio.h”) Library files ASCII Text Code Object Code (*.obj) Executable Code (*.exe) (*.lib) page 730 • Use indents, spaces and blank lines, to make the program look less cluttered, and give it a block style. • Comments are essential to clarify various program parts. • Descriptive variable names, and defined constants make the purpose of the variable obvious. • All declarations for the program should be made at the top of the program listing. 25.6 ARCHITECTURE OF ‘C’ PROGRAMS (TOP-DOWN) 25.6.1 How? • A program should be broken into fundamental parts (using functions for each part) and then assembled using functions. Each function consists of programs written using the previous sim- pler functions. A Sample of a Bad Program Structure: main(){int i;for(;i<10;i++)printf(“age:%d\n”,i);} A Good Example of the same Program: #include <stdio.h> #define COUNT 10 /* Number of counts in loop */ main() { int i; /* counter */ for(i = 0; i < COUNT; i++){ /* loop to print numbers */ printf(“age:%d\n”, i); } exit(0); } page 731 • A Clear division should be maintained between program levels. • Never use goto’s, they are a major source of logic errors. Functions are much easier to use, once written. • Try to isolate machine specific commands (like graphics) into a few functions. 25.6.2 Why? • A top-down design allows modules to be tested as they are completed. It is much easier to find an error in a few lines of code, than in a complete program. • When programs are complete, errors tend to be associated with modules, and are thus much eas- ier to locate. • Updates to programs are much easier, when we only need to change one function. • It is just as easy to change the overall flow of a program, as it is to change a function. Application of ‘C’ to a CAD Program 25.7 CREATING TOP DOWN PROGRAMS 1. Define Objectives - Make a written description of what the program is expected to do. 2. Define Problem - Write out the relevant theory. This description should include variables, cal- culations and figures, which are necessary for a complete solution to the problem. From this we make a list of required data (inputs) and necessary results (output). 3. Design User Interface - The layout of the screen(s) must be done on paper. The method of data entry must also be considered. User options and help are also considered here. (There are numerous factors to be considered at this stage, as outlined in the course notes.) Example with a Car Frame Engine Suspension Body Wheel Frame is like one subroutine which also calls other subroutines like Suspension page 732 4. Write Flow Program - This is the main code that decides when general operations occur. This is the most abstract part of the program, and is written calling dummy ‘program stubs’. 5. Expand Program - The dummy ‘stubs’ are now individually written as functions. These func- tions will call another set of dummy ‘program stubs’. This continues until all of the stubs are completed. After the completion of any new function, the program is compiled, tested and debugged. 6. Testing and Debugging- The program operation is tested, and checked to make sure that it meets the objectives. If any bugs are encountered, then the program is revised, and then retested. 7. Document - At this stage, the operation of the program is formally described. For Programmers, a top-down diagram can be drawn, and a written description of functions should also be given. Golden Rule: If you are unsure how to proceed when writing a program, then work out the prob- lem on paper, before you commit yourself to your programmed solution. Note: Always consider the basic elements of Software Engineering, as outlined in the ES488 course notes. 25.8 HOW THE BEAMCAD PROGRAM WAS DESIGNED 25.8.1 Objectives: • The program is expected to aid the design of beams by taking basic information about beam geometry and material, and then providing immediate feedback. The beam will be simply sup- ported, and be under a single point load. The program should also provide a printed report on the beam. 25.8.2 Problem Definition: • The basic theory for beam design is available in any good mechanical design textbook. In this example it will not be given. • The inputs were determined to be few in number: Beam Type, Beam Material, Beam Thickness, Beam Width, Beam Height, Beam Length, Load Position, Load Force. • The possible outputs are Cross Section Area, Weight, Axial Stiffness, Bending Stiffness, and Beam Deflection, a visual display of Beam Geometry, a display of Beam Deflection. page 733 25.8.3 User Interface: 25.8.3.1 - Screen Layout (also see figure): • The small number of inputs and outputs could all be displayed, and updated, on a single screen. • The left side of the screen was for inputs, the right side for outputs. • The screen is divided into regions for input(2), input display and prompts(1), Beam Cross sec- tion(3), Numerical Results(4), and Beam Deflection(5). 25.8.3.2 - Input: • Current Inputs were indicated by placing a box around the item on the display(1). • In a separate Prompt Box(2), this input could be made. • The cursor keys could be used to cursor the input selector up or down. • Single keystroke operation. • Keys required: UP/DOWN Cursors, F1, F2, F4, numbers from ‘0’ to ‘9’, ‘.’, ‘-’, and <RETURN>. In the spirit of robustness it was decided to screen all other keys. 25.8.3.3 - Output: • Equations, calculations, material types, and other relevant information were obtained from a text. • Proper textual descriptions were used to ensure clarity for the user. • For a printed report, screen information would be printed to a printer, with the prompt area replaced with the date and time. 25.8.3.4 - Help: • A special set of help information was needed. It was decided to ensure that the screen always displays all information necessary(2). page 734 25.8.3.5 - Error Checking: • Reject any input which violates the input limits. • A default design was given, which the user could modify. • An error checking program was created, which gives error messages. 25.8.3.6 - Miscellaneous: • The screen was expressed in normalized coordinates by most sub-routines. • Colors were used to draw attention, and highlight areas. page 735 25.8.4 Flow Program: 25.8.5 Expand Program: • The routines were written in a top down fashion, in a time of about 30 hours. These routines are listed below. main() /* * EXECUTIVE CONTROL LEVEL * * This is the main terminal point between the * various stages of setup, input, revision * and termination. * * January 29th, 1989. */ { static int error; if((error = setup()) != ERROR) { screen(NEW); screen(UPDATE); while((error = input()) != DONE) { if(error == REVISED) { screen(NEW); screen(UPDATE); } } error = NO_ERROR; } kill(); if(error == ERROR) { printf(“EGA Graphics Driver Not Installed”); } } page 736 • Condition and error flags were used to skip unnecessary operations, and thus speed up response. A response of more than 0.5 seconds will result in loss of attention by the user. Routines Used In Package: • main() - to be used as the main program junction. • setup() - to set up graphics mode and printer. • screen() - A function to draw, or refresh part of the screen. In the interest of program speed, this function uses some low level commands. • calculations() - perform the calculations of outputs from the inputs • picture() - draws the beam cross section and deflection of beam. For the sake of speed, this section will use low level commands. • input() - A function which controls the main input loop for numbers, controls, error screen- ing, and any calls to desired routines. Input uses both higher and lower level commands for the sake of speed. • printes() - A function to print the EGA screen. • printer() - A function to remove help messages from the screen, and then dumps the screen to the printer. • enter() - checks for entry error, against a set of limits for any input. • text() - A function to print text on the screen at normalized coords. • draw_line() - A Function to draw a line in normalized coords. • box() - A Function to draw a double lined box anywhere on screen. • kill() - deinitialize anything initialized in setup(). page 737 25.8.6 Testing and Debugging: • The testing and debugging was very fast, with only realignment of graphics being required. This took a couple of hours. 25.8.7 Documentation screen() printer() main() printes() input() kill() calculations() picture() setup() box() text() enter() draw_line() In this case we see that most of the routines are at the bot- tom of the design tree. This structure shows a clear division of tasks, to their basic parts. On the above dia- gram, none of the functions calls any of the functions to the left of it, only to the right. In this case main() will call setup(), screen(), input() and kill() directly. Top Down High Level Executive Subroutine Low Level Specific Subroutines Machine Dependence Increases Consideration of detail Consideration of flow page 738 25.8.7.1 - Users Manual: • The documentation included an Executive Summary of what the Program does. • The Objectives of the program were described. • The theory for beam design was given for the reference of any program user, who wanted to ver- ify the theory, and possible use it. • A manual was given which described key layouts, screen layout, basic sequence of operations, inputs and outputs. • Program Specifications were also given. • A walk through manual was given. This allowed the user to follow an example which displayed all aspects of the program. 25.8.7.2 - Programmers Manual: • Design Strategy was outlined and given. • A complete program listing was given (with complete comments). • Complete production of this Documentation took about 6 hours. 25.8.8 Listing of BeamCAD Program. • Written for turbo ‘C’ 25.9 PRACTICE PROBLEMS 1. What are the basic components of a ‘C’ compiler, and what do they do? 2. You have been asked to design a CAD program which will choose a bolt and a nut to hold two pieces of sheet metal together. Each piece of sheet metal will have a hole drilled in it that is the size of the screw. You are required to consider that the two pieces are experiencing a single force. State your assumptions about the problem, then describe how you would produce this program with a Top Down design. 3. What are some reasons for using ‘C’ as a programming language? page 739 4. Describe some of the reasons for Using Top-Down Design, and how to do it. page 740 26. UNITS AND CONVERSIONS • Units are essential when describing real things. • Good engineering practice demands that each number should always be accom- panied with a unit. 26.1 HOW TO USE UNITS • This table does not give an exhaustive list of conversion factors, but instead a minimal (but fairly complete) set is given. From the values below any conversion value can be derived. If you are not sure about this, ask the instructor to show you how. • A simple example of unit conversion is given below, d x 10m = d y 5ft · = Given, **a simple unit conversion example: Find the distance ‘d’, d d x 2 d y 2 + = d ∴ 10m ( ) 2 5ft ( ) 2 + = d ∴ 100m 2 25ft 2 + = 1ft 0.3048m = 1 ∴ 0.3048m 1ft --------------------- = d ∴ 100m 2 25ft 2 0.3048m 1ft --------------------- ¸ , ¸ _ 2 + = d ∴ 100m 2 25ft 2 0.092903 ( ) m 2 ft 2 ------ + = d ∴ 100m 2 25 0.092903 ( )m 2 + = d ∴ 102.32m 2 10.12m = = From the tables keep the units in the equation multiply by 1 cancel out units page 741 26.2 HOW TO USE SI UNITS 1. Beware upper/lower case letter in many cases they can change meanings. e.g. m = milli, mega 2. Try to move prefixes out of the denominator of the units. e.g., N/cm or KN/m 3. Use a slash or exponents. e.g., (kg•m/s 2 ) or (kg•m•s -2 ) 4. Use a dot in compound units. e.g., N•m 5. Use spaces to divide digits when there are more than 5 figures, commas are avoided because their use is equivalent to decimal points in some cultures. • In some cases units are non-standard. There are two major variations US units are marked with ‘US’ and Imperial units are marked with ‘IMP’. 26.3 THE TABLE Major Division Distance 1 ft. (feet) = 12 in. (inches) = 0.3048 m (meter) 1 mile = 1760 yards = 5280 ft = 1.609km 1 in.(inch) = 2.540 cm 1 yd (yard) = 3 ft. 1 nautical mile = 6080 ft. = 1852 m = 1.150782 mi 1 micron = 10 -6 m 1 angstrom = 10 -10 m 1 mil = 10 -6 m 1 acre = 43,560 ft. = 0.4047 hectares page 742 1 furlong = 660 ft 1 lightyear = 9.460528e15 m 1 parsec = 3.085678e16 m Area 1 acre = 43,559.66 ft 2 1 Hectare (ha) = 10,000 m 2 1 Hectare (ha) = 10,000 m 2 1 Hectare (ha) = 10,000 m 2 1 Hectare (ha) = 10,000 m 2 Velocity 1 mph = 0.8689762 knot Angle 1 rev = 2PI radians = 360 degrees = 400 gradians 1 degree = 60 minutes 1 minute = 60 seconds Volume 1 US gallon = 231 in 3 1 CC = 1 cm 3 1 IMP gallon = 277.274 in 3 1 barrel = 31 IMP gal. = 31.5 US gal. 1 US gal. = 3.785 l = 4 quarts = 8 pints = 16 cups 1 liter (l) = 0.001 m 3 = 2.1 pints (pt) = 1.06 quarts (qt) = 0.26 gallons (gal) 1 qt (quart) = 0.9464 l 1 cup (c) = 0.2365882 l = 8 USoz 1 US oz = 1 dram = 456.0129 drops = 480 US minim = 1.040842 IMP oz = 2 tablespoons = 6 teaspoons 1 IMP gal. = 1.201 U.S. gal. 1 US pint = 16 US oz 1 IMP pint = 20 IMP oz 1tablespoon = 0.5 oz. 1 bushel = 32 quarts 1 peck = 8 quarts Force/Mass 1 N (newton) = 1 kg•m/s 2 = 100,000 dyne 1 dyne = 2.248*10 -6 lb. (pound) 1 kg = 9.81 N (on earth surface) = 2.2046 lb 1lb = 16 oz. (ounce) = 4.448N 1 oz. = 28.35 g (gram) = 0.2780N page 743 1 lb = 0.03108 slug 1 kip = 1000 lb. 1 slug = 14.59 kg 1 imperial ton = 2000 lb = 907.2 kg 1 metric tonne = 1000 kg 1 troy oz = 480 grain (gr) 1 g = 5 carat 1 pennyweight = 24 grain 1 stone = 14 lb 1 long ton = 2240 lb 1 short ton = 2000 lb Pressure 1 Pascal (Pa) = 1 N/m 2 = 6.895 kPa 1 atm (metric atmos.) =760 mmHg at 0°C=14.223 lb/in 2 =1.0132*10 5 N/m 2 1 psi = 2.0355 in. Hg at 32F = 2.0416 in. Hg at 62F 1 microbar = 0.1 N/m 2 Scale/Magnitude atto (a) = 10 -18 femto (f) = 10 -15 pico (p) = 10 -12 nano (n) = 10 -9 micro (µ) = 10 -6 milli (m) = 10 -3 centi (c) 10 -2 deci (d) = 10 -1 deka (da) = 10 hecto (H) = 10 2 kilo (K) = 10 3 mega (M) = 10 6 giga (G) = 10 9 tera (T) = 10 12 peta (P) = 10 15 exa (E) = 10 18 Power 1 h.p. (horsepower) = 745.7 W (watts) = 2.545 BTU/hr. = 550 ft.lb./sec. 1 ft•lb/s = 1.356 W 1 J (joule) = 1 N•m = 10 7 ergs = 0.2389 cal. 1 W = 1 J/s page 744 1 ev = 1.60219*10 -19 J 1 erg = 10 -7 J Temperature °F = [(°C*9)/5]+32, °C = Celsius (Centigrade), F = Fahrenheit K = Kelvin Rankine (R) = F - 459.666 0.252 calories = 1 BTU (British Thermal Unit) -273.2 °C = -459.7 °F = 0 K = 0 R = absolute zero 0 °C = 32 °F = 273.3 K = 491.7 R = Water Freezes 100°C = 212°F = 373.3 K = 671.7 R = Water Boils (1 atm. pressure) 1 therm = 100,000 BTU Mathematical π radians = 3.1416 radians = 180 degrees = 0.5 cycles 1 Hz = 1 cycle/sec. 1 rpm (revolutions per minute) = 60 RPS (Revolutions per second) = 60Hz 1 fps (foot per second) = 1 ft/sec 1 mph (miles per hour) = 1 mi./hr. 1 cfm (cubic foot per minute) = 1 ft 3 /min. e = 2.718 Time 1 Hz (hertz) = 1 s -1 1 year = 365 days = 52 weeks = 12 months 1 leap year = 366 days 1 day = 24 hours 1 fortnight = 14 days 1 hour = 60 min. 1 min = 60 seconds 1 millenium = 1000 years 1 century = 100 years 1 decade = 10 years Physical Constants R = 1.987 cal/mole K = ideal gas law constant K = Boltzmann’s constant = 1.3x10 -16 erg/K = 1.3x10 -23 J/K h = Planck’s constant = 6.62x10 -27 erg-sec = 6.62x10 -34 J.sec Avagadro’s number = 6.02x10 23 atoms/atomic weight density of water = 1 g/cm 3 electron charge = 1.60x10 -19 coul. electron rest mass = 9.11*10**-31 kg proton rest mass = 1.67*10**-27 kg page 745 speed of light (c) = 3.00x10 10 cm/sec speed of sound in dry air 25 C = 331 m/s gravitational constant = 6.67*10**-11 Nm**2/kg**2 permittivity of free space = 8.85*10**-12 farad/m permeability of free space = 1.26*10**-6 henry/m mean radius of earth = 6370 Km mass of earth = 5.98*10**24 kg Electromagnetic magnetic flux = weber (We) = 10**8 maxwell inductance = henry magnetic flux density = tesla (T) = 10**4 gauss magnetic intensity = ampere/m = 0.004*PI oersted electric flux density = coulomb/m**2 capacitance = farad permeability = henry/m electric field strength = V/m luminous flux = lumen luminance = candela/m**2 1 flame = 4 foot candles = 43.05564 lux = 43.05564 meter-candles illumination = lux resistance = ohm 26.4 ASCII, HEX, BINARY CONVERSION • The table below will allow conversions between decimal, binary, hexadecimal, and ASCII values. The values shown only go up to 127. ASCII values above this are not commonly used in robust applications. page 746 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR S0 S1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US d e c i m a l h e x a d e c i m a l b i n a r y A S C I I 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 space ! “ # $ % & ‘ ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? d e c i m a l h e x a d e c i m a l b i n a r y A S C I I page 747 26.5 G-CODES • A basic list of ‘G’ operation codes is given below. These direct motion of the tool. 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 01000000 01000001 01000010 01000011 01000100 01000101 01000110 01000111 01001000 01001001 01001010 01001011 01001100 01001101 01001110 01001111 01010000 01010001 01010010 01010011 01010100 01010101 01010110 01010111 01011000 01011001 01011010 01011011 01011100 01011101 01011110 01011111 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ yen ] ^ _ d e c i m a l h e x a d e c i m a l b i n a r y A S C I I 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 01100000 01100001 01100010 01100011 01100100 01100101 01100110 01100111 01101000 01101001 01101010 01101011 01101100 01101101 01101110 01101111 01110000 01110001 01110010 01110011 01110100 01110101 01110110 01110111 01111000 01111001 01111010 01111011 01111100 01111101 01111110 01111111 ‘ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } r arr. l arr. d e c i m a l h e x a d e c i m a l b i n a r y A S C I I page 748 G00 - Rapid move (not cutting) G01 - Linear move G02 - Clockwise circular motion G03 - Counterclockwise circular motion G04 - Dwell G05 - Pause (for operator intervention) G08 - Acceleration G09 - Deceleration G17 - x-y plane for circular interpolation G18 - z-x plane for circular interpolation G19 - y-z plane for circular interpolation G20 - turning cycle or inch data specification G21 - thread cutting cycle or metric data specification G24 - face turning cycle G25 - wait for input #1 to go low (Prolight Mill) G26 - wait for input #1 to go high (Prolight Mill) G28 - return to reference point G29 - return from reference point G31 - Stop on input (INROB1 is high) (Prolight Mill) G33-35 - thread cutting functions (Emco Lathe) G35 - wait for input #2 to go low (Prolight Mill) G36 - wait for input #2 to go high (Prolight Mill) G40 - cutter compensation cancel G41 - cutter compensation to the left G42 - cutter compensation to the right G43 - tool length compensation, positive G44 - tool length compensation, negative G50 - Preset position G70 - set inch based units or finishing cycle G71 - set metric units or stock removal G72 - indicate finishing cycle (EMCO Lathe) G72 - 3D circular interpolation clockwise (Prolight Mill) G73 - turning cycle contour (EMCO Lathe) G73 - 3D circular interpolation counter clockwise (Prolight Mill) G74 - facing cycle contour (Emco Lathe) G74.1 - disable 360 deg arcs (Prolight Mill) G75 - pattern repeating (Emco Lathe) G75.1 - enable 360 degree arcs (Prolight Mill) G76 - deep hole drilling, cut cycle in z-axis G77 - cut-in cycle in x-axis G78 - multiple threading cycle G80 - fixed cycle cancel G81-89 - fixed cycles specified by machine tool manufacturers G81 - drilling cycle (Prolight Mill) G82 - straight drilling cycle with dwell (Prolight Mill) G83 - drilling cycle (EMCO Lathe) page 749 G83 - peck drilling cycle (Prolight Mill) G84 - taping cycle (EMCO Lathe) G85 - reaming cycle (EMCO Lathe) G85 - boring cycle (Prolight mill) G86 - boring with spindle off and dwell cycle (Prolight Mill) G89 - boring cycle with dwell (Prolight Mill) G90 - absolute dimension program G91 - incremental dimensions G92 - Spindle speed limit G93 - Coordinate system setting G94 - Feed rate in ipm (EMCO Lathe) G95 - Feed rate in ipr (EMCO Lathe) G96 - Surface cutting speed (EMCO Lathe) G97 - Rotational speed rpm (EMCO Lathe) G98 - withdraw the tool to the starting point or feed per minute G99 - withdraw the tool to a safe plane or feed per revolution G101 - Spline interpolation (Prolight Mill) • M-Codes control machine functions and these include, M00 - program stop M01 - optional stop using stop button M02 - end of program M03 - spindle on CW M04 - spindle on CCW M05 - spindle off M06 - tool change M07 - flood with coolant M08 - mist with coolant M08 - turn on accessory #1 (120VAC outlet) (Prolight Mill) M09 - coolant off M09 - turn off accessory #1 (120VAC outlet) (Prolight Mill) M10 - turn on accessory #2 (120VAC outlet) (Prolight Mill) M11 - turn off accessory #2 (120VAC outlet) (Prolight Mill) or tool change M17 - subroutine end M20 - tailstock back (EMCO Lathe) M20 - Chain to next program (Prolight Mill) M21 - tailstock forward (EMCO Lathe) M22 - Write current position to data file (Prolight Mill) M25 - open chuck (EMCO Lathe) M25 - set output #1 off (Prolight Mill) M26 - close chuck (EMCO Lathe) M26 - set output #1 on (Prolight Mill) M30 - end of tape (rewind) M35 - set output #2 off (Prolight Mill) page 750 M36 - set output #2 on (Prolight Mill) M38 - put stepper motors on low power standby (Prolight Mill) M47 - restart a program continuously, or a fixed number of times (Prolight Mill) M71 - puff blowing on (EMCO Lathe) M72 - puff blowing off (EMCO Lathe) M96 - compensate for rounded external curves M97 - compensate for sharp external curves M98 - subprogram call M99 - return from subprogram, jump instruction M101 - move x-axis home (Prolight Mill) M102 - move y-axis home (Prolight Mill) M103 - move z-axis home (Prolight Mill) • Other codes and keywords include, Annn - an orientation, or second x-axis spline control point Bnnn - an orientation, or second y-axis spline control point Cnnn - an orientation, or second z-axis spline control point, or chamfer Fnnn - a feed value (in ipm or m/s, not ipr), or thread pitch Innn - x-axis center for circular interpolation, or first x-axis spline control point Jnnn - y-axis center for circular interpolation, or first y-axis spline control point Knnn - z-axis center for circular interpolation, or first z-axis spline control point Lnnn - arc angle, loop counter and program cycle counter Nnnn - a sequence/line number Onnn - subprogram block number Pnnn - subprogram reference number Rnnn - a clearance plane for tool movement, or arc radius, or taper value Qnnn - peck depth for pecking cycle Snnn - cutting speed (rpm), spindle speed Tnnn - a tool number Unnn - relative motion in x Vnnn - relative motion in y Wnnn - relative motion in z Xnnn - an x-axis value Ynnn - a y-axis value Znnn - a z-axis value ; - starts a comment (proLight Mill), or end of block (EMCO Lathe) page 751 27. ATOMIC MATERIAL DATA 28. MECHANICAL MATERIAL PROPERTIES Table 5: M a t e r i a l T y p e D e n s i t y E G p o i s s o n t e n - y i e l d s t r e s s t e n - u l t . s t r e s s t e n - y i e l d s t r a i n y i e l d s t r e s s - c o m p . u l t . s t r e s s - c o m p . u l t . s t r e s s - s h e a r t h e r m a l e x p a n s i o n ( M g / m 3 ) ( G P a ) ( G P a ) ( M P a ) ( % ) ( M P a ) 1 0 - 6 / d e g C aluminum typical 2.6-2.8 70-79 26-30 0.33 35-500 100-550 1-45 23 1100-h14 2024-T6 5456-h116 2014-T6 2.8 73 36-41 0.33 410 480 13 6061-T6 2.8 70 26 0.33 270 310 17 7075-T6 2.7 72 26 0.33 480 550 11 Element copper iron aluminum tungsten zinc silicon carbon titanium Atomic # 29 26 13 74 30 14 6 22 Atomic weight 63.57 55.85 26.97 183.85 65.37 28.09 12.01 47.9 density g/cm 3 8.96 7.86 2.67 19.3 7.13 2.33 2.1 4.51 Valances 1/2 2/3 3 6/8 2 4 2/4 3/4 H w F = 96,500 coulombs page 752 Brass typical 8.4-8.6 96-110 36-41 0.34 70-550 200-620 4-60 19.1- 21.2 Yellow Brass cold rolled annealed Red Brass cold rolled annealed Bronze typical 8.2-8.8 96-120 36-44 0.34 82-690 200-830 5-60 18-21 Cast Iron typical 7.0-7.4 83-170 32-69 0.2-0.3 120 69-480 0-1 340- 1400 9.9-12 Concrete typical 2.3 17-31 na 0.1-0.2 10-70 7-14 reinforced 2.4 17-31 na 0.1-0.2 lightweight 1.1-1.8 17-31 na 0.1-0.2 Copper typical 8.9 110-120 40-47 0.33- 0.36 55-760 230-830 4-50 16.6- 17.6 annealed hard drawn Glass typical 2.4-2.8 48-83 19-35 0.17- 0.27 30-1000 0 5-11 Plate 70 Fibers 7000- 20000 Magnesium typ. alloys 1.76- 1.83 41-45 15-17 0.35 80-280 140-340 2-20 26.1- 28.8 Monel 67%Ni,30% Cu 8.8 170 66 0.32 170- 1100 450- 1200 2-50 14 Nickel 8.8 210 80 0.31 100-620 310-760 2-50 13 Table 5: M a t e r i a l T y p e D e n s i t y E G p o i s s o n t e n - y i e l d s t r e s s t e n - u l t . s t r e s s t e n - y i e l d s t r a i n y i e l d s t r e s s - c o m p . u l t . s t r e s s - c o m p . u l t . s t r e s s - s h e a r t h e r m a l e x p a n s i o n ( M g / m 3 ) ( G P a ) ( G P a ) ( M P a ) ( % ) ( M P a ) 1 0 - 6 / d e g C page 753 Plastics Nylon .88-1.1 2.1-3.4 na 0.4 40-80 20-100 70-140 Polyethylene .96-1.4 0.7-1.4 na 0.4 7-28 15-300 140-290 Rock 5-9 Granite 2.6-2.9 40-100 na 0.2-0.3 50- 280 Marble 2.6-2.9 40-100 na 0.2-0.3 50- 280 Quartz 2.6-2.9 40-100 na 0.2-0.3 50- 280 Limestone 2.0-2.9 20-70 na 0.2-0.3 20- 200 Sandstone 2.0-2.9 20-70 na 0.2-0.3 20- 200 Rubber typical .96-1.3 0.0007- 0.004 0.0002- 0.001 0.45- 0.50 1-7 7-20 100-800 130-200 Sand,soil,gra vel 1.2-2.2 Steel 7.85 190-210 75-80 0.27- 0.30 10-18 cold rolled annealed high strength 340- 1000 550- 1200 5-25 14 machine 340-700 550-860 5-25 spring 400- 1600 700- 1900 3-15 stainless 280-700 400- 1000 5-40 tool 520 900 8 structural 200-700 340-830 10-40 12 astm-a48 Table 5: M a t e r i a l T y p e D e n s i t y E G p o i s s o n t e n - y i e l d s t r e s s t e n - u l t . s t r e s s t e n - y i e l d s t r a i n y i e l d s t r e s s - c o m p . u l t . s t r e s s - c o m p . u l t . s t r e s s - s h e a r t h e r m a l e x p a n s i o n ( M g / m 3 ) ( G P a ) ( G P a ) ( M P a ) ( % ) ( M P a ) 1 0 - 6 / d e g C page 754 28.1 FORMULA SHEET • A collection of the essential mechanics of materials formulas are given below astm-a47 astm-a36 250 400 30 12 astm-a5242 astm-a441 astm-a572 340 500 20 12 astm-a514 700 830 15 12 wire 280- 1000 550- 1400 5-40 Stainless Steel aisi 302 17 Titanium typ. alloys 4.5 100-120 39-44 0.33 760- 1000 900- 1200 10 8.1-11 Tungsten 1.9 340-380 140-160 0.2 1400- 4000 0-4 4.3 Water fresh 1.0 sea 1.02 Wood (dry) Douglas fir .48-.56 11-13 30-50 50-80 30-50 40-70 Oak .64-.72 11-12 40-60 50-100 30-40 30-50 Southern pine .56-.64 11-14 40-60 50-100 30-50 40-70 Table 5: M a t e r i a l T y p e D e n s i t y E G p o i s s o n t e n - y i e l d s t r e s s t e n - u l t . s t r e s s t e n - y i e l d s t r a i n y i e l d s t r e s s - c o m p . u l t . s t r e s s - c o m p . u l t . s t r e s s - s h e a r t h e r m a l e x p a n s i o n ( M g / m 3 ) ( G P a ) ( G P a ) ( M P a ) ( % ) ( M P a ) 1 0 - 6 / d e g C page 755 Axial/Normal Stress/Strain σ εE P A --- = = δ εL PL AE ------- = = Shear Stress/Strain τ γG = γ xy τ xy G ------- = Poisson’s ratio ν ε lateral ε longitudinal --------------------------- – = E 2G 1 ν + ( ) = ε x σ x E ----- ν σ y E ----- – ν σ z E ----- – = Torsion τ max Tc J ------ = γ max τ max G ---------- = φ TL JG ------- = J πr 4 2 -------- = σ ten σ – comp τ = = J π 2 --- r o 4 r i 4 – ( ) = (cylinder) (hollow tube) ε γ 2 -- - = P 2πfT = page 756 Beams σ My I ------- - – = I bh 3 12 -------- = (for rectangle) τ VQ Ib -------- = I πr 4 2 -------- = (for circle) L ρθ = ε max c ρ --- = σ My I ------- - – = ρ EI M ----- - = Buckling P π 2 EI k 2 L 2 ------------ < k=0.5 (both ends fixed) k=0.7 (one end fixed, one pinned) k=1.0 (both ends pinned) k=2.0 (one end pinned, one free) P P d/2 d/2 r 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 r/d 3.0 2.5 2.0 1.5 K page 757 P P 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 r/d 2.5 2.0 1.5 1.0 K D r d D/d = 2.0 D/d = 1.5 D/d = 1.25 D/d = 1.1 page 758 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 r/d 2.5 2.0 1.5 1.0 K D r d D/d = 2.0 D/d = 1.33 D/d = 1.2 D/d = 1.1 T T page 1 Dynamic System Modeling and Control by Hugh Jack (Version 2.1, March 31, 2002) © Copyright 1993-2002 Hugh Jack page 1 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 1.1 1.2 1.3 1.4 BASIC TERMINOLOGY EXAMPLE SYSTEM SUMMARY PRACTICE PROBLEMS 20 21 21 21 2. TRANSLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 2.1 2.2 INTRODUCTION MODELING 2.2.1 Free Body Diagrams 2.2.2 Mass and Inertia 2.2.3 Gravity And Other Fields 2.2.4 Springs 2.2.5 Damping and Drag 2.2.6 Cables And Pulleys 2.2.7 Friction 2.2.8 Contact Points And Joints SYSTEM EXAMPLES OTHER TOPICS SUMMARY PRACTICE PROBLEMS 22 24 25 25 28 31 36 39 41 43 44 53 54 54 2.3 2.4 2.5 2.6 3. ANALYSIS OF DIFFERENTIAL EQUATIONS . . . . . . . . . . . . .60 3.1 3.2 3.3 INTRODUCTION EXPLICIT SOLUTIONS RESPONSES 3.3.1 First-order 3.3.2 Second-order 3.3.3 Other Responses RESPONSE ANALYSIS NON-LINEAR SYSTEMS 3.5.1 Non-Linear Differential Equations 3.5.2 Non-Linear Equation Terms 3.5.3 Changing Systems CASE STUDY SUMMARY PRACTICE PROBLEMS 60 61 70 71 76 80 84 86 86 90 93 99 103 103 3.4 3.5 3.6 3.7 3.8 4. NUMERICAL ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 4.1 4.2 4.3 INTRODUCTION THE GENERAL METHOD 4.2.1 State Variable Form NUMERICAL INTEGRATION 4.3.1 Numerical Integration With Tools 112 112 113 121 121 page 2 4.4 4.5 140 4.6 4.3.2 Numerical Integration 126 4.3.3 Taylor Series 131 4.3.4 Runge-Kutta Integration 132 SYSTEM RESPONSE 139 4.4.1 Steady-State Response 139 DIFFERENTIATION AND INTEGRATION OF EXPERIMENTAL ADVANCED TOPICS 4.6.1 Switching Functions 4.6.2 Interpolating Tabular Data 4.6.3 Modeling Functions with Splines 4.6.4 Non-Linear Elements CASE STUDY SUMMARY PRACTICE PROBLEMS 141 141 144 145 147 147 155 155 DATA 4.7 4.8 4.9 5. ROTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 5.1 5.2 INTRODUCTION MODELING 5.2.1 Inertia 5.2.2 Springs 5.2.3 Damping 5.2.4 Levers 5.2.5 Gears and Belts 5.2.6 Friction 5.2.7 Permanent Magnet Electric Motors OTHER TOPICS DESIGN CASE SUMMARY PRACTICE PROBLEMS 161 162 163 167 172 174 175 179 181 182 183 187 187 5.3 5.4 5.5 5.6 6. INPUT-OUTPUT EQUATIONS . . . . . . . . . . . . . . . . . . . . . . . . .199 6.1 6.2 6.3 INTRODUCTION THE DIFFERENTIAL OPERATOR INPUT-OUTPUT EQUATIONS 6.3.1 Converting Input-Output Eqautions to State Equations 6.3.2 Integrating Input-Output Eqautions DESIGN CASE SUMMARY PRACTICE PROBLEMS REFERENCES 199 199 202 204 206 208 217 217 221 6.4 6.5 6.6 6.7 7. ELECTRICAL SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 7.1 INTRODUCTION 222 page 3 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 MODELING 7.2.1 Resistors 7.2.2 Voltage and Current Sources 7.2.3 Capacitors 7.2.4 Inductors 7.2.5 Op-Amps IMPEDANCE EXAMPLE SYSTEMS PERMANENT MAGNET DC MOTORS INDUCTION MOTORS BRUSHLESS SERVO MOTORS OTHER TOPICS SUMMARY PRACTICE PROBLEMS 222 223 225 229 231 232 237 239 247 249 250 253 253 253 8. FEEDBACK CONTROL SYSTEMS . . . . . . . . . . . . . . . . . . . . . .262 8.1 8.2 8.3 INTRODUCTION TRANSFER FUNCTIONS CONTROL SYSTEMS 8.3.1 PID Control Systems 8.3.2 Manipulating Block Diagrams 8.3.3 A Motor Control System Example 8.3.4 System Error 8.3.5 Controller Transfer Functions 8.3.6 State Variable Control Systems 8.3.7 Feedforward Controllers 8.3.8 Cascade Controllers SUMMARY PRACTICE PROBLEMS 262 262 264 266 268 273 278 282 282 283 284 284 284 8.4 8.5 9. PHASOR ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 9.1 9.2 9.3 9.4 9.5 INTRODUCTION FOURIER TRANSFORMS FOR STEADY-STATE ANALYSIS VIBRATIONS SUMMARY PRACTICE PROBLEMS 294 294 301 303 303 10. BODE PLOTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 10.1 10.2 10.3 10.4 10.5 10.6 INTRODUCTION BODE PLOTS SIGNAL SPECTRUMS SUMMARY PRACTICE PROBLEMS LOG SCALE GRAPH PAPER 307 311 326 327 327 333 page 4 11. ROOT LOCUS ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336 11.1 11.2 11.3 11.4 INTRODUCTION ROOT-LOCUS ANALYSIS SUMMARY PRACTICE PROBLEMS 336 336 344 345 12. NONLINEAR SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 12.1 12.2 12.3 12.4 INTRODUCTION SYSTEM DIAGRAMS SUMMARY PRACTICE PROBLEMS 360 360 360 361 13. ANALOG INPUTS AND OUTPUTS . . . . . . . . . . . . . . . . . . . . .362 13.1 13.2 13.3 13.4 13.5 13.6 INTRODUCTION ANALOG INPUTS ANALOG OUTPUTS SHIELDING SUMMARY PRACTICE PROBLEMS 362 363 370 373 375 375 14. CONTINUOUS SENSORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377 14.1 14.2 INTRODUCTION 377 INDUSTRIAL SENSORS 378 14.2.1 Angular Displacement 379 Potentiometers 379 14.2.2 Encoders 380 Tachometers 384 14.2.3 Linear Position 384 Potentiometers 384 Linear Variable Differential Transformers (LVDT)385 Moire Fringes 387 Accelerometers 388 14.2.4 Forces and Moments 391 Strain Gages 391 Piezoelectric 394 14.2.5 Liquids and Gases 396 Pressure 396 Venturi Valves 396 Coriolis Flow Meter 398 Magnetic Flow Meter 399 Ultrasonic Flow Meter 399 Vortex Flow Meter 399 Pitot Tubes 400 14.2.6 Temperature 400 page 5 Resistive Temperature Detectors (RTDs) Thermocouples Thermistors Other Sensors 14.2.7 14.3 14.4 14.5 14.6 14.7 Light Light Dependant Resistors (LDR) INPUT ISSUES SENSOR GLOSSARY SUMMARY REFERENCES PRACTICE PROBLEMS 400 401 403 405 405 405 406 411 412 413 413 15. CONTINUOUS ACTUATORS . . . . . . . . . . . . . . . . . . . . . . . . . .417 15.1 15.2 INTRODUCTION ELECTRIC MOTORS 15.2.1 Brushed DC Motors 15.2.2 AC Synchronous Motors 15.2.3 Brushless DC Motors 15.2.4 Stepper Motors HYDRAULICS OTHER SYSTEMS SUMMARY PRACTICE PROBLEMS 417 417 418 423 425 426 428 429 429 429 15.3 15.4 15.5 15.6 16. MOTION CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432 16.1 16.2 16.3 INTRODUCTION MOTION PROFILES MULTI AXIS MOTION 16.3.1 Slew Motion Interpolated Motion 16.3.2 Motion Scheduling SUMMARY PRACTICE PROBLEMS 432 433 442 442 444 445 447 447 16.4 16.5 17. ELECTROMECHANICAL SYSTEMS . . . . . . . . . . . . . . . . . . . .450 17.1 17.2 17.3 17.4 17.5 INTRODUCTION MATHEMATICAL PROPERTIES 17.2.1 Induction EXAMPLE SYSTEMS SUMMARY PRACTICE PROBLEMS 450 450 450 455 462 462 18. FLUID SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 18.1 SUMMARY 463 page 6 18.2 18.3 18.4 18.5 MATHEMATICAL PROPERTIES 18.2.1 Resistance 18.2.2 Capacitance 18.2.3 Power Sources EXAMPLE SYSTEMS SUMMARY PRACTICE PROBLEMS 463 464 466 468 470 472 472 19. THERMAL SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473 19.1 19.2 INTRODUCTION MATHEMATICAL PROPERTIES 19.2.1 Resistance 19.2.2 Capacitance 19.2.3 Sources EXAMPLE SYSTEMS SUMMARY PRACTICE PROBLEMS 473 473 473 475 476 476 479 479 19.3 19.4 19.5 20. LAPLACE TRANSFER FUNCTIONS . . . . . . . . . . . . . . . . . . . .480 20.1 20.2 INTRODUCTION THE LAPLACE TRANSFORM 20.2.1 A Few Transforms 20.2.2 Impulse Response (or Why Laplace Transforms Work) MODELING MECHANICAL SYSTEMS MODELING ELECTRICAL SYSTEMS USING LAPLACE TRANSFORMS 20.5.1 Solving Partial Fractions 20.5.2 Input Functions 20.5.3 Examples A MAP OF TECHNIQUES FOR LAPLACE ANALYSIS NON-LINEAR ELEMENTS SUMMARY PRACTICE PROBLEMS REFERENCES 480 480 482 484 487 488 489 494 502 502 507 508 508 509 520 20.3 20.4 20.5 20.6 20.7 20.8 20.9 20.10 21. CONTROL SYSTEM ANALYSIS . . . . . . . . . . . . . . . . . . . . . . .521 21.1 21.2 INTRODUCTION 521 CONTROL SYSTEMS 521 21.2.1 PID Control Systems 523 21.2.2 Analysis of PID Controlled Systems With Laplace Transforms 21.2.3 Finding The System Response To An Input 21.2.4 Controller Transfer Functions ROOT-LOCUS PLOTS 528 533 533 525 21.3 page 7 21.4 21.5 21.6 21.3.1 Approximate Plotting Techniques DESIGN OF CONTINUOUS CONTROLLERS SUMMARY PRACTICE PROBLEMS 537 541 541 542 22. LABORATORY GUIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 22.1 Lab 1 - Introduction to Resources and Tutorials 547 22.1.1 Tutorial 1a - Creating Web Pages 547 22.1.2 Tutorial 1b - Introduction to Mathcad, Working Model 2D and 549 22.1.3 Presentation 1a - Introduction to Library Searches 550 Lab 2 - Computer Based Data Collection 551 22.2.1 Prelab 2a - Tutorial for LabVIEW Programming 551 22.2.2 Prelab 2b - Overview of Labview and the DAQ Cards 552 22.2.3 Experiment 2 - Introduction to LabVIEW and the DAQ Cards Lab 3 - Sensors and More Labview 557 22.3.1 Prelab 3 - Sensors 557 22.3.2 Experiment 3 - Measurement of Sensor Properties 558 Lab 4 - Motors 559 22.4.1 Prelab 4a - Permanent Magnet DC Motors 559 22.4.2 Experiment 4a - Modeling of a DC Motor 561 Lab 5 - Basic Control Systems 562 22.5.1 Prelab 6a - Servomotor Proportional Control Systems 562 22.5.2 Experiment 5a - Servomotor Proportional Control Systems564 Lab 6 - Basic System Components 565 22.6.1 Prelab 6a - Mechanical Components 565 22.6.2 Experiment 6a - Mechanical Components 569 Lab 7 - Oscillating Systems 570 22.7.1 Prelab 7a - Oscillating Systems 570 22.7.2 Experiment 7a - Oscillation of a Torsional Spring 571 Lab 8 - Servo Control Systems 572 22.8.1 Prelab 5a - Research 572 22.8.2 Experiment 5a - Tutorial and programming 573 TUTORIAL - ULTRA 5000 DRIVES AND MOTORS 573 Lab 9 - Filters 582 22.10.1 Prelab 9 - Filtering of Audio Signals 582 22.10.2 Experiment 9 - Filtering of Audio Signals 585 Lab 10 - Stepper Motors 586 22.11.1 Prelab 10 - Stepper Motors 586 22.11.2 Experiment 9 - Stepper Motors 587 TUTORIAL - STEPPER MOTOR CONTROLLERS (by A. Blauch and H. Lab 11 - Variable Frequency Drives 22.13.1 Prelab 11 - Variable Frequency Drives 592 592 The Internet 22.2 553 22.3 22.4 22.5 22.6 22.7 22.8 22.9 22.10 22.11 Jack) 22.12 588 22.13 page 8 22.14 DRIVES 593 22.15 22.16 22.13.2 Experiment 11 - Variable Frequency Drives 592 TUTORIAL - ALLEN BRADLEY 161 VARIABLE FREQUENCY TUTORIAL - ULTRA 100 DRIVES AND MOTORS TUTORIAL - DVT CAMERAS (UPDATE FROM 450???) 595 598 23. WRITING REPORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600 23.1 23.2 23.3 WHY WRITE REPORTS? THE TECHNICAL DEPTH OF THE REPORT TYPES OF REPORTS 23.3.1 Laboratory An Example First Draft of a Report An Example Final Draft of a Report 23.3.2 Research 23.3.3 Project 23.3.4 Executive 23.3.5 Consulting 23.3.6 Interim ELEMENTS 23.4.1 Figures 23.4.2 Tables 23.4.3 Equations 23.4.4 Experimental Data 23.4.5 Result Summary 23.4.6 References 23.4.7 Acknowledgments 23.4.8 Appendices GENERAL FORMATTING 600 600 601 601 602 609 609 609 610 610 610 610 611 612 613 613 614 614 614 615 615 23.4 23.5 24. MATHEMATICAL TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617 24.1 INTRODUCTION 24.1.1 Constants and Other Stuff 24.1.2 Basic Operations Factorial 24.1.3 Exponents and Logarithms 24.1.4 Polynomial Expansions 24.1.5 Practice Problems FUNCTIONS 24.2.1 Discrete and Continuous Probability Distributions 24.2.2 Basic Polynomials 24.2.3 Partial Fractions 24.2.4 Summation and Series 24.2.5 Practice Problems SPATIAL RELATIONSHIPS 24.3.1 Trigonometry 617 618 619 620 620 621 622 625 625 625 627 630 631 632 632 24.2 24.3 page 9 24.3.2 24.4 24.5 24.6 24.7 709 Hyperbolic Functions 637 Practice Problems 639 24.3.3 Geometry 640 24.3.4 Planes, Lines, etc. 657 24.3.5 Practice Problems 659 COORDINATE SYSTEMS 661 24.4.1 Complex Numbers 661 24.4.2 Cylindrical Coordinates 664 24.4.3 Spherical Coordinates 665 24.4.4 Practice Problems 666 MATRICES AND VECTORS 667 24.5.1 Vectors 667 24.5.2 Dot (Scalar) Product 668 24.5.3 Cross Product 673 24.5.4 Triple Product 675 24.5.5 Matrices 675 24.5.6 Solving Linear Equations with Matrices 680 24.5.7 Practice Problems 681 CALCULUS 686 24.6.1 Single Variable Functions 686 Differentiation 686 Integration 689 24.6.2 Vector Calculus 693 24.6.3 Differential Equations 695 First-order Differential Equations 696 Guessing 697 Separable Equations 697 Homogeneous Equations and Substitution 698 Second-order Differential Equations 699 Linear Homogeneous 699 Nonhomogeneous Linear Equations 700 Higher Order Differential Equations 702 Partial Differential Equations 702 24.6.4 Other Calculus Stuff 703 24.6.5 Practice Problems 703 NUMERICAL METHODS 709 24.7.1 Approximation of Integrals and Derivatives from Sampled Data 24.7.2 Euler First-order Integration 24.7.3 Taylor Series Integration 24.7.4 Runge-Kutta Integration 24.7.5 Newton-Raphson to Find Roots LAPLACE TRANSFORMS 24.8.1 Laplace Transform Tables z-TRANSFORMS 710 710 711 711 712 712 715 24.8 24.9 page 10 24.10 24.11 24.12 FOURIER SERIES TOPICS NOT COVERED (YET) REFERENCES/BIBLIOGRAPHY 718 718 719 25. A BASIC INTRODUCTION TO ‘C’ . . . . . . . . . . . . . . . . . . . . . .720 25.1 25.2 25.3 25.4 25.5 25.6 WHY USE ‘C’? BACKGROUND PROGRAM PARTS HOW A ‘C’ COMPILER WORKS STRUCTURED ‘C’ CODE ARCHITECTURE OF ‘C’ PROGRAMS (TOP-DOWN) 25.6.1 How? 25.6.2 Why? CREATING TOP DOWN PROGRAMS HOW THE BEAMCAD PROGRAM WAS DESIGNED 25.8.1 Objectives: 25.8.2 Problem Definition: 25.8.3 User Interface: Screen Layout (also see figure): Input: Output: Help: Error Checking: Miscellaneous: 25.8.4 Flow Program: 25.8.5 Expand Program: 25.8.6 Testing and Debugging: 25.8.7 Documentation Users Manual: Programmers Manual: 25.8.8 Listing of BeamCAD Program. PRACTICE PROBLEMS 720 720 720 728 729 730 730 731 731 732 732 732 733 733 733 733 733 734 734 735 735 737 737 738 738 738 738 25.7 25.8 25.9 26. UNITS AND CONVERSIONS . . . . . . . . . . . . . . . . . . . . . . . . . .740 26.1 26.2 26.3 26.4 26.5 HOW TO USE UNITS HOW TO USE SI UNITS THE TABLE ASCII, HEX, BINARY CONVERSION G-CODES 740 741 741 745 747 27. 28. ATOMIC MATERIAL DATA . . . . . . . . . . . . . . . . . . . . . . . . . . .751 MECHANICAL MATERIAL PROPERTIES . . . . . . . . . . . . . . .751 28.1 FORMULA SHEET 754 page 11 Course Number:EGR 345 Course Name:Dynamic Systems Modeling and Control Academic Unit:Padnos School of Engineering Semester:Fall 2000 Class Times:Lecture: 1-2pm - Mon, Wed, Fri in EC312 Lab 1: 8-11am - Tues - Dr. Adamczyk Lab 2: 1-4am - Thurs - Dr. Adamczyk Lab 3: 8-11am - Fri - Dr. Jack Description: Mathematical modeling of mechanical, electrical, fluid, and thermal dynamic systems involving energy storage and transfer by lumped parameter linear elements. Topics include model building, Laplace transforms, transfer functions, system response and stability, Fourier methods, frequency response feedback control, control methods, and computer simulation. Emphasis on linear mechanical systems. Laboratory. page 12 Prerequisites:EGR 214, MTH 302, ENG 150 Corequisites:EGR 314 - Dynamics Instructor:Dr. Hugh Jack, Office: 718 Eberhard Center Office hours: 2-3 Mon, Wed, Fri Phone: 771-6755 Email:
[email protected] Web: http://claymore.engineer.gvsu.edu Textbook:Close and Frederick, Modeling and Analysis of Dynamic Systems, Second Edition, Wiley, 1995. Jack, H. EGR345 Dynamic Systems Modeling and Control Course Notes, Grand Valley State University Software:Mathcad Working Model 2D Netscape Communicator page 13 FTP/Telnet Labview Excel Goals: and ability to The main objective of this course is to develop your knowledge mathematically model, simulate, and analyze dynamic systems. In the lab you will study the time and frequency response of dynamic systems and further develop your laboratory, data analysis, and report writing skills. During this course you will practice the application of differential equations to the solution of practical engineering problems and then verify some of these solutions in the laboratory. The overall goal is to improve your engineering problem solving ability in the area of time-varying systems. Another major objective is to improve your technical writing skills. To this end, this course has been designated a supplemental writing skills (SWS) course and significant time and effort will be spent on writing instruction and the creation of technical reports. 3. algebra. 1. 2.page 14 Instruction Methods: Lecture. 6. 9. Electric circuits Statics Trigonometry. 6. Prerequisite Topics: 1. matrices Calculus. differential equations and Laplace transforms Computer applications and programming Physics Introduction Systems variables and modeling Translation Rotation Electrical systems First and second order systems Laplace transforms Laplacian analysis Block diagrams for modeling and analysis Feedback systems for modeling and control Electromechanical systems Thermal systems Fluid systems Topics: Grading:Design project10% Labs and SWS writing skills40% Quizzes and assignments20% Final exam 30% Tests and assignments will be given at natural points during the term as new . assignments and projects. 10. laboratories. 2. 12. 8. 11. 3. 5. 4. 5. 13. 4. 7. discussion. The official university SWS statement is: “ This course is designated SWS (Supplemental Writing Skills). Details of this will be announced later. Students turn in a total of at least 3. Special attention will be paid to writing skills in the laboratories. or have passed the advanced placement exam with a score of 3 or higher. SWS credit will not be given to a student who completes the course before the prerequisite. and test the students global comprehension of the material. If you have not already done this.page 15 material is covered. As a result you MUST have already taken and passed ENG150 with a grade of C or better. but a substantial amount of it is made up of finished essays or reports or research papers. SWS courses adhere to certain guidelines. Completion of English 150 with a grade of C or better (not C-) is the prerequisite. Laboratory work will be assigned to reinforce lecture material and expose the student to practical aspects of systems modeling and control. The instructor works with .000 words or writing during the term. A final examination will be given to conclude the work. Part of that total may be essay exams. A design project will be done in class to emphasize lecture and lab topics. please see the instructor. SWS Required Statement: This course is designated SWS (Supplemental Writing Skills). At least four hours of class time are devoted to writing instruction.90 AB+ B 89-80 79-77 76-73 . rather than simply grading the finished pieces of writing.page 16 the students on revising drafts of their papers. At least one third of the final grade in the course is based on the writing assignments.” SWS Practical Implementation: The main source of writing grades are the laboratories and they are worth 40% of the final grade. It is expected that a typical lab will include 500-1000 words. If the level of writing is not acceptable it will be returned for rewriting and it will be awarded partial marks. It is expected that the level of writing improve based upon feedback given for previous laboratory reports. A lab that would have received a grade of ‘A’ at the beginning of the term may very well receive an ‘F’ at the end of the term. and there will be approximately 10 labs in the course. You may look at all of this grade as writing. Grading Scale:A100 . Writing instruction will be given in the labs at appropriate times and this will total four hours. page 17 BC+ C CD+ D 72-70 69-67 66-63 62-60 59-57 56-55 . such as Mathcad Supplemental materials at the end of this book include.these pull together concepts from previous chapters • problems at the ends of chapters are provided for further practice Tools that should be used include. • read the chapters and do drill problems as you read • examine the case studies .page 18 PREFACE How to use the book. big proofread and complete writing chapters add more drill problems and solutions chapter numerical add ti-89 integration methods chapter rotation replace the rotational case with IC motor chapter circuits . Hal Larson for reviewing the calculus and numerical methods chapters Dr. • graphing calculator that can solve differential equations. Dr. Wendy Reffeor for reviewing the translation chapter Student background a basic circuits course a basic statics and mechanics of materials course math up to differential equations a general knowledge of physics computer programming. mark FBDs. preferably in ’C’ TO BE DONE small italicize variables and important terms fix equation numbering (auto-numbering?) fix subscripts and superscripts fix problem forms to include therefores. • a lab guide for the course • a writing guide • a summary of math topics important for engineers • a table of generally useful engineering units • properties of common materials Acknowledgement to. etc. such as a TI-85 • computer algebra software that can solve differential equations. implement a differential equation with op-amps chapter frequency analysis add problems chapter non-linear systems develop chapter chapter motion control add accceleration profile for velocity control add a setpoint scheduler program add a multiaxis motion control program chapter magnetic consider adding/writing this chapter chapter fluids consider adding/writing this chapter chapter thermal consider adding/writing this chapter chapter laplace consider adding/writing these chapters chapter lab guide update the labs and rewrite where necessary chapter c programming review section add problems .page 19 complete the induction motor section complete the brushless motor section add a design case . page 20 1. controllers . Non-linear • linearity and superposition • reversibility • through and across variables • Analog vs. Discrete • Linear vs. INTRODUCTION Topics: Objectives: 1.1 BASIC TERMINOLOGY • Lumped parameter (masses and springs) • Distributed parameters (stress in a solid) • Continuous vs. Digital • process vs. page 21 1.3 SUMMARY • 1.4 PRACTICE PROBLEMS 1. .2 EXAMPLE SYSTEM • Servo control systems • Robot 1. Conversely the acceleration can be integrated to find velocity. an acceleration can be found by dividing the net force by the mass. and the velocity can be integrated to find position. and cancel each other out. inertia. This chapter will focus only on translational systems. Finally. If the applied forces are balanced. The equations of motion for translating bodies are shown in Figure 1. the body will not accelerate. When forces act on the body they may cause motion. and velocity is the first derivative of acceleration. Therefore. springs. TRANSLATION Topics: • Basic laws of motion • Gravity. when a force is applied to a mass. we can determine the velocity and position. If all of the forces act through the center of mass then the body will only translate. 2. cables and pulleys. FBDs • System analysis techniques • Design case Objectives: • To be able to develop differential equations that describe translating systems. . dampers. These state simply that velocity is the first derivative of position.page 22 2. If the forces are unbalanced then the body will accelerate. Forces that do not act through the center of mass will also cause rotation to occur.1 INTRODUCTION If the velocity and acceleration of a body are both zero then the body will be static. friction. drag. if we know the acceleration of a body. This is good practice for any engineer. Notice that the units are used throughout the calculations. a = position. These are then used to find the state of the system after a period of time. This equation is then used to calculate the position after a period of time.a equations of motion dv ( t ) = ---- x ( t ) dt F OR dda ( t ) = ---- x ( t ) = ---- v ( t ) dt dt x(t) = v(t) = 2 (1) (2) (3) (4) ∫ v ( t ) dt ∫ a ( t ) dt = ∫ ∫ a ( t ) dt F(t) (5) a ( t ) = --------M where.page 23 x. The solution begins by integrating the acceleration. The initial conditions of the system are supplied (and are normally required to solve this type of problem). As before the initial position is used for the integration constant. v. . x.v. velocity and acceleration M = mass of the body F = an applied force Figure 1 Velocity and acceleration of a translating mass An example application of these fundamental laws is shown in Figure 2. This is then integrated once more to provide the position of the object. and using the initial velocity value for the integration constant. So at t=0 the velocity will be equal to the initial velocity. 2 MODELING When modeling translational systems it is common to break the system into parts. • gravity and other fields .5m Figure 2 Sample state calculation for a translating mass.opposes relative motion between bodies in contact . a=3ms-2. find the system state 5 seconds later assuming constant acceleration. –2 a 0 = 3ms The constant acceleration can be integrated to find the velocity as a function of time.t + v 0 t + x 0 2 –2 3ms -------------. a0 2 x ( 5 ) = ---. These parts are then described with Free Body Diagrams (FBDs).page 24 Given an initial (t=0) state of x=5m. and are discussed in following sections.resist motion • friction .t + v 0 t + x0 2 This can then be used to calculate the position of the mass after 5 seconds.resist deflection • dampers and drag .opposes acceleration and deceleration • springs .5m + 10m + 5m = 52. with initial conditions 2. x 0 = 5m Note: units are very important and should nor–1 v 0 = 2ms mally be carried through all calculations. a0 2 (7) x ( t ) = ∫ v ( t ) dt = ∫ ( a 0 t + v 0 ) dt = ---. Note: v ( t ) = ∫ a 0 dt = a 0 t + C = a 0 t + v 0 (6) v ( t ) = a0 t + C v0 = a0 ( 0 ) + C v0 = C Next. v=2m/s. The initial conditions for the system at time t=0 are. Common components that must be considered when constructing FBDs are listed below.( 5s ) 2 + 2ms – 1 ( 5s ) + 5m ∴ = 2 ∴ = 37. the velocity can be integrated to find the position as a function of time.apply non-contact forces • inertia . These are required elements for any engineering problem involving rigid bodies.2. and on the spring have an equal magnitude. called the inertial force. more manageable pieces. and a spring pushing the mass upwards. The resulting imbalance in forces acts on the mass causing it to accelerate.2 Mass and Inertia In a static system the sum of forces is zero and nothing is in motion.page 25 • cables and pulleys . M = 10 kg k = 20 N/m FBD Mass: FBD Spring: FR1 FR1 Mg FR2 Figure 3 Free body diagram example 2. For the purposes of calculation we create a virtual reaction force. In a dynamic system the sum of forces is not zero and the masses accelerate. An example of FBD construction is shown in Figure 3.1 Free Body Diagrams Free Body Diagrams (FBDs) allow us to reduce a complex mechanical system into smaller. The first is to add the inertial force to the FBD and then add it into the sum of . The FBD for the spring has two forces applied at either end.transmit forces through up to 3 degrees of freedom 2. but opposite direction. It can be included in calculations in one of two ways.redirect forces • contact points/joints . In this case there is a mass sitting atop a spring. An FBD can be drawn for the mass. This force is also known as D’Alembert’s (pronounced as daa-lamb-bear) force. gravity pulling the mass downward.2. The forces applied to the FBD can then be summed to provide an equation for the piece. Notice that the spring force acting on the mass. In total there are two obvious forces applied to the mass. These equations can then be used later to do an analysis of system behavior. The acceleration is proportional to the inertial force and inversely proportional to the mass. In this case the sign of the inertial force is positive if the assumed positive direction of the mass matches the positive direction for the summation. ∑ F = Ma ∑ F – Ma = Figure 4 0 (Newton’s) (D’Alembert’s) (11) (12) D’Alembert’s and Netwon’s equation An application of Newton’s form to FBDs can be seen in Figure 5. as shown in Figure 4. .page 26 forces. This force should be in an opposite direction (left here) to the positive direction of the mass (right). When the sum of forces equation is used then the force is added in as a normal force component. The second method is known as D’Alembert’s equation where all of the forces are summed and set equal to the inertial force. In the first case an inertial force is added to the FBD. but added to the final equation. In the second case Newton’s equation is used so the force is left off the FBD. which will equal zero. In this example there are two unbalanced forces applied to a mass. Figure 5 Free body diagram and inertial forces An example of the application of Newton’s equation is shown in Figure 6. Newton’s form x + or d∑ Fx = F = M ---- x dt 2 2 M F d- + ∑ F x = – F = ( – M ) ---- x dt Note: If using Newton’s form the sign of the inertial force should be positive if the positive direction for the summation and the mass are the same. . These forces are summed and set equal to the inertial force. In this example the forces and calculations are done in vector format for convenience and brevity.page 27 D’Alemberts’s form: dMa = M ---- x dt 2 x + M F or + d∑ Fx = F – M ---- x = 0 dt d∑ Fx = – F + M ---- x = 0 dt 2 2 Note: If using an inertial force then the direction of the force should be opposite to the positive motion direction for the mass. otherwise if they are opposite then the sign should be negative. Solving the resulting equation results in acceleration values in the x and y directions. gravity and the arbitrary force.= -----------.81N/kg. To find the equations .7 --2 –7 N Kg 10Kg s s 0 0 0 Figure 6 Sample acceleration calculation 2. The magnitude of the force is proportional to the mass of the object. These forces are described in vector form.) which often causes confusion. The relationship between these is the gravitational constant 9. with a direction toward the center of the earth (down).3 Gravity And Other Fields Gravity is a weak force of attraction between masses. lbf. what is the acceleration of the ball? –7 F2 = –3 N 0 M=10kg ∑F = F 1 + F 2 = Ma 5 –7 ∴ –4 N + – 3 N = ( 10Kg )a 0 0 –2 – 0.2 Kgm 1m 1 ----------- -----.page 28 5 F1 = –4 N 0 If both forces shown act through the center of mass. The 5kg mass is pulled by two forces. To reduce this confusion the units for force is normally modified to be. which will vary slightly over the surface of the earth. The relationship between mass and force is clear in the metric system with mass having the units Kilograms (kg).2 – 0. F. and force the units Newtons (N).7 2 - ∴a = – 0. The Imperial units for force and mass are both the pound (lb. In our situation we are in the proximity of a large mass (the earth) which produces a large force of attraction.2. When analyzing forces acting on rigid bodies we add this force to our FBDs. = – 0. An example calculation including gravitational acceleration is shown in Figure 7. with the positive z axis pointing upwards. Notice that the units have been carried through these calculations. y and z components of the motion. .page 29 of motion the forces are summed. To eliminate the second derivative on the inertia term the equation is integrated twice. The result is a set of three vector equations that describe the x. 81 z(t) fz z0 v z0 x(t) 2 0.81 z(t) fz vz0 v x0 fx x0 0 x( t) m –1 2 ---. y0 and z0.81 fz fx 0 x(t) m d. and position components for the system. M = 5Kg Fg g 0 0 Nm g = 0 -----.1f t 2 + v t + z -----------z z0 0 2 Figure 7 Gravity vector calculations 0.page 30 Assume we have a mass that is acted upon by gravity and F a second constant force vector. z and t.81 x(t) X(t) = y(t ) z(t) fx F = fy fz F g = Mg Next sum the forces and set them equal to inertial resistance. vy0.+ 0. and there are 9 constants/givens fx. fy.1f y t + v y0 t + y 0 m y(t) = z(t) – 9. There are 4 variables/unknowns x. In this case there are three equations. .2Kg f y = ---- y ( t ) 0 2 dt s –9.81 z(t) fz Integrate twice to find the position components.2 –1 --.2Kg f y t + v y 0 = dt y ( t ) 2 s – 9. vx0.2Kg f y t + v y t + y 0 = y ( t ) 0 2 0 s – 9. y.81 + 0.81 – 9.+ 0.2 m 5Kg 0 ---. Therefore with 3 equations and 4 unknowns only one value (4-3) is required to find all of the unknown values. fz. To find the position of the mass as a function of time we first define the gravity vector.1f x t + v x0 t + x 0 2 1 -2 Note: When an engineer solves a problem they will always be looking at the equations and unknowns.= 0 ---2 Kg s – 9. ∑F d= Mg + F = M ---- X ( t ) dt 2 fx x( t) 0 d. xz0. x0. vx0 fx 0 x(t) m d–1 ---- 0 ---.+ f y = 5Kg ---- y ( t ) 2 dt s z(t) – 9.+ 0. 4 Springs A spring is based on an elastic material that will provide an opposing force when deformed. Electrostatic forces are less common. A and L) are combined into a more convenient form.2. but may need to be considered for highly charged systems. 3 F1 = 4 N 0 0 Ng = – 9. In this case the spring is a solid member.page 31 Like gravity. Magnetic forces are commonly found in motors and other electrical actuators. The properties of the spring are determined by the Young’s modulus (E) of the material and the geometry of the spring. In practice springs are more complex. g Figure 8 Drill problem: find the acceleration of the FBD 2. The relationship between force and displacement is determined by the basic mechanics of materials relationship. . A primitive spring is shown in Figure 9. This form is known as Hooke’s Law. but the parameters (E.81 -----Kg 0 M = 2Kg FBD: M F1 Find the acceleration. Given. The most common springs are made of metals or plastics. magnetic and electrostatic fields can also apply forces to objects. In the case of compression the spring length has been made shorter than its’ normal length. and then select the displacement and force directions accordingly. The basic equation is linear. . In addition the geometry of the object changes. also changing the effective stiffness. and they will no longer act as an ideal device. The cases for tension and compression are shown in Figure 10. In applications with fast rates of change the spring mass may become significant. It is advisable when solving problems to assume a spring is either in tension or compression. This requires that a compression force be applied. This allows the inertial effects to be ignored. For tension both the displacement from neutral and the required force change direction. Springs are normally assumed to be massless. but as a spring is deformed the material approaches plastic deformation. such as a force propagation delay. and the modulus of elasticity will change.page 32 Lδ = -----. δ L F = Kδ F δ (Hooke’s law) L Figure 9 A solid member as a spring Hooke’s law does have some limitations that engineers must consider. F EA EA F = -----. When at this length it is neither in tension or compression Ft ∆x Ks tension as positive F t = K s ∆x NOTE: the symbols for springs. so it will be positive. . In the second example the force and both displacements are shown as tensile. so the terms are both positive.and especially in this course where we deal with both types of systems. so both terms are negative. In Figure 11 springs are shown that have movement at both ends. Figure 10 Sign conventions for spring forces and displacements Previous examples have shown springs with displacement at one end only. You will need to remember this when dealing with complex systems . The displacement at the left is tensile.page 33 Fc ∆x Ks compression as positive F c = K s ∆x ∆x = deformed length ASIDE: a spring has a natural or undeformed length. while the displacements are both shown as tensile. In the first example the displacement and forces are tensile. In all cases the forces on the springs must be assumed and drawn as either tensile or compressive. In these cases the force applied to the spring is still related to the relative compression and tension. resistors and inductors are quite often the same or similar. but on the right hand side the displacement is compressive so it is negative. The primary difference is that care is required to correctly construct the expressions for the tension or compression forces. In the third example the force is shown as compressive. ∆x = l 1 – l 0 where.. springs may be used as energy storage devices. and then make all decisions based on that assumption.. ∆x = deformed length l 0 = the length when undeformed l 1 = the length when deformed Figure 12 Using the actual spring length In addition to providing forces.page 34 F ∆x 1 Ks ∆x 2 F F = K s ( ∆x 1 – ∆x 2 ) F ∆x 1 Ks ∆x 2 F F = Ks ( ∆x 1 + ∆x 2 ) F ∆x 1 Ks ∆x 2 F F = K s ( – ∆x 1 – ∆x 2 ) ETC.. Aside: it is useful to assume that the spring is either in tension or compression. Figure 13 shows the equation for energy stored in a spring. Figure 11 Examples of forces when both sides of a spring can move Sometimes the true length of a spring is important. as shown in Figure 12. . In these cases the deformation can be defined as a deformed and undeformed length. and the deformation alone is insufficient. 1m Find F1 and F2 separately (don’t try to solve at the same time) Aside: it can help to draw a FBD of the pin.page 35 K ( ∆x ) E P = ----------------2 2 Figure 13 Energy stored in a spring Given.1m ∆x 2 = 0. N K s = 10 --m ∆x 1 = 0. 10m Ks F1 ∆x 1 Ks F2 ∆x 2 Figure 14 Drill problem: Deformation of a two spring system . springs store energy in a system but dampers dissipate energy. As mentioned before. As the piston moves fluid is forced through a small orifice in the cylinder. or can be added by design. This one uses a cylinder that contains a fluid.2. but when moved quickly the pressure required to force the fluid through the orifice rises. The resistive force is relative to the rate of displacement. Dampers and springs are often used to compliment each other in designs. In ideal terms any motion would result in an opposing force. Other manufacturing variations could also lead to other .5 Damping and Drag A damper is a component that resists motion. There is a moving rod and piston that can slide along the cylinder.page 36 Draw the FBDs and sum the forces for the masses F Ks M1 M2 Figure 15 Drill problem: Draw the FBDs for the masses 2. This rise in pressure results in a higher force of resistance. In reality there is also a break-away force that needs to be applied before motion begins. A physical damper is pictured in Figure 16. When moved slowly the fluid moves easily. Damping can occur naturally in a system. the analysis of dampers in systems is similar to that of springs. Figure 17 An ideal damper Damping can also occur when there is relative motion between two objects..g. The force is calculated by multiplying the damping coefficient by the velocity. x Kd F dF = Kd ---- x dt (15) Aside: The symbol shown is typically used for dampers. When the system is broken into free body diagrams the forces are shown to be a function of the relative velocities between the blocks. Aside from the use of the first derivative of position. oil) then there will be a damping effect. Normally these cause negligible effects. If the objects are lubricated with a viscous fluid (e. .page 37 small differences between dampers. In the example in Figure 18 two objects are shown with viscous friction (damping) between them. or first derivative of position. orifice motion fluid piston fluid Figure 16 A physical damper The basic equation for an ideal damper in compression is shown in Figure 17. It is based on an old damper design called a dashpot. It was constructed using a small piston inside a larger pot filled with oil. In this case the force and displacement are both compressive. v F F = –D v v Figure 19 Aerodynamic drag . Aerodynamic drag is proportional to the velocity squared. The drag force increases as the square of velocity. The equation for drag is shown in Figure 19 in vector and scalar forms.page 38 x1 F d = K d ( x 1' – x 2' ) Kd F d = K d ( x 1' – x 2' ) x2 Aside: Fluids. the greater the resistance to flow. Normally. object size and object geometry. The higher the shear rate. Figure 18 Viscous damping between two bodies with relative motion A damping force is proportional to the first derivative of position (velocity). When these materials are put in shear they resist the motion. such as oils. have a significant viscosity. The drag coefficient is a function of material type. surface properties. the magnitude of the drag force coefficient ’D’ is approximated theoretically and/or measured experimentally. Normally these forces are small. except at high velocities. When used in combination with pulleys a cable can redirect a force vector. .2. and will not transmit force. or multiply a force. what is the required force? d---.page 39 If we are pushing the cylinder at the given velocities below. Typically we assume that a pulley is massless and frictionless (in the rotation chapter we will assume they are not).3 m --dt s F F Ns k d = 0.x 1 = 0.x 2 = – 0. If this is the case then the tension in the cable on both sides of the pulley is equal as shown in Figure 21.6 Cables And Pulleys Cables are useful when transmitting tensile forces or displacements. And. if the force becomes compressive.1 m --dt s d---. the cable goes limp. A cable by itself can be represented as a force vector.1 ----m Figure 20 Drill problem: Find the required forces on the dampers 2. The centerline of the cable becomes the centerline for the force. page 40 T1 for a massless frictionless pulley T1 = T2 T2 Figure 21 Tension in a cable over a massless frictionless pulley If we have a pulley that is fixed and cannot rotate the cable must slide over the surface of the pulley.= e k T1 T2 ∆θ Figure 22 Friction of a belt over a fixed drum . In this case we can use the friction to determine the relative ratio of forces between the sides of the pulley. as shown in Figure 22. T1 T2 µ ( ∆θ ) ---. page 41 Given.2 M = 1Kg Find F to lift/drop the mass slowly. Beneath the slip force the object will stay in place. In cases where there is no lubricant. we may experience dry coulomb friction.7 Friction Viscous friction was discussed before. 2. where a lubricant would provide a damping effect between two moving objects. The force on the horizontal axis is the force applied to the friction surfaces while the vertical axis is the resulting friction force. µ k = 0.2. When the slip force is exceeded . Figure 24 shows the classic model for friction. and the joint is dry. In this case the object will stick in place until a maximum force is overcome. M F Figure 23 Drill problem: Find the force required to overcome friction Although the discussion in this section has focused on cables and pulleys. After that the object will begin to slide and a constant force will result. the theory also applies to belts and drums. and the resulting kinetic friction force is relatively constant. After that the friction is approximately constant. but it always opposes the applied force. The coefficient of friction is a function of the materials. Block begins to slip Fs Fk F Fs Fg F F k. surface texture and surface shape. It is also common to forget that friction is bidirectional. The friction force is a function of the normal force across the friction surface and the coefficient of friction.page 42 the object will begin to slip. . F s Fk = µk N Fs ≤ µs N N Note: When solving problems with friction remember that the friction force will always equal the applied force until slip occurs. If the object begins to travel fast then the kinetic friction force will decrease. Figure 24 Dry friction Many systems use kinetic friction to dissipate energy from a system as heat. sound and vibration. the friction forces will change direction to oppose an applied force. In addition. or motion. If we limit this thought to translation only. µ s = 0.2.8 Contact Points And Joints A system is built by connecting components together. These connections can be rigid or moving.page 43 Find the acceleration of the block for both angles indicated. . In any direction there is a degree of freedom. y and z. When constructing FBDs for a system we must break all of the components into individual rigid bodies. Where the mechanism has been broken the contact forces must be added to both of the separated pieces. In solid connections all forces and moments are transmitted and the two pieces act as a single rigid body. In moving connections there is at least one degree of freedom. force cannot be transmitted. there are up to three degrees of freedom between parts.3 µ k = 0.2 10 kg θ θ 1 = 5° θ 2 = 35° Figure 25 Drill problem: find the accelerations 2. Consider the example in Figure 26. At joint A the forces are written as two components in the x and y directions. x. For joint B the force components with equal magnitudes but opposite directions are added to both FBDs. Figure 26 FBDs for systems with connected members 2.(next chapter) Combine the equations by eliminating unwanted variables. Assign letters/numbers to designate components (if not already done) . 6. 1. 3. 4.this will allow you to refer to components in your calculations. it is opposed by a spring and damper on the right. The FBD for the mass shows the force and the reaction . Write equations for each component by summing forces. 5. Consider the cart in Figure 27. 2. The basic problem definition already contains all of the needed definitions.page 44 F Ay A M1 B M1 g M2 F Bx F By F Ax F By F Bx M2 g Note: Don’t forget that forces on connected FBDs should have equal magnitudes. This should include the selection of reference points.(next chapter) Develop a final equation that relates input (forcing functions) to outputs (results). but opposite directions. and add forces (inertia is optional). Define positions and directions for any moving masses. On the left is a force. Draw free body diagrams for each component. so no others are required.3 SYSTEM EXAMPLES An orderly approach to system analysis can simplify the process of analyzing large systems. The list of steps below is based on general observations of good problem solving techniques. Figure 27 A simple translational system example .page 45 forces from the spring and damper. or use other methods to determine how the system will behave. F M1 x Kd Ks The FBD for the cart is F M1 K d x' Ks x The forces for the cart are in a single direction and can be summed as. When the forces are summed the inertia is on the right in Newton’s form. M 1 x'' + K d x' + K s x = – F Aside: later on we will solve the differential equations. Given the system diagram. eqn. + F = – F + K x' + K x = M x'' ∑ x d s 1 This equation can be rearranged to a second-order non-homogeneous diff. and everything else on the other. This equation is then rearranged to a second-order non-homogeneous differential equation. It is useful to have all of the ’output’ variables for the system on the left hand side. x1 x2 K d1 F M1 K s1 M2 K s2 K d2 Figure 28 Drill problem: Find the differential equations A simplified model of an elevator (M1) and a passenger (M2) are shown in Figure 29.page 46 Develop the equation relating the input force to the motion (in terms of x) of the lefthand cart for the problem below. The wall forces are ignored because they are statically indeterminate and being in the x-axis irrelevant to the problem in the y-axis. These are added to the FBDs. In this example many of the required variables need to be defined. Care is also taken to ensure that all forces between bodies are equal in magnitude. but opposite in direction. . and the equations are expanded as shown in Figure 30. .page 47 M1 Kd M2 K S2 K S1 Assign required quantities and draw the FBDs M2 g M1 g y2 FD F S2 FD F S2 y1 F S1 Figure 29 A multi-body translating system (an elevator with a passenger) The forces on the FBDs are then summed. 81 ) + K d ---. and substitute relationships ∑ FM ∑ FM 1 = F S1 + F S2 + M 1 g + F D = M 1 a 1 = – F S2 + M 2 g – F D = M 2 a 2 2 At this point we can expand the equations into vector components dK S1 ( – ∆y 1 ) + K S2 ( ∆y 2 – ∆y 1 ) + M 1 ( – 9.( y 2 – y 1 ) = M 2 ay dt Figure 30 Equations for the elevator .( y 2 – y 1 ) = M 1 a y dt d– K S2 ( ∆y 2 – ∆y 1 ) + M 2 ( – 9.page 48 Now. we write out the force balance equation (vector form).81 ) – K d ---. In the series spring combination the overall stiffness would decrease.page 49 Write the differential equations for the system below. A B µ k1 M1 K S1 M2 µ k2 Figure 31 Drill problem: A more complex translational systems Consider the springs shown in Figure 32. When two springs are combined in this manner they can be replaced with a single equivalent spring. . In the parallel spring combination the overall stiffness of the spring would increase. and the equivalent spring coefficient is found. . P. The forces for both of these are then summed. The first step is to draw a FBD for the mass at the bottom.page 50 Parallel K S1 K S2 Series K S1 M K S2 M Figure 32 Springs in parallel and series (kinematically) Figure 33 shows the calculations required to find a spring coefficient equivalent to the two springs in series. The next process is to combine the two equations to eliminate the height variable created for P. After this the equation is rearranged into Hooke’s law. and for a point between the two springs. consider the basic spring equation to find the equivalent spring coefficient. draw FBDs for P and M and sum the forces assuming the system is static.page 51 First.= y 1 ----------------------K S1 + K S2 K S2 K S2 ∴F g = y 1 1 – ----------------------. K S1 y 2 P + K S2 ( y 1 – y 2 ) K S2 ( y 1 – y 2 ) M + Fg Next. (b) becomes K S2 ( y 1 – y 2 ) – Fg = 0 Fg ∴y 1 – y 2 = -------K S2 Fg ∴y 2 = y 1 – -------K S2 (a) becomes K S1 y 2 – K S2 ( y 1 – y 2 ) = 0 ∴y 2 ( K S1 + K S2 ) = y 1 K S2 sub (b) into (a) Fg y – -------- ( K + K ) = y K S1 S2 1 K - 1 S2 S2 K S2 Fg ∴y 1 – -------. K S2 K S1 + K S2 K S1 K S2 ∴F g = y 1 ----------------------. K S2 K S1 + K S2 K S1 + K S2 – K S2 ∴F g = y 1 -------------------------------------. rearrange the equations to eliminate y2 and simplify. K S1 + K S2 Finally. K S1 K S2 ∴K equiv = ----------------------· K S1 + K S2 y1 ∑ Fy = K S1 y 2 – K S2 ( y 1 – y 2 ) = 0 (a) K S1 P K S2 y2 ∑ Fy = K S2 ( y 1 – y 2 ) – F g = 0 (b) M Figure 33 Calculation of an equivalent spring coefficient for springs in series . the force applied to one side of the spring will be applied to the other. When an object has no mass. .page 52 Figure 34 Drill problem: Find an equivalent spring for the springs in parallel Consider the drill problem. The only factor that changes is displacement. Figure 35 Drill problem: Prove that the force on both sides is equal 2. .4 OTHER TOPICS Designing a system in terms of energy content can allow insights not easily obtained by the methods already discussed. Consider the equations in Figure 36. In addition the power.page 53 Show that a force applied to one side of a massless spring is the reaction force at the other side. Kinetic energy is half the product of mass times velocity squared. These equations show that the total energy in the system is the sum of kinetic and potential energy. or energy transfer rate is the force applied multiplied by the velocity. Potential energy in translating systems is a distance multiplied by a length that force was applied over. 3N/cm) 2. but the motion is opposed by viscous friction (damping) with the coefficient B. Write the differential equation for the mass. 2. • Eqautions for translation and rotation can be written for FBDs.5 SUMMARY • FBDs are useful for reducing complex systems to simpler parts. M. 33. illustrated below starts at rest. what is the spring constant? (ans. Initially the system starts at rest. If a spring has a deflection of 6 cm when exposed to a static load of 200N. when a constant force. and solve the differential equation. • The equations can be integrated for dynaic cases. Leave the results in variable form. x M B F .6 PRACTICE PROBLEMS 1. is applied.page 54 E = EP + EK EK Mv = --------2 2 (7) (8) (9) (10) E P = Fd = Mgd dP = Fv = ---.E dt Figure 36 Energy and power equations for translating masses 2. The mass. F. or solved algebraicaly for static cases. It can slide across a surface. a) K d1 K d2 K eq = ----------------------K d1 + K d2 b) K eq = K d1 + K d2 . Write the differential equations for the translating system below. Find the effective damping coefficients for the pairs below. a) Kd1 Kd2 b) Kd1 Kd2 (ans. Write the differential equations for the system given below.page 55 3. Kd M1 B1 B2 Ks M2 F 5. F Ks M1 M2 4. page 56 6. Write the differential equations for the system below. FBDs: – K d1 x 1' – K s1 x 1 For M1: + M1 K d2 ( x 1' – x 2' ) K s2 ( x 1 – x 2 ) F M2 K d3 x 2' K s3 x 2 ∑F ∑F = – K d1 x 1' – K s1 x 1 – K d2 ( x 1' – x 2' ) – K s2 ( x 1 – x 2 ) = M 1 x 1'' x 1'' ( M 1 ) + x 1' ( K d1 + K d2 ) + x 1 ( K s1 + K s2 ) + x 2' ( – K d2 ) + x 2 ( –K s2 ) = 0 For M2: + = K d2 ( x 1' – x 2' ) + K s2 ( x 1 – x 2 ) + F – K d3 x 2' – K s3 x 2 = M 2 x 2'' x 2'' ( M 2 ) + x 2' ( K d2 + K d3 ) + x 2 ( K s2 + K s3 ) + x 1' ( – K d2 ) + x 1 ( – K s2 ) = F 7. x1 K d1 K s1 M1 K s2 M2 F x2 . x1 K d1 K s1 M1 K s2 K d2 M2 F x2 K d3 K s3 (ans. Write the differential equations for the system below. page 57 8. Write the differential equations for the system below. K s2 M2 K d1 K s1 M1 x2 F µ s. Write the differential equations for the system below. µ k x1 . K s2 M2 K d1 K s1 M1 B x1 x2 F 10. Write the differential equations for the system below. x1 K d1 K s1 M1 K s2 M2 B F x2 9. The cable runs over a massless. M2. is between the cable and a damper.page 58 11. Write the differential equations for the system below. is between a spring and a cable and there is viscous damping between the mass and the floor. In this system the upper mass. frictionless pulley. M1. F M1 x1 K s1 K d1 M2 x2 K s2 Kd 2 12. x1 Ks M1 B R M2 x2 Kd . The suspended mass. Write the differential equations for the system below. µ k M2 x2 K s2 .page 59 (ans. K s1 M1 x1 µ s. FBDs: Ks x 1 Bx 1' M1 T M2 M2 g = – K s x 1 – Bx 1' + T = M 1 x 1'' x 1'' ( M 1 ) + x 1' ( B ) + x 1 ( K s ) = T T For M1: + ∑F ∑F K d x 2' For M2: + For T: = T + K d x 2' – M 2 g = – M 2 x 2'' x 2'' ( – M 2 ) + x 2' ( – K d ) = T – M 2 g if T <= 0 then T = 0N if T > 0 x1 = x2 13. Write the differential equations for the system below. many of the assumptions and tests are mandated by law or groups such as Underwriters Laboratories (UL). A basic test would involve assuming that the elevator starts at the ground floor and must travel to the top floor. Inputs to the system would be the mass of human riders and desired elevator height. that the system to be analyzed is an elevator.1 INTRODUCTION In the previous chapter we derived differential equations of motion. The basic concept is that the system accepts inputs and the system changes the inputs to produce outputs. 3. Canadian Standards Association (CSA) and the European Commission (CE). Using assumed initial values and input functions the differential equation could be solved to get an explicit equation for elevator height. mass of the car. These equations can be used to analyze the behavior of the system and make design decisions. This output response can then be used as a guide to modify design choices (parameters). For analysis. It is also possible to estimate the system response without solving the differential equation. Figure 37 shows an abstract description of a system used by engineers. and initial conditions. • To recognize first and second-order equation forms. The most basic method is to select a standard input type. etc. for example. Say. and then solve the differential equation. elastic lift cable. the system model could be developed using differential equations for the motor.page 60 3. The output response of the system would be the actual height of the elevator. . ANALYSIS OF DIFFERENTIAL EQUATIONS Topics: • First and second-order homogeneous differential equations • Non-homogeneous differential equations • First and second-order responses • Non-linear system elements • Design case Objectives: • To develop explicit equations that describe a system response. In practice. 3. etc. Solving differential equations is necessary for analyzing systems with inputs. • step . such as a motor speed that is 2Hz at 1 second. This section will review techniques used to integrate first and second-order homogenous differential equations. function function Figure 37 A system with and input and output response There are several standard input types used to test a system. and the initial conditions have been selected.page 61 inputs system differential equations outputs Note: By convention inputs are on the left. 8Hz at 3 seconds.a cyclic input that varies continuously. such as very rapidly changing a desired speed from 0Hz to 50Hz. an input type has been chosen.a continuously increasing input. If the right hand side is zero. the system can be analyzed to determine its behavior. such as a motor speed that is continually oscillating sinusoidally between 0Hz and 100Hz.a sudden change of input. • ramp . Non-homogeneous differential equations will also be reviewed. also called unforced systems. The most fundamental technique is to integrate the differential equation for the the system. The basic types of differential equations are shown in Figure 38. On the left hand side is the integration variable ’x’. but it can also be used to find frequencies and other details of interest. • parabolic . then the equation is homogeneous. • sinusoidal .2 EXPLICIT SOLUTIONS Solving a differential equation results in an explicit solution. Each of these equations is linear. This explicit equation provides the general response. 4Hz at 2 seconds. After the system has been modeled.an exponentially increasing input. such as a motor speed that increases constantly at 10Hz per minute. These are listed below in order of relative popularity with brief explanations. . Each of these equations is linear because each of the terms on the left hand side is simply multiplied by a linear coefficient. and outputs are on the right. These equations correspond to systems without inputs. page 62 Ax' + Bx = 0 Ax' + Bx = Cf ( t ) Ax'' + Bx' + Cx = 0 Ax'' + Bx' + Cx = Df ( t ) Figure 38 first-order homogeneous first-order non-homogeneous second-order homogeneous second-order non-homogeneous Standard equation forms A general solution for a first-order homogeneous differential equation is given in Figure 39. the initial conditions for the equation are used to find the value of the coefficient ’X’. The e-to-the-x behavior is characteristic for a firstorder response. . Notice that the final equation will begin at the initial displacement. Substitution leads to finding the value of the coefficient ’Y’. but approach zero as time goes to infinity. The solution begins with the solution of the homogeneous equation where a general form is ’guessed’. Following this. but this time requires the solution of the quadratic equation. the initial conditions need to be used to find the remaining coefficient values. but after the homogeneous solution has been found. x = Xe x' = – YX e ) + B ( Xe – Yt initial condition ∴A ( –YX e ) = 0 ∴A ( –Y ) + B = 0 B ∴Y = -A Therefore the general form is.0 A x 0 = Xe x0 = X Therefore the final equation is.t A Note: The general form below is useful for finding almost all homogeneous equations x h ( t ) = Xe – Yt Next. as shown.t A General solution of a first-order homogeneous equation The general solution to a second-order homogeneous equation is shown in Figure 40. x h = Xe B – -. The three cases result in three different forms of solutions.t A B – -. or two complex roots. There are three possible cases that result from the solution of the quadratic equation: different but real roots. The solution begins with a guess of the homogeneous solution. two identical roots. x h = Xe B – -. It is not shown.page 63 Given. The complex result is the most notable because it results in sinusoidal oscillations. use the initial conditions to find the remaining unknowns. . x ( t ) = x0 e Figure 39 B – -. Ax' + Bx = 0 – Yt – Yt and x ( 0 ) = x0 – Yt Guess a solution form and solve. The most notable part of the solution is that there is both a frequency of oscillation and a phase shift. as will be seen in a later chapter. If the values for Y are both real. the general form is. or two complex roots. R 1 xh = X1 e R1t + X 2 te R1t The initial conditions are then used to find the values for X1 and X2. but different.page 64 Given. as proven in Figure 41.= -----------------------------------2A 2A Note: There are three possible outcomes of finding the roots of the equations: two different real roots. Therefore there are three fundamentally different results. Ax'' + Bx' + Cx = 0 x ( 0 ) = x0 and x' ( 0 ) = v 0 Guess a general equation form and substitute it into the differential equation. – Yt – Yt – Yt 2 x h = Xe x' h = – YX e x'' h = Y Xe A ( Y Xe 2 2 – Yt ) + B ( – YX e – Yt ) + C ( Xe – Yt ) = 0 A ( Y ) + B ( –Y ) + C = 0 – ( – B ) ± ( –B ) – 4 ( AC ) B ± B – 4AC Y = -------------------------------------------------------------. Figure 40 Solution of a second-order homogeneous equation As mentioned above. a complex solution when solving the homogeneous equation results in a sinusoidal oscillation. 2 2 If the values for Y are both real. and identical. Y = R 1. Y = R 1. the general form is. This form is very useful for analyzing the frequency response of a system. R 2 xh = X1 e R1t + X2 e R2 t Note: The initial conditions are then used to find the values for X1 and X2. . Y = σ ± ωj x h = X 3 e cos ( ωt + X 4 ) σt The initial conditions are then used to find the values of X3 and X4. the general form is. two identical real roots. If the values for Y are complex. as shown below: x = X1 e ( R + C j )t Rt Cjt ( R – Cj )t + X2 e x = X1 e e Rt + X2 e e + X2 e Rt – Cjt – Cjt x = e ( X1 e Rt Rt Cjt ) x = e ( X 1 ( cos ( Ct ) + j sin ( Ct ) ) + X 2 ( cos ( – C t ) + j sin ( –C t ) ) ) x = e ( X 1 ( cos ( Ct ) + j sin ( Ct ) ) + X 2 ( cos ( ( Ct ) – j sin ( Ct ) ) ) ) x = e ( ( X 1 + X 2 ) cos ( Ct ) + j ( X 1 – X 2 ) sin ( Ct ) ) x = e ( ( X 1 + X 2 ) cos ( Ct ) + j ( X 1 – X 2 ) sin ( Ct ) ) ( X 1 + X 2 ) + j ( X1 – X 2 ) x = e ----------------------------------------------------------------. X3 = 4X 1 X 2 x = e Rt x = e X 3 cos ( Ct + X 4 ) frequency Figure 41 phase shift Rt ( X1 – X 2 ) X 4 = atan ---------------------. ( X 1 + X 2 ) The phase shift solution to a second-order homogeneous differential equation .( ( X 1 + X 2 ) cos ( Ct ) + j ( X1 – X 2 ) sin ( Ct ) 2 2 2 2 X 1 + 2X 1 X 2 + X2 – ( X 1 + – 2 X1 X 2 + X 2 ) Rt Rt 4X 1 X 2 x = e ------------------.page 65 Consider the situation where the results of a homogeneous solution are the complex conjugate pair..( ( X 1 + X 2 ) cos ( Ct ) + j ( X 1 – X2 ) sin ( Ct ) ) 2 2 2 ( X 1 + X 2 ) + j ( X1 – X 2 ) Rt 2 2 2 Rt Rt X 1 + 2X 1 X 2 + X2 – ( X 1 + – 2 X1 X 2 + X 2 ) x = e --------------------------------------------------------------------------------------------------.cos ( Ct ) + j ---------------------.( ( X 1 + X 2 ) cos ( Ct ) + j ( X 1 – X2 ) sin ( Ct ) ) 4X 1 X 2 2 2 2 2 x = e Rt ( X 1 – X2 ) ( X1 + X2 ) 4X 1 X 2 ---------------------.sin ( Ct ) 4X 1 X 2 4X1 X 2 ( X1 – X2 ) 4X1 X 2 cos Ct + atan ---------------------. Y = R ± Cj This gives the general result. ( X 1 + X 2 ) where. xp = C1e 4t ∴x' p = 4C 1 e 4t 4t 4t Substitute these into the differential equation and solve for A. Ax' + Bx = Cf ( t ) x ( 0 ) = x0 First. – t 5----. For example. and the particular solution deals with the response to forced inputs. if we are given 6x' + 2x = 5e 4t 4t A reasonable guess for the particular solution is. In the case below the guess should be similar to the exponential forcing function. xh = x0 e B – -. To find the homogeneous solution the nonhomogeneous part of the equation is set to zero.page 66 The methods for solving non-homogeneous differential equations builds upon the methods used for the solution of homogeneous equations.e 4t + x 0 e 2 x = xp + xh = 26 6 -- Figure 42 Solution of a first-order non-homogeneous equation The method for finding a particular solution for a second-order non-homogeneous . Generally. and the principle of superposition applies. guess the particular solution by looking at the form of ’f(t)’. 6 ( 4C 1 e ) + 2 ( C 1 e ) = 5e 24C 1 + 2C 1 = 5 5∴C 1 = ----26 Combine the particular and homogeneous solutions. To find the particular solution the final form must be guessed. This step is highly subjective. An example is given below. and the values of the coefficients are found. and if an incorrect guess is made. When this happens. This is then substituted into the equation. The homogeneous equation deals with the response to initial conditions. This process adds a step to find the particular solution of the equation. The overall response of the system can be obtained by adding the homogeneous and particular parts because the equations are linear. just make another guess and repeat the process. it will be unsolvable. An example of the solution of a first-order nonhomogeneous equation is shown in Figure 42. find the homogeneous solution as before in Figure 39.t A Next. Finally the homogeneous and particular are added to get the final equation form. if we are given 2x'' + 6x' + 2x = 2 sin ( 3t + 4 ) A reasonable guess is. x p = A sin ( 3t ) + B cos ( 3t ) x'p = A cos ( 3t ) – B sin ( 3t ) x'' p = – A sin ( 3t ) – B cos ( 3t ) Substitute these into the differential equation ans solve for A and B. xp = xp = xp = xp = – 0.3333 ( sin ( – 0. Guess the particular solution by looking at the form of ’f(t)’.2179 cos ( 3t ) 0.8584 ) sin ( 3t ) + cos ( –0.page 67 differential equation is shown in Figure 43. Find the homogeneous solution as before. 2.2523 Next. The final result is converted into a phase shift form. Use the initial conditions to determine the coefficients in the homogeneous solution.3333 ( – 0.8584 ) 3. Generally. just make another guess and repeat the process. For example. rearrange the equation to phase shift form. In the case below it should be similar to the sine function.3333 cos ( 3t + 0.2179 A = – 0.8584 ) cos ( 3t ) ) 0.2523 sin ( 3t ) + 0.7568 sin ( 3t ) + 0. Ax'' + Bx' + Cx = Df ( t ) x h = e X 3 cos ( ωt + X 4 ) σt x ( 0 ) = x0 and x' ( 0 ) = v 0 1. When this happens. and if an incorrect guess is made it will be unsolvable. This step is highly subjective. 2 ( A sin ( 3t ) + B cos ( 3t ) ) + 6 ( A cos ( 3t ) – B sin ( 3t ) ) + 2 ( – A sin ( 3t ) – B cos ( 3t ) ) = 2 sin ( 3t + 4 ( 2A – 6B – 2A ) sin ( 3t ) + ( 2B + 6A – 2B ) cos ( 3t ) = 2 sin ( 3t + 4 ) ( – 6B ) sin ( 3t ) + ( 6A ) cos ( 3t ) = 2 ( sin 3t cos 4 + cos 3t sin 4 ) – 6B = 2 cos 4 6A = 2 sin 4 B = 0. Figure 43 Solution of a second-order non-homogeneous equation . so the particular result should also be sinusoidal. In this example the forcing function is sinusoidal. For the purpose of illustration an example is given below.6536 cos ( 3t ) ) 0. the forms in Figure 44 can be helpful. Real roots are assumed to allow the problem solution to continue in Figure 46. . This is followed with the general solution of the homogeneous equation. As typical it begins with a FBD and summation of forces.page 68 When guessing particular solutions. forcing function A Ax + B Ax e B sin ( Ax ) or B cos ( Ax ) Guess C Cx + D Ax or Ce Cxe Ax C sin ( Ax ) + D cos ( Ax ) or Cx sin ( Ax ) + xD cos ( Ax ) Figure 44 General forms for particular solutions An example of a second-order system is shown in Figure 45. Kd and Ks lead to the case of two different positive roots. with no oscillation. A = R 1. R 2 yh = C1 e R1 t R2t 2 2 2 At + C2e Figure 45 Second-order system example The solution continues by finding the particular solution and then solving it using initial conditions in Figure 46. At time t=0 the system is released and allowed to move. Ks Mg Fg Kd y + Ks y K d y' ∑ Fy = – Mg + K s y + K d y' = – M y'' My'' + K d y' + K s y = Mg y' h = Ae At At Find the homogeneous solution. This would occur if the damper value was much larger than the spring and mass values. The final result is a second-order system that is overdamped.page 69 M Assume the system illustrated to the right starts from rest at a height h. . Thus. yh = e At y'' h = A e At 2 At My'' + K d y' + K s y = 0 M ( A e ) + K d ( Ae ) + K s ( e ) = 0 MA + K d A + K s = 0 – K d ± K d – 4MK A = -----------------------------------------------s 2M Let us assume that the values of M. ----------------.page 70 Next.+ C 1 e 1 + C 2 e 2 Ks y(0) = h y' ( 0 ) = 0 Mg 0 0 h = ------. K s h – Mg –R 1 – R1 R t – R 2 K s h – Mg R t Mg y ( t ) = ------. The e-to-the-negative-t forms are the first-order responses and slowly decay over time.3 RESPONSES Solving differential equations tends to yield one of two basic equation forms. ---------------------. ----------------- e 2 K s R 1 – R 2 K s R1 – R 2 R1 Ks K s h – Mg –R 1 K s h – Mg R2 R t R t Mg y ( t ) = ------. ----------------. find the particular solution. add the homogeneous and particular solutions and solve for the unknowns using the initial conditions. ----------------- e 2 K s R 1 – R 2 K s R1 – R 2 Ks Figure 46 Second-order system example (continued) 3. R1 K s R 1 – R 2 Now.+ C 1 e + C 2 e Ks Mg C 1 + C 2 = h – ------Ks y' ( t ) = R 1 C 1 e 0 R1t + R2 C2 e 0 R2 t 0 = R1 C1 e + R2 C2 e 0 = R1 C 1 + R2 C2 –R2 C 1 = -------. combine the solutions and solve for the unknowns using the initial conditions. R t R t Mg y ( t ) = y p + y h = ------. e 1 + ---------------------. They . ----------------. ----------------.C 2 + C 2 = h – ------R1 Ks K s h – Mg –R1 C 2 = ---------------------.C 2 R1 R2 Mg – ----. yp = C y' h = 0 y''h = 0 M ( 0 ) + K d ( 0 ) + K s ( C ) = Mg Mg C = ------Ks Now. ---------------------. e 1 + -------. K s R 1 – R 2 – R2 K s h – Mg –R1 C 1 = -------.+ ---------------------.+ ---------------------. Assuming the change started at t=0. If we have experimental results for a system. the system output will be approximately 63% of the way to its final value when the elapsed time equals the time constant. The other method is to look for the time when the output value has shifted 63. 3. we can find the time constant. this time at this point corresponds to the time constant. one by extending the slope of the first part of the curve until it intersects the final value line.1 First-order A first-order system will result in a first-order differential equation.page 71 never naturally oscillate. initial and final values graphically. It is a measure of how quickly the system responds to a change. In general the analysis of input responses focus on the homogeneous part of the solution. . The second-order forms may include natural oscillation. When an input to a system has changed. The time constant for the system can be found directly from the differential equation. they only oscillate if forced to do so. The initial and final values of the function can be determined algebraically to find the first-order response with little effort. The time constant can be found two ways.3. That time is the time constant value. The solution for these systems is a natural decay or growth as shown in Figure 47.2% of the way from the initial to final values for the system. page 72 y y0 y ( t ) = y 1 + ( y 0 – y 1 )e t –τ 1 y' + -. The time constant can be found by drawing a line asymptotic to the start of the motor curve. This gives an approximate time constant of 0.368 y ( τ ) = 1 + ( 0 – 1 )0.8 s. and will be developed in a later chapter.2% of the way to the final value. as shown below. Some additional numerical calculation leads to the final differential equation as shown. This simplifies the equation and allows us to find a value for the parameter K in the differential equation. Figure 48 Finding an equation using experimental data . and finding the point where it intercepts the steady-state value. y ( τ ) = y 1 + ( y 0 – y 1 )e τ –τ –1 y0 τ t y ( τ ) = y 1 + ( y 0 – y 1 )e y ( τ ) = y 1 + ( y 0 – y 1 )0. the first derivative will be zero. The differential equation is for a permanent magnet DC motor.y = f ( t ) τ y1 τ OR y y1 t time constant Note: The time will be equal to the time constant when the value is 63.368 y ( τ ) = 0. If we consider the steady state when the speed is steady at 1400RPM. This can then be used to calculate the remaining coefficient.632 Figure 47 Typical first-order responses The example in Figure 48 determines the coefficients for a first-order differential equation given a graphical output response to an input. As typical the modeling starts with a FBD and a sum of forces. 10 JR JR K = 0. = -------- JR 0.8s 1s K1 ----.0682 1400 RPM τ ≈ 0. The initial conditions are used to find the remaining unknown coefficients. the particular solution is found.6rads dt 2 K K0 + ----. After this. and the two solutions are combined. ω = ----.page 73 For the motor use the differential equation and the speed curve when Vs=10V is applied: 1400 RPM dK K ---- ω + ----.328 JR 1Dω + -----.8s K10. the homogenous solution is found by setting the non-homogeneous part to zero and solving.6 = ----. V dt JR JR s 1s 2s 3s 2 For steady-state d–1 ---- ω = 0 ω = 1400RPM = 146. = -------- JR 0.8s K ----.8 2 A simple mechanical example is given in Figure 49.ω = 18. Next.328V s 0. .0682 ----. 146.= 18. page 74 Find the response to the applied force if the force is applied at t=0s. Assume the system is initially deflected a height of h. F d- + ∑ F y = – F + K s y + K d ---- y = 0 dt K d y' + K s y = F y' h = ABe Bt Bt F y Ks Kd Ks y dK d ---- y dt y h = Ae Bt Find the homogeneous solution. K d ( ABe ) + K s ( Ae ) = 0 Kd B + K s = 0 –Ks B = -------Kd Next, find the particular solution. yp = C Kd ( 0 ) + Ks ( C ) = F y' p = 0 Bt F ∴C = ----Ks Combine the solutions, and find the remaining unknown. y ( t ) = y p + y h = Ae y( 0) = h F 0 h = Ae + ----Ks The final solution is, F y ( t ) = h – ----- e K s Figure 49 –Ks -------- t Kd –Ks -------- t Kd F + ----Ks F ∴A = h – ----Ks F + ----Ks First-order system analysis example page 75 Use the general form given below to solve the problem in Figure 49 without solving the differential equation. 1 y' + -- y = f ( t ) τ y ( t ) = y 1 + ( y 0 – y 1 )e t –τ Figure 50 Drill problem: Developing the final equation using the first-order model form A first-order system tends to be passive, meaning it doesn’t deliver energy or power. A first-order system will not oscillate unless the input forcing function is also oscillating. Its output response lags its input and the delay is determined by the system’s time constant. page 76 3.3.2 Second-order A second-order system response typically contains two first-order responses, or a first-order response and a sinusoidal component. A typical sinusoidal second-order response is pictured in Figure 51. Notice that the coefficients of the differential equation include a damping coefficient and a natural frequency. These can be used to develop the final response, given the initial conditions and forcing function. Notice that the damped frequency of oscillation is the actual frequency of oscillation. The damped frequency will be lower than the natural frequency when the damping coefficient is between 0 and 1. If the damping coefficient is greater than one the damped frequency becomes negative, and the system will not oscillate - it is overdamped. A second-order system, and a typical response to a stepped input. y'' + 2ζω n y' + ω n y = f ( t ) 2 σ = ζω n y = A + ( B – A )e ωd = ωn 1 – ζ – σt 2 cos ( ω d t ) B A ωn ξ Natural frequency of system, approximate frequency of control system oscillations Damping factor of system. If < 1 underdamped, and system will oscillate. If =1 critically damped. If > 1 overdamped, and never any oscillation (more like a first-order system). As damping factor approaches 0, the first peak becomes infinite in height. The actual frequency of the system. This is the resulting decrease in the natural frequency caused the damping ωd Figure 51 The general form for a second-order system When only the damping coefficient is increased, the frequency of oscillation, and overall response time will slow, as seen in Figure 52. When the damping coefficient is 0 the system will oscillate indefinitely. Critical damping occurs when the damping coefficient is 1. At this point both roots of the differential equation are equal. The system will page 77 not oscillate is the damping coefficient is greater than or equal to 1. ξ≈0 ξ ≈ 0.5 (underdamped) 1ξ = ------ = 0.707 2 ξ = 1 (critical) (overdamped) ξ»1 Figure 52 The effect of the damping coefficient When observing second-order systems it is more common to use more direct measurements of the response. Some of these measures are shown in Figure 53. The rise time is the time it takes to go from 10% to 90% of the total displacement, and can be a good page 78 measure of general system responsiveness. The settling time indicates how long it takes for the system to pass within a tolerance band around the final value. Here the permissible zone is 2%, but if it were slightly larger the system would have a much smaller settling time. The period of oscillation can be measured directly as the time between peaks of the oscillation, the inverse is the damping frequency. (Note: don’t forget to convert to radians.) The damped frequency can also be found using the time to the first peak, as half the period. The overshoot is the height of the first peak. Using the time to the first peak, and the overshoot the damping coefficient can be found. Note: This figure is not to scale to make details near the steady-state value easier to see. tp 1 f d = -T T e ss 0.02∆x 0.02∆x 0.9∆x ∆x 0.5∆x tr where, t r = rise time (from 10% to 90%) t s = settling time (to within 2-5% typ.) ∆x = total displacement T, f d = period and frequency - damped b = overshoot 0.1∆x t p = time to first peak e ss = steady state error x = ∆xe – σt b ts cos ( ω d t ) π ω d ≈ --tp σ = ξω n – σt b----- = e p ∆x 1 ξ = ----------------------------π ------- 2 + 1 t p σ (1) (2) (3) (4) Figure 53 Characterizing a second-order response (not to scale) page 79 Note: We can calculate these relationships using the complex homogenous form, and the generic second order equation form. A + 2ξω n + ω n = 0 – 2ξω n ± 4ξ ω n – 4ω n A = ----------------------------------------------------------- = σ ± jω d 2 – 2ξωn --------------- = σ = – ξω n 2 4ξ ω n – 4ω n ----------------------------------- = jω d 2 4ξ ω n – 4ω n = 4 ( – 1 )ω d ωn – ξ ωn = ωd σ σ----- – ξ 2 ----- = ω 2 d 2 2 ξ ξ ωd 1---- = ----- + 1 2 2 ξ σ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 σω n = ----–ξ (1) ωn 1 – ξ = ωd 2 (2) 1 ξ = ------------------2 ωd ----- + 1 2 σ cos ( ω d t + C 2 ) (3) The time to the first peak can be used to find the approximate decay constant x ( t ) = C1e π ω d = --tp b ≈ ∆xe (1) bln ----- ∆x σ = – ----------------tp – σt p – σt (4) (5) Figure 54 Second order relationships between damped and natural frequency page 80 2 t 0 4.0 Write a function of time for the graph given. (Note: measure using a ruler to get values.) Also find the natural frequency and damping coefficient to develop the differential equation. Using the dashed lines determine the settling time. Figure 55 Drill problem: Find the equation given the response curve 3.3.3 Other Responses First-order systems have e-to-the-t type responses. Second-order systems add another e-to-the-t response or a sinusoidal excitation. As we move to higher order linear page 81 systems we typically add more e-to-the-t terms, and more sinusoidal terms. A possible higher order system response is seen in Figure 56. The underlying function is a first-order response that drops at the beginning, but levels out. There are two sinusoidal functions superimposed, one with about one period showing, the other with a much higher frequency. Figure 56 An example of a higher order system response The basic techniques used for solving first and second-order differential equations can be applied to higher order differential equations, although the solutions will start to become complicated for systems with much higher orders. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX page 82 Given the homogeneous differential equation d- 4 d- 3 d- 2 d ---- x + 13 ---- x + 34 ---- x + 42 ---- x + 20x = 5 dt dt dt dt Guess a solution for the homogeneous equation, xh = e At d---- x h = Ae At dt d ---- x = A 2 e At dt h 2 d ---- x = A 3 e At dt h 3 d ---- x = A 4 e At dt h 4 Substitute the values into the differential equation and find a value for the unknown. A e + 13A e + 34A e + 42Ae A + 13A + 34A + 42A + 20 = 0 A = – 1, – 10, – 1 – j, – 1 + j xh = C1 e + C 2 e –t – 10t 4 3 2 4 At 3 At 2 At At + 20e At = 0 + C 3 e cos ( t + C4 ) d ---- x = 0 dt p 2 –t Guess a particular solution, and the solve for the coefficient. xp = A d---- x p = 0 dt d ---- x = 0 dt p A = 0.25 3 d ---- x = 0 dt p 4 0 + 13 ( 0 ) + 34 ( 0 ) + 42 ( 0 ) + 20A = 5 Figure 57 Solution of a higher order differential equation page 83 Solve for the unknowns, assuming the system starts at rest and undeflected. x ( t ) = C 1 e + C2 e –t – 10t + C 3 e cos ( t + C 4 ) + 0.25 (1) (2) –t 0 = C 1 + C 2 + C 3 cos ( C 4 ) + 0.25 C 3 cos ( C 4 ) = – C 1 – C 2 – 0.25 d---- x = – C 1 e – t – 10C 2 e –10t – C 3 e – t cos ( t + C 4 ) – C 3 e – t sin ( t + C 4 ) dt h 0 = – C 1 – 10C 2 – C 3 cos ( C 4 ) – C 3 sin ( C 4 ) Equations (1) and (3) can be added to get the simplified equation below. 0 = – 9C 2 – C 3 sin ( C 4 ) + 0.25 C 3 sin ( C 4 ) = – 9C 2 + 0.25 d ---- x = C e –t + 100C e –10t + C e –t cos ( t + C ) + C e –t sin ( t + C ) + 1 2 3 4 3 4 dt h C 3 e sin ( t + C 4 ) – C 3 e cos ( t + C 4 ) –t –t 2 (3) (4) 0 = C 1 + 100C 2 + C 3 cos ( C 4 ) + C 3 sin ( C 4 ) + C 3 sin ( C 4 ) – C 3 cos ( C 4 ) 0 = C 1 + 100C 2 + 2C 3 sin ( C 4 ) Equations (4) and (5) can be combined. 0 = C 1 + 100C 2 + 2 ( – 9C 2 + 0.25 ) 0 = – 17C 1 + 100C 2 + 0.5 3 (5) (6) d ---- x = – C e – t + ( – 1000 )C e –10t – 2C e – t sin ( t + C ) + 2C e –t cos ( t + C ) 1 2 3 4 3 4 dt h 0 = – C 1 + ( – 1000 )C 2 – 2C 3 sin ( C 4 ) + 2C 3 cos ( C 4 ) (7) Figure 58 Solution of a higher order differential equation page 84 Equations (2 and (4) are substituted into equation (7). 0 = – C 1 + ( – 1000 )C 2 – 2 ( – 9C 2 + 0.25 ) + 2 ( – C 1 – C 2 – 0.25 ) 0 = – 3C 1 + ( – 984 )C 2 – 1 984 1 C 1 = – -------- C 2 – - 3 3 Equations (6) and (8) can be combined. 984 1 0 = – 17 – -------- C 2 – -- + 100C 2 + 0.5 3 3 0 = 5676C 2 + 6.1666667 984 1 C 1 = – -------- ( – 0.00109 ) – - 3 3 Equations (2) and (4) can be combined. – 9C 2 + 0.25 C 3 sin ( C 4 ) -------------------------- = ------------------------------------C 3 cos ( C 4 ) – C 1 – C 2 – 0.25 – 9 ( – 0.00109 ) + 0.25 tan ( C 4 ) = --------------------------------------------------------------------------– ( 0.0242 ) – ( – 0.00109 ) – 0.25 C 3 sin ( – 0.760 ) = – 9 ( – 0.00109 ) + 0.25 The final response function is, x ( t ) = 0.0242e + ( – 0.00109 )e –t – 10t (8) C 2 = – 0.00109 C 1 = 0.0242 C 4 = – 0.760 Equation (4) can be used the find the remaining unknown. C 3 = – 0.377 –t + ( – 0.377 )e cos ( t – 0.760 ) + 0.25 Figure 59 Solution of a higher order differential equation (cont’d) In some cases we will have systems with multiple differential equations, or nonlinear terms. In these cases explicit analysis of the equations may not be feasible. In these cases we may turn to other techniques, such as numerical integration which will be covered in later chapters. 3.4 RESPONSE ANALYSIS Up to this point we have mostly discussed the process of calculating the system response. As an engineer, obtaining the response is important, but evaluating the results is more important. The most critical design consideration is system stability. In most cases a system should be inherently stable in all situations, such as a car cruise control. In other page 85 cases an unstable system may be the objective, such as an explosive munition. Simple methods for determining the stability of a system are listed below: 1. If a step input causes the system to go to infinity, it will be inherently unstable. 2. A ramp input might cause the system to go to infinity; if this is the case, the system might not respond well to constant change. 3. If the response to a sinusoidal input grows with each cycle, the system is probably resonating, and will become unstable. Beyond establishing the stability of a system, we must also consider general performance. This includes the time constant for a first-order system, or damping coefficient and natural frequency for a second-order system. For example, assume we have designed an elevator that is a second-order system. If it is under damped the elevator will oscillate, possibly leading to motion sickness, or worse. If the elevator is over damped it will take longer to get to floors. If it is critically damped it will reach the floors quickly, without overshoot. Engineers distinguish between initial setting effects (transient) and long term effects (steady-state). The transient effects are closely related to the homogeneous solution to the differential equations and the initial conditions. The steady-state effects occur after some period of time when the system is acting in a repeatable or non-changing form. Figure 60 shows a system response. The transient effects at the beginning include a quick rise time and an overshoot. The steady-state response settles down to a constant amplitude sine wave. page 86 Steady-state Transient Note: the transient response is predicted with the homogeneous solution. The steady state response in mainly predicted with the particular solution, althought in some cases the homogeneous solution might have steady state effects, such as a non-decaying oscillation. Figure 60 A system response with transient and steady-state effects 3.5 NON-LINEAR SYSTEMS Non-linear systems cannot be described with a linear differential equation. A basic linear differential equation has coefficients that are XXXXXXXXXXXXXX Eamples of system conditions that lead to non-linear solutions are, • XXXXXXXXXXXXXXXXXXXX 3.5.1 Non-Linear Differential Equations A non-linear differential equation is presented in Figure 61. It involves a person ejected from an aircraft with a drag coefficient of 0.8. The FBD shows the sum of forces, and the resulting differenetial equation. The velocity squared term makes the equation non-linear, and so it cannot be analyzed with the previous methods. In this case the termi- page 87 nal velocity is calculated by setting the acceleration to zero. This results in a maximum speed of 126 kph. The equation can also be solved using explicit integration XXXXXXXXXXXXXX Consider the differential equation for a 100kg human ejected from an airplane. The aerodynamic drag will introduce a squared variable, therefore making the equation nonlinear. Ns 2 0.8 -------- ( y' ) 2 m 2 ∑ Fy = 0.8 ( y' ) – Mg = – My'' 2 2 Ns N2 100kgy'' + 0.8 -------- ( y' ) = 100kg9.81 ----2 kg m y Ns 2 100kgy'' + 0.8 -------- ( y' ) = 981N 2 m 2 msm 2 100kgy'' + 0.8kg ---- ----- ( y' ) = 981kg ---2 2 2 s m s –1 2 –2 100y'' + 0.8m ( y' ) = 981ms 2 Mg The terminal velocity can be found be setting the acceleration to zero. 100 ( 0 ) + 0.8m ( y' ) = 981ms y' = 981ms - = -------------------–1 0.8m –2 –1 2 –2 981 2 –2 -------- m s = 35.0 m = 126 km -------0.8 s h Figure 61 Development of a non-linear differential equation page 88 An explicit solution can begin by replacing the position variable with a velocity variable and rewriting the equation as a separable differential equation. 100y'' + 0.8m ( y' ) = 981ms 100v' + 0.8m v = 981ms –1 2 –2 –1 2 –2 dv –1 2 –2 100 ----- + 0.8m v = 981ms dt dv –2 –1 2 100 ----- = 981ms – 0.8m v dt 100 ------------------------------------------------- dv = dt –2 –1 2 981ms – 0.8m v 100 ------------------–1 – 0.8m ∫ -------------------------------------------- dv = ∫ dt 981 ------------------- ms –2 + v 2 –1 – 0.8m – 125m ∫ --------------------------------------------2 dv = t + C1 2 2 – v – 1226.25m s ∫ ----------------------------------------------------------------- dv m m v + 35.02 --- v – 35.02 --s s Figure 62 –125m = t + C1 Development of an integral 785s 35.s B = – 1.( – A + B ) = – 125m s A+B = 0 A = –B m 35.( – A + B ) = – 125m s 125 ( – ( – B ) + B ) = – -----------.02 --s t m --------------v + 35.785s ∫ ∫ 1.02 --C 1 1.= e -------------------------m v – 35.+ C 1 v + 35.02 --1.02 --. A B -------------------------------.785s ln v + 35.785s – 1. m m 1.02 --sln a + bx –1 1.+ C m b v – 35.785s -------------------------------.02 --.02 m v – 35.02 m v – 35.785s ln -------------------------.785s ln v – 35.02 --.02 A = 1.dv = t + C1 v + 35. In this case the integration constants can be left off because they are redundant with the one on the right hand side.– 1.785s s -------------------------.02 --.= e e m v – 35.02 m ---- s s The integral can then be solved using an identity from the integral table.+ ------------------------------.785s s.page 89 This can be reduced with a partial fraction expansion.+ ------------------------------.02 --s m t --------------. + Bv + B 35.02 --s Figure 63 Solution of the integral . = – 125m s s m v ( A + B ) + 35.02 --.= t + C 1 ∫ ( a + bx ) dx = ----------------------.02 --.02 m ---- s s m m Av – A 35.dv = t + C1 v + 35.= t + C 1 s s m v + 35. 02 --1.---------------0 = 35. we will need to linearize the . 1 + 1 s 1+1 t 2 s --------------.785s −e m −1–1 1–1 0 m ---------------------------- –1 + .02 --.785s 1.785s -------------------------2 m 0 – 35. + − = ----------.e – 35. m t v + 35.2 Non-Linear Equation Terms If our models include a device that is non-linear.02 --.02 -- + + s s t -------------- 1.785s m 1.02 --. non-linear equations are much harder to solve and don’t have routine methods.02 --s An initial velocity of zero can be assumed to find the value of the integration constant m 0 --------------0 + 35.785s s-------------------------.785s -------------------------. = -- v = 35.5.02 --s 1 = C2 This can then be simplified.02 ----------------s 1.02 --.page 90 m t --------------v + 35.= C 2 e m v – 35.= C e 1.02 --.= ± e m v – 35.= ± ve + 35.02 --s m m 1. t s --------------. –1 - v = 35. Typically the numerical methods discussed in the next chapter are preferred.785s t t t --------------- t --------------- Figure 64 Solution of the integral and application of the initial conditions As evident from the example. 1 + e 1.785s v 1 − e = − 35.e s s --------------- -------------- m 1.785s + t -------------- 1. 3.02 --s.785s e m ----------------------.785s − v + 35. and the absolute value sign eliminated.02 --. 1 − e 1. Consider the non-linear function in Figure 65. Use the linear equation for the analysis. Find a constant value that relates a change in the input to a change in the output. The function can be approximated as linear by picking a value XXXXXXXXXXXXXXXXXXXXXX In this case the relationship between pressure drop and flow are non-linear. . 1.page 91 model before we can proceed. 2. The example in Figure 66 shows the linearization of a non-linear equation about a given operating point. Develop a linear equation. 3. When this value does the new velocity can be calculated. Pick an operating point or range for the component. 4. This equation will be approximately correct as long as the first derivative doesn’t move too far from 100. We need to develop an equation that approximates the local operating point. q ∆p ≈ R ( q – q ) ∆ ( ∆p ) R ≈ --------------∆q q R = 2 ----2 K q ∆p ∆ ( ∆p ) ∆q Figure 65 Finding a linear parameter A linearized differential equation can be approximately solved using known techniques as long as the system doesn’t travel too far from the linearized point. A non-linear system can be approximated with a linear equation using the following method. 316 A = 50 C = – 40 + 50 Figure 66 Linearizing a differential equation .316t + 50 y ( t ) = Ce 0 10 = Ce + 50 y ( t ) = – 40e – 0. If the velocity (first derivative of y) changes significantly.65y' + 4y = 20 This system may now be solved as a linear differential equation.page 92 Assume we have the non-linear differential equation below.65A + 4 = 0 – 0. y' = ± 200 – 4y y' ( 0 ) = ± 200 – 4 ( 10 ) = ± 12. y' + 4y = 200 2 y ( 0 ) = 10 We can make the equation linear by replacing the velocity squared term with the velocity times the actual velocity. Homogeneous: 12. As long as the system doesn’t vary too much from the given velocity the model should be reasonably accurate. It can be solved by linearizing the value about the operating point Given.316t y h = Ce Particular: yp = A 12.65 12. then the differential equation should be changed to reflect this.65y' + 4y = 0 12.65 ( 0 ) + 4A = 200 Initial conditions: – 0.316t A = – 0. .25 ( 0 ) + 4A = 200 Initial conditions: – 0.1 ) + 50 = 11. but once motion starts it is replaced with a smaller kinetic friction.327t + 50 y ( t ) = Ce 0.1 ) = – 40e – 0. But. the forces at work are continually changing.24 = Ce + 50 y ( t ) = – 35.070575 + 50 Notice that the values have shifted slightly.1 ) = – 40 ( – 0. then the differential equation should be changed to reflect this.07e – 0.25A + 4 = 0 – 0.5.3 Changing Systems In practical systems.1s.page 93 If the velocity (first derivative of y) changes significantly.24 Note: a small change d---.25y' + 4y = 0 12. When under tension the cable acts as a spring.316 )e –0.316t A = – 0.327t y h = Ce Particular: yp = A 12. y ( 0.y ( 0.316 ( 0. and as the analysis progresses the equations will adjust slowly.316 ( 0. For example we could decide to recalculate the equation value after 0.327 A = 50 C = – 35. Homogeneous: 12.1 11. Figure 67 Linearizing a differential equation 3.25y' + 4y = 20 Now recalculate the solution to the differential equation.1 ) = 12. For example a system often experiences a static friction force when motion is starting.25 dt 12. when in compression the force goes to zero. Higher accuracy can be obtained using smaller steps in time. Another example is tension in a cable. while the block is free to move.t – F F m m s FF NNx 2'' + 10 --------.x 2 = 1000 --.t – -------------3 100kg s x1 – x2 < 0 For the cable/spring in compression FF M = 100kg ∑ Fx = – F F = Mx 2'' – F F = 100kgx2'' 100kgx 2'' = – F F FF x 2'' = – -------------100kg Figure 68 A differential equation for a mass pulled by a springy cable . only restricted by friction forces and inertia.1 --. The right hand side of the cable is being pulled at a constant rate.3 N K s = 1000 --m M = 100kg m x 1 = 0.t – x 2 = 100kgx 2'' m s N N m 100kgx 2'' + 1000 --.1 --.1 --.page 94 Consider the example in Figure 68.1 µ s = 0.t – -------------kgm kgs 100kg FF m –2 x 2'' + 10s x 2 = 1 ---.0.x 2 = 1 ------. At the beginning all components are at rest and undeflected. x2 µ k = 0. For the cable/spring in tension x 1 – x 2 ≥ 0 FF M = 100kg Ks ( x1 – x 2 ) ∑ Fx = – F F + K s ( x 1 – x 2 ) = Mx 2'' N m – F F + 1000 --. The friction force will be left as a variable at this point. 0.t s An FBD and equation can be developed for the system. A mass is pulled by a springy cable. page 95 x2 µ k = 0.t s An FBD and equation can be developed for the system. In this case the cable/spring will be undeflected with no force.= 981N kg static friction d---. The friction force will be left as a variable at this point.1 --.x 2 ≤ 0 m --dt s 0N ≤ F F < µ s N < 294.3 N K s = 1000 --m M = 100kg m x 1 = 0.t = ----------------------3 2 s 100kgs t = 2.3N kinetic friction d---.81 ----. NN = 100kg9. x2 = 0 x 2'' = 0 FF = 294. Therefore the block will stay in place until the cable stretches enough to overcome the static friction.t – -------------3 100kg s m 294.x 2 > 0 m --dt s F F = µ k N = 98.3N –2 0 + 10s 0 = 1 --.3N FF m –2 x 2'' + 10s x 2 = 1 ---.3kgm 1 --.943s Therefore the system is static from 0 to 2.t – ----------------3 100kg s m 294. and the mass will be experiencing static friction.1 µ s = 0.943s .1N Figure 69 Friction forces for the mass The analysis of the system begins with assuming the system starts at rest and undeflected. x p = At + B x p' = A x p'' = 0 –2 –2 A = ± 3.0981m . x 2'' + 10s x 2 = 0 A + 10s = 0 x h = C 1 sin ( 3.t – -------------3 100kg s m –2 10s A = 1 ---3 s 98. and continue to accellerate until the cable/spring becomes loose in compression.1N –2 0 + 10s ( At + B ) = 1 --. This stage of motion requires the solution of a differential equation.1N –2 10s B = – -------------100kg Figure 71 Analysis of the object after motion begins m A = 0.16t + C 2 ) For the particular.page 96 Figure 70 Analysis of the object before motion begins After motion begins the object will only experience kinetic friction.1N –2 x 2'' + 10s x 2 = 1 ---.1 --s B = – 0. m 98.16js –1 m 98.t – -------------3 100kg s For the homogeneous. 0316 tan ( 9.= – 0.16t – 7.1962 C 1 = --------------------------------------------------.199 ( 3.16C 1 cos ( 3.209 C 2 = ( – 7.x ( t ) = –0.1 --.1 --.= – 0.29988 + C 2 ) = 6.943s ) = 0 m --dt s m x ( t ) = C 1 sin ( 3.29988 + C 2 ) = – 0.943s ) = 0m d---.199 m sin ( 3.1 m --dt s m 0 = 3.0316 C 1 sin ( 9.29988 + C 2 ) – 0.16 ( 2. x ( 2.16 )m cos ( 3.889 ) m x ( t ) = – 0.0981m s C 1 sin ( 9.1 --.199m sin ( 9.16 ( 2.29988 + C 2 ) = – 0.t – 0.943 ) + C 2 ) + 0.page 97 For the initial conditions.t – 0.16C 1 cos ( 3.889rad ) + 0.29988 – 7.1 m --dt s Figure 72 Analysis of the object after motion begins .x ( 2.29988 + C 2 ) ---------------------------------------------------.0981m s m 0 = C 1 sin ( 3.1 --s C 1 cos ( 9.x ( t ) = 3.889 + πn )rad n∈I – 0.1962 d---.1962 -----------------C 1 cos ( 9.( 2.16t + C2 ) + 0.16t + C2 ) + 0.943s ) – 0.889rad ) + 0.16t – 7.0981m s d---.943s ) + C 2 ) + 0. This point in time can be determined when the displacement of the block equals the displacement of the cable/spring end.913 --.t = – 0.913 --2 s s t = 3. m m 0 = –0.328s ) + C 1 2 s s m C 1 = 3.16t – 7.889 + πn = – 0.---- t + 3.981 ---- t + 3.333 ) = 0.137m d---.( 3.0981m t = 3.16t – 7. Figure 73 Determining when the cable become slack . m 98.913 --.---- t + 3.51549413 x ( 3.t – 0.---- ( 3.328s ) + C 2 2 s 2 s C 2 = – 7.989s The solution can continue.1 --.913 --.t + C2 2 s 2 s 0.981 m 2 m x 2 = – -----------.453m 0. m m 0.16t – 7.981 m 2 m x 2 ( t ) = – -----------.981 ---- ( 3.199 m sin ( 3.328s ) + 3.328 ) = 0.= – 0.328s 3.981 ---- t + C 1 2 s m m 0.981 --2 100kg s m x 2' = – 0.0981m s s – 0.199 m sin ( 3.889rad ) + 0.x ( 2.913 --s 0.137m = – -----------. considering when to switch the analysis conditions.981 m m 2 0.1 --.648 m --dt s After this the differential equation without the cable/spring is used.889rad ) = 0.page 98 The equation of motion changes after the cable becomes slack.1N x 2'' = – -------------.648 --.t – 7.453m 2 2 s s This motion continues until the block stops moving.= – 0. but as usual the best place to begin is by developing a free body diagram. The equipment operates such that a force of 1000N with a frequency of 2Hz is exerted on the mass. The mass of the equipment is 10000kg. the oscillations while the machine is running cannot be more than 2cm total. Figure 74 A vibration control system There are a number of elements to the design and analysis of this system.page 99 3. F M y The model to the left describes a piece of reciprocating industrial equipment. and a differential equation. . In total there will be four mounts mounted around the machine.6 CASE STUDY A typical vibration control system design is described in Figure 74. Each isolator will be composed of a spring and a damper. We have been asked to design a vibration isolation mounting system. In addition. and 25cm when loaded with the mass. The criteria we are given is that the mounts should be 30cm high when unloaded. This is done in Figure 75. = --------------------.05 ) ∴K s = 491KNm Figure 76 –1 –1 –2 Calculation of the spring coefficient The remaining unknown is the damping coefficient.+ ----------. This is done in Figure 76. At this point we have determined the range of motion of the mass. In addition.81ms 10000Kg 10000Kg 10000Kg y'' + 0.1ms sin ( 4πt ) + 9. This will result in a downward compression of 0. and after loading the spring is 0.0004Kg K s y = 0.0004Kg K s y = 9. as it will contain the steady-state oscillations caused .81ms Figure 75 FBD and derivation of equation –1 –1 –2 Mg –2 Using the differential equation. we will assume that the cyclic force is not applied for the unloaded/loaded case. 0.30m long.05m ) = 9.0004 ( 0. in the positive y direction.0004Kg K d y' + 0. the spring values can be found by assuming the machine is at rest.Kgms m 0.25m long.page 100 + ∑ Fy F = F – 4K s y – 4K d y' + Mg = My'' M y My'' + 4K d y' + 4K s y = F + Mg 4K d y' 4K s y F 4K s y 4K d y' y'' + ------------.+ --------------------.81ms 9.81 – 2 –1 K s = ------------------------------.05m.= ---.0004Kg K s ( 0.81ms –1 –2 Now we can consider that when unloaded the spring is 0. the acceleration and velocity terms both become zero.+ g M M M 4K d y' 4K s y 1000N –2 y'' + --------------------. 0. This can be done by developing the particular solution of the differential equation. When the system is at rest the equation is simplified. This simplifies the differential equation by eliminating several terms.sin ( 2 ( 2π )t ) + 9. 8 × 10 K d + 1.1ms sin ( 4πt ) + 9.2 × 10 ) + 38..0004K d ( – 4πB ) + 196A = 0.1 sin ( 4πt ) + 9.1 A ( – 16 π + 196 ) + B ( – 5.0004Kg K d y' + 0.81ms –2 –6 2 –6 –3 2 –3 2 2 2 2 2 Figure 77 Particular solution of the differential equation The particular solution can be used to find a damping coefficient that will give an overall oscillation of 0.0004Kg ( 491KNm )y = 0. although it could have also been found by factoring out the algebra.8 × 10 K d + 1. y'' + 0.124 B = ------------------------------------------------------------------------------------------------------–9 –3 2 K d ( – 159 × 10 ) + K d ( – 6.81ms y'' + 0.18 × 10 K d – 0.1ms sin ( 4πt ) + 9.2 × 10 ) + 38.1 A ( – 16 π + 196 ) + A ( 31.81 – 16π B + 0.24 ) ( – 5.0004K d 4πA + 196A = 0 –6 B = A ( 31.e.0004K d ( 4πA cos ( 4πt ) – 4πB sin ( 4πt ) ) + 196 ( A sin ( 4πt ) + B cos ( 4πt ) + C ) = 0.1 0.1 3.page 101 by the forces as shown in Figure 77. In this case Mathcad was used to find the solution.1 C = 9.1 A = ------------------------------------------------------------------------------------------------------–9 –3 2 K d ( – 159 × 10 ) + K d ( – 6.) y = A sin ( 4πt ) + B cos ( 4πt ) + C y' = 4πA cos ( 4πt ) – 4πB sin ( 4πt ) y'' = – 16 π A sin ( 4πt ) – 16π B cos ( 4πt ) ∴( – 16 π A sin ( 4πt ) – 16π B cos ( 4πt ) ) + 0. and solving for the coefficients.0 × 10 K d ) = 0. and finding the roots of the resulting polynomial.81ms –1 –2 –2 –2 –1 –1 –1 –2 –2 The particular solution can now be found by guessing a value.1 A = -----------------------------------------------------------------------------------------------------------------------------------2 –6 –3 – 16 π + 196 + ( 31.8 × 10 K d + 1.0 × 10 K d ) 0.24 ) ( – 5.02m. as shown in Figure 78. (Note: The units in the expression are uniform (i. . the same in each term) and will be omitted for brevity.0004Kg K d y' + 196s y = 0.0 × 10 K d ) = 0.24 ) 2 – 16 π A + 0. 124 ) 0.18 × 10 K d – 0. or a magnitude of 0. The magnitude oscillation can be calculated with the Pythagorean formula.02m.01m.18 × 10 K d – 0. sK d = 3411N --m Aside: the Mathcad solution 2 –6 2 Figure 78 Determining the damping coefficient The values of the spring and damping coefficients can be used to select actual components. magnitude = A +B 2 2 2 –6 2 ( 0.1 ) + ( 3. Some companies will design and build their own components.1 The design requirements call for a maximum oscillation of 0.1 ) + ( 3.01 = ------------------------------------------------------------------------------------------------------2 –9 –3 K d ( – 159 × 10 ) + K d ( – 6. or requesting custom designs from other companies. .page 102 In the previous particular solution the values were split into cosine and sine components.2 × 10 ) + 38. Components can also be acquired by searching catalogs.124 ) magnitude = ------------------------------------------------------------------------------------------------------–9 –3 2 K d ( – 159 × 10 ) + K d ( – 6. ( 0.2 × 10 ) + 38.1 A given-find block was used in Mathcad to obtain a damper value of. Also assume that gravity is present. If the system if first-order find the time constant. • First and second-order responses were examined. • The topic of analysis was discussed. a) Write the differential equations for the system below.7 SUMMARY • First and second-order differential equations were analyzed explicitly. If it is second-order find the natural frequency and damping ratio. • A case study looked at a second-order system. 3.8 PRACTICE PROBLEMS 1. .page 103 3. Kd1 = 1 Ns/m Ks1 = 1 N/m Kd = 1 Ns/m x1 Kd2 = 1Ns/m Ks2 = 1 N/m F=1N M = 1 kg x x2 F=1N Ks = 1 N/m b) State whether the system is first or second-order. Solve the equations for x assuming that the system is at rest and undeflected before t=0. 1V o = 3V i + 2 initial conditions V i = 5V Vo = 0 V o' = 0 3. Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 seconds. At time 0s the system is released and allowed to drop. 0.5t cos ( 0.81 x 2 = 2 – 2e τ = 1 ζ = 0.1V o = 3V i + 2 initial conditions V i = 5V Vo = 0 V o' = 1 (ans.6V o' + 2. V 0 ( t ) = – 8. The input is a step function that turns on at t=0.524 ) + 10. x = – 12.5V o'' + 0. The input is a step function that turns on at t=0.5V o'' + 0.866t – 0. 0. x1 = 1 – e –t ans. Solve the differential equation to .96t – 0.238 ) + 8.5 ωn = 1 2. Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 seconds. It then oscillates.331e – 0.485e –t – 0.6V o' + 2.6t cos ( 1.095 4.page 104 ans. The following differential equation was derived for a mass suspended with a spring. 81ms –2 9.81N ------2 m s Kgm Kgm ( 1Kg )y'' + 100 ----------- y = 9.81ms --------------------.0981m initial conditions: y = y h + y p = C 1 cos ( 10t + C 2 ) + 0. + N K s = 100 --m M = 1Kg y ∑ Fy = K s y – Mg = – My'' N N 100 --.81 ----------2 2 ms s y'' + ( 100s )y = 9.0981m C 1 = – 0.0981m A = 0 B = –2 100s y p = 0. homogeneous: guess yh = e 2 At At –2 y h' = Ae At At y h'' = A e 2 At A e + ( 100s )e 2 –2 = 0 –1 A = ± 10 js A = – 100s y h = C 1 cos ( 10t + C 2 ) particular: guess y p = At + B –2 y p' = A y p'' = 0 –2 ( 0 ) + ( 100s ) ( At + B ) = 9. y = 9.81ms –1 y' 0 = 0ms y = 0m 0 –2 –2 FBD: M Ks y Mg (ans.81ms –2 –2 ( 100s ) ( At + B ) = 9. y – ( 1Kg ) 9.0981m C2 = 0 0 = C 1 cos ( 10 ( 0 ) + ( 0 ) ) + 0.0981m = C 1 cos ( 0 ) y = ( – 0.0981m ) cos ( 10t ) + 0.81 -----.page 105 find the motion as a function of time.0981m y' = – 10C 1 sin ( 10t + C 2 ) for d/dt y0 = 0m: 0 = – 10C 1 sin ( 10 ( 0 ) + C 2 ) for y0 = 0m: – 0. = ( – 1Kg )y'' m Kg N 1 Nm y'' + 100 --.0981m .= 0. Solve the following differential equation with the three given cases. What additional damping would be required to make the system critically damped? . x'' + 2ξωn x' + ω n x = y ξ = 0. the damping ratio and describe the type of response you would expect if the mass were displaced and released. All of the systems have a step input ’y’ and start undeflected and at rest.5 ξ = 1 ξ = 2 ω n = 10 ω n = 10 ω n = 10 2 initial conditions x' = 0 x = 0 y = 1 case 1: case 2: case 3: 6. All of the systems have a sinusoidal input ’y’ and start undeflected and at rest. A system is to be approximated with a mass-spring-damper model using the following parameters: weight 28N. x'' + 2ξωn x' + ω n x = y ξ = 0.page 106 5. Solve the following differential equation with the three given cases. viscous damping coefficient 6Ns/m and stiffness 36N/m. Calculate the undamped natural frequency (Hz) of the system.5 ξ = 1 ξ = 2 ω n = 10 ω n = 10 ω n = 10 2 initial conditions x' = 0 x = 0 y = sin ( t ) case 1: case 2: case 3: 7. = -------------------------------------------. What are the natural frequency (Hz) and damping ratio? (ans.06*103 N/m and damping coefficient is 100Ns/m.85kg s Ns K d = 20.018m) 11. x 1 A -. Given 28N M = ---------------.2.85kg N9.85kg 2.= 0. Assume an initial displacement of 50mm.39 -------s If pulled and released the system would have a decaying oscillation about 1.55 ) -------.296 rad 2ω n 2 ( 3.85kg s K d ----6N -- M m ξ = ----------.=. damp. (0..37 rad/sec) 12.55 ) -------. Determine the first order differential equation given the graphical response shown below. 24.. fn=3. .= 2.6N/cm.77Hz.9Hz A critically damped system would require a damping coefficent of..575) 10.55 rad ms -------ω n = ----.20. with a delay of 0.= 12.= ---------------s M 2.page 107 (ans.2 ----m sK d = 6N --m N K s = 36 --m 8. kgm N 36 --------36 --2 Ks m = ---------------.= ------------------------------------------2 2 2 F D M + DK d + K s D + D2ξωn + ω n The second order parameters can be calculated from this.= ----------------------------------------. A spring damper system supports a mass of 34N. What is the transfer function for a second-order system that responds to a step input with an overshoot of 20%. stiffness is 2.= 1 rad 2ω n 2 ( 3.= -------------------------------------------. What would the displacement amplitude after 100ms for a system having a natural frequency of 13 rads/sec and a damping ratio of 0.85kg s rad 2 ω d = ω n 1 – ξ = 3. K d ----Kd M ξ = ----------. what is the systems natural frequency? (ans.63s –2 = 3. For our standard lumped parameter model weight is 36N.81 ----kg The typical transfer function for a mass-spring-damper systems is. If it has a spring constant of 20.2.4 seconds to the first peak? 9. page 108 Assume the input is a step function.x = A τ The values at steady state will be x' = 0 x = 4 So the unknown ‘A’ can be calculated. 4 x t(s) 1 2 τ = 1 Given the equation form.x = 4 1 x' + x = 4 13. Determine the parameters of 0 3 4 . 1 x' + -. The second order response below was obtained experimentally. 1 A = 4 0 + -. x 4 t(s) 0 1 2 3 4 (ans.4 = A 1 1 x' + -. 0.5s 1s 2 10 0 t(s) .page 109 the differential equation that resulted in the response assuming the input was a step function. + 1 3.219 3.059 ξ 0.= 0.4560 This leads to the final equation using the steady state value of 10 x'' + 2ξωn x' + ω n x = F x'' + 6.= --------------.5 10 2σ = – 2 ln ----- = 3.3 14.059 ) x = F F = 498.4560 ) ( 7.219 ξ ξ = 1 -----------------------------.= 2π 1s 3.438 ( 0 ) + 49.= e – σ0.219 ξ 2π .219 2 2π = -----------.83x = F ( 0 ) + 6. Explain with graphs how to develop first and second-order equations using experimental data.page 110 (ans.3 2 .= 7. + 1 = ---2 3. = 1 – ξ ------------2 3.059 )x' + ( 7.83 ( 10 ) = F x'' + 6.2 -----------.219 3. 2 x'' + 2 ( 0.4560 2π .2 -----------.438x' + 49.83x = 498.2 1 -----------.438x' + 49.219ω n = -----------. For the first peak: – σt b----.219 10 For the damped frequency: 2π ω d = ----.1 – ξ ξ 2 2π .219 ω n = -----------ξ 2 π ω d ≈ --tp 1 ξ = ----------------------------π ------- 2 + 1 t p σ These values can be used to find the damping coefficient and natural frequency σ = ξω n ωd = ωn 1 – ξ 3.= e p ∆x 2----.5 10 2ln ----- = – σ0. Key points: First-order: find initial final values find time constant with 63% or by slope use these in standard equation Second-order: find damped frequency from graph find time to first peak use these in cosine equation .page 111 (ans. numerical methods can be used. 4. but this is not always practical. Taylor series and Runge-Kutta • Using tabular data • A design case Objectives: • To be able to solve systems of differential equations using numerical methods. The solution is often in the form of a set of numbers.e. and then integrating these with one of a number of techniques. In cases where the equations are too costly to develop. The solution is often returned quickly so trial and error design techniques may be used. This chapter focuses on techniques that can be used for numerically integrating systems of differential equations. NUMERICAL ANALYSIS Topics: • State variable form for differential equations • Numerical integration with Mathcad and calculators • Numerical integration theory: first-order. which reduces all of the equations to first-order differential equations. numbers not symbols) to develop a single solution to a differential equation. The most common standard form is state variable form. or a graph.page 112 4. But.1 INTRODUCTION For engineering analysis it is always preferable to develop explicit equations that include symbols.2 THE GENERAL METHOD The general process of analyzing systems of differential equations involves first putting the equations into standard form. This can then be used to analyze a particular design case. without a symbolic equation the system can be harder to understand and manipulate. As their name suggests. numerical methods use numerical calculations (i. .. These first-order equations are then easily integrated to provide a solution for the system of equations. 4. For example. This form can be useful. ’v’. In the example the two state equations are manipulated into a matrix form. The general form of state variable equations is shown in Figure 79. and the value of x is used to calculate the derivative. no integration) C = transition matrix relating outputs/states D = matrix relating inputs to outputs/states Figure 79 The general state variable form An example of a state variable equation is shown in Figure 80. they can be used to write first-order state variable equations. the state of the car is described by its position and velocity. HP calculators require the matrix form. x = state/output vector (variables such as position) u = input vector (variables such as input forces) A = transition matrix relating outputs/states B = matrix relating inputs to outputs/states y = non-state value that can be found directly (i.1 State Variable Form At any time a system can be said to have a state. The output equation is not always required. An equation is also required to define the velocity as the first derivative of the position. while TI calculators use the equation forms.2. • They should fully describe the system elements. ’x’. Factors that are useful when identifying state variables are: • The variables should describe energy storing elements (potential or kinetic). the FBD is used to develop the differential equation. but it can be used to calculate new output values. Software such as Mathcad can use either form. Notice that the state variable equation is linear. After the state variables of a system have been identified. d ---- x = Ax + Bu dt y = Cx + Du state variable equation output equation where. The main disadvantage of the matrix form is that it will only work for lin- . The resulting differential equation is secondorder. Using the velocity variable. As always. reduces the second-order differential equation can be reduced to a first-order equation. Consider a car for example. but this must be reduced to first-order. and may be required for determining a solution.e.page 113 4. • The variables must be independent. Equation (1) defines the velocity variable. then an additional equation must be developed using an unexploited relationship. the differential equation for the system is. F x M K d x' + Ks x ∑ Fx = – F + K d x' + K s x = Mx'' – F + K d x' + K s x = Mx'' The equation is second-order. so two state variables will be needed. + ------ M M M (2) (1) Equations (1) and (2) can also be put into a matrix form similar to that given in Figure 79. 0 1 0 d---. Figure 80 A state variable equation example . there must be the same number of state equations as variables.----. ’v’.page 114 ear differential equations. x' = v – F + K d x' + K s x = Mx'' – F + K d v + K s x = Mv' Ks Kd –F v' = x ----- + v ----. If there are too many equations. The other choice can be the velocity. The velocity variable can then be substituted into the differential equation for the system to reduce it to first-order. One obvious choice for a state variable in this equation is ’x’. a redundancy or over constraint must be eliminated. If there are too few equations. Given the FBD shown below.v M M M Note: To have a set of differential equations that is solvable.x = K K x + – F s d dt v ---------. For each cart a velocity state variable is created. . ∑F d= F = M ---- x dt 2 Figure 81 Drill problem: Put the equation in state variable form Consider the two cart problem in Figure 82. The carts are separated from each other and the wall by springs. and a force is applied to the left hand side.page 115 Put the equation into state variable and matrix form. The equations are then manipulated to convert the second-order differential equations to first-order state equations. and differential equations developed. Free body diagrams are developed for each of the carts. The four resulting equations are then put into the state variable matrix form. page 116 x1 x2 F M1 K s1 M2 K s2 F M1 K s1 ( x 1 – x 2 ) + ∑ Fx = F – K s1 ( x 1 – x 2 ) = M 1 x 1'' M 1 x 1'' + K s1 x 1 – K s1 x 2 = F x 1' = v 1 M 1 v 1' + K s1 x 1 – K s1 x 2 = F K s1 F.x 1 + ------.0 v 2 M2 M2 Figure 82 Two cart state equation example .1 = dt x 2 v2 0 1 – K s1 ---------.0 ------------------------.0 M1 0 K s1 ------M1 0 0 x1 v1 0 F-----+ M1 0 0 0 0 0 1 x2 K s1 – K s1 – K s2 ------.K s1 v 1' = -----. x1 d.v ---.– ------. x 2 M2 M2 (3) (4) The state equations can now be combined in a matrix form.x 1 – ---------------------.x 2 M1 M1 M1 (1) (2) K s1 ( x 1 – x 2 ) M2 K s2 ( x 2 ) + ∑ Fx = K s1 ( x 1 – x 2 ) – K s2 ( x 2 ) = M 2 x 2'' M 2 x 2'' + ( K s1 + K s2 )x 2 – K s1 x 1 = 0 x 2' = v 2 M 2 v 2' + ( K s1 + K s2 )x 2 – K s1 x 1 = 0 K s1 + K s2 K s1 v 2' = ------. page 117 x1 K d1 M1 K s1 x2 F K s2 M2 Figure 83 Drill problem: Develop the state equations in matrix form . if a second-order equation has two second derivatives it cannot be converted to a state equation in the normal manner. To solve this problem. . ’q’. In this case the two high order derivatives can be replaced with a dummy variable.page 118 x1 K d1 M1 K s1 Figure 84 Drill problem: Convert the system to state equations In some cases we will develop differential equations that cannot be directly reduced because they have more than one term at the highest order. In mechanical systems this often happens when masses are neglected. For example. Consider the example problem in Figure 85. both ’y’ and ’u’ are first derivatives. A dummy variable. is then created to replace these two variables with a single variable. the highest order terms (’y’ and ’u’) are moved to the left of the equation. But. so a dummy variable is created for the integration.page 119 This also creates an output equation as shown in Figure 79. In this case the force on both sides of the damper is the same. as shown in Figure 86. then solve for y as an output eqn. 3y' – 5u' = – 2y Step 2: replace the left hand side with a dummy variable. . 3y' + 2y = 5u' Step 1: put both the first-order derivatives on the left hand side. An output equation needed to be created to calculate the value for x1. q = 3y – 5u ∴q' = – 2y Step 3: solve the equation using the dummy variable. Given the equation. so it is substituted into the equation for the cart. q + 5u q' = – 2y y = -------------3 Figure 85 Using dummy variables for multiple high order terms At other times it is possible to eliminate redundant terms through algebraic manipulation. the effects on the damper must also be integrated. F K d ( x 1' – x 2' ) + ∑ Fx = F – K d ( x 1' – x 2' ) = 0 K d ( x 1' – x 2' ) = F q = x1 – x2 Kd ( q ) = F Fq' = ----Kd x1 = x2 + q K d ( x 1' – x 2' ) M + (1) (2) ∑ Fx = K d ( x 1' – x 2' ) = Mx 2'' (3) (4) F = Mx 2'' x 2' = v 2 F v 2' = ---M The state equations (1.page 120 x1 F Kd x2 M The FBDs and equations are. The output equation (2) can also be put in matrix form. 3.x 2 = 0 0 1 x 2 + 0 dt v2 0 0 0 v2 F ---M x1 q = 1 1 0 x2 + 0 v2 Figure 86 A dummy variable example . 4) can be put in matrix form. F----q q Kd 0 0 0 d---. The steps that follow describe the button sequences required to enter and analyze the equations. but this is a very time consuming task.3 NUMERICAL INTEGRATION Repetitive calculations can be used to develop an approximate solution to a set of differential equations.) . The next step is to put the equation in the form expected by the calculator. Q2. An example in Figure 87 shows the first four steps for a mass-spring-damper combination. At this point the equations are ready for solution. Add additional equations as required. (Note: large solutions can sometimes take a few minutes to solve. Generate the differential equations to model the process. etc. Smaller time steps result in a higher level of accuracy. y. 1. In this section we will explore some common tools for solving state variable equations. Select the state variables. The analysis process follows the basic steps listed below.1 Numerical Integration With Tools Numerical solutions can be developed with hand calculations. The state equations are also put into matrix form.page 121 4. The FBD is used to develop the differential equations for the system. 2. of the block. The state variables are then selected.3. the equation is solved with small time steps. 4. and velocity. Enter the equations into a computer or calculator and solve. Starting from given initial conditions. The result is a graph that shows the solution of the equation. Rearrange the equations to state variable form. Figure 87 Dynamic system example Figure 88 shows the method for solving state equations on a TI-86 graphing calculator. 5. Points can then be taken from the graph using the cursors. When solving with the TI calculator the state variables must be replaced with the predefined names Q1. F. in this case the position. (Note: this also works on other TI-8x calculators with minor modifications. 4. 3. although this is not always necessary.) In the example a sinusoidal input force. The equations are then rearranged into state equations. while larger time steps give a faster solution. is used to make the solution more interesting. v. page 122 Step 1: Develop equations KS Kd Ks y M y M F Step 2: We need to identify state variables. v.v M dt 1 F y + 0 ---–Kd –1 M -------. d ---- y dt 0 = –K S -------d- ---. Using the height.) Step 3: d ---- y = v dt – F – Kdv – Ks y d ---- v = ------------------------------------ dt M Step 4: We put the equations into a state variable matrix form. y. We will also need to use the vertical velocity. but essential when setting up these matrices. as state variables we may now proceed to rewriting the equations.v M F dd. and velocity.2 ∴F + Kd ---- y + K s y + M ---- y = 0 dt dt K d y' ∑ Fy dd= – F – K d ---- y – K s y = M ---- y dt dt 2 . In this case the height is clearly a defining variable. (Note: this is just an algebraic trick. because the acceleration is a second derivative (we can only have first derivatives). . 1.. Q9. Q1' = Q2 Q2' = – 4e – 0. Draw the graph [GRAPH][F5] 8.. we select some parameter values for the equations of Figure 87.5t sin ( t ) – 2v – 5y ---------------------------------------y dt y M Next.page 123 First.. so we replace y with Q1 and v with Q2. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER] 2. Move the left/right cursor to move along the trace. d ---- y = v y dt d ---- v = – F – K d v y – K s y = – 4e –0.5t sin ( t ) – 2Q2 – 5Q1 Now. Q2=0 5. use the up/down cursor to move between traces. Q2. 4. Look at the calculator manual for additional details. and the y height is from +3 to -3. (TI-86 only) Set up the format [GRAPH][MORE][F1][FldOff][ENTER] 7. Go to graph mode and enter the equations above [GRAPH][F1] 3.5. Enter the initial conditions for the system [GRAPH][F3] as Q1=0. the calculator requires that the state variables be Q1. To do this roughly follow the steps below. Figure 88 Solving state equations with a TI-85 calculator . Set up the axis for the graph [GRAPH][F2] so that time and the xaxis is from 0 to 10 with a time step of 0. The input force will be a decaying sine wave. Find points on the graph [GRAPH][MORE][F4]. Set the axis [GRAPH][F4] as x=t and y=Q 6. we enter the equations into the calculator and solve. Q)’. . This time is chosen because of the general . Look at the calculator manual for additional details.page 124 First. and the state equation function. To do this roughly follow the steps below. use the up/down cursor to move between traces.) The state variables in the vector ’Q’ replace the original state variables in the equations. Q2=0 5. The arguments for the function. ’D(t. so we replace y with Q1 and v with Q2.1s in duration. we select some parameter values for the equations of Figure 87. (TI-86 only) Set up the format [GRAPH][MORE][F1][FldOff][ENTER] 7.5t sin ( t ) – 2v – 5y ---------------------------------------y dt y M Next. the number of steps. In this case the 10 second time interval is divided into 100 parts each 0. Find points on the graph [GRAPH][MORE][F4]. d ---- y = v y dt d ---- v = – F – K d v y – K s y = – 4e –0. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER] 2. Set the axis [GRAPH][F4] as x=t and y=Q 6. Set up the axis for the graph [GRAPH][F2] so that time and the xaxis is from 0 to 10 with a time step of 0.. Move the left/right cursor to move along the trace. the end time. in sequence are. Figure 89 Solving state equations with a TI-89 calculator State equations can also be solved in Mathcad using built-in functions. 1. where ’t’ is the time and ’Q’ is the state variable vector. Q9.5. we enter the equations into the calculator and solve. UPDATE FOR TI-89 Q2' = – 4e – 0. the state vector. 4. the calculator requires that the state variables be Q1. The first step is to enter the state equations as a function. Enter the initial conditions for the system [GRAPH][F3] as Q1=0.. but it is not the matrix form. as shown in Figure 90. (Note: the equations are in a vector. Q2. Draw the graph [GRAPH][F5] 8.. Go to graph mode and enter the equations above [GRAPH][F1] 3. The input force will be a decaying sine wave.5t Q1' = Q2 sin ( t ) – 2Q2 – 5Q1 Now. the start time. The ’rkfixed’ function is then used to obtain a solution. and the y height is from +3 to -3. Many students encounter problems because they forget this. while in Mathcad the arrays start at Q0. Figure 90 Solving state variable equations with Mathcad Note: Notice that for the TI calculators the variables start at Q1. A time step that is too small will increase the computation time margnially. When in doubt. . If the time step is too large the solution may become unstable and go to infinity. run the calculator again using a smaller time step.page 125 response time for the system. y ( t ) dt Note: here the h value is the time step between integrations points.page 126 4. we can estimate the function value a short time later.3. creating an error between the actual and estimated values at time ’t+h’. as shown in Figure 91. h.y ( t ) dt dy ( t + h ) ≈ y ( t ) + h ---. Given the current value of a function and the first derivative. y(t + h) y(t) d---. Basically. using a known position and first derivative we can calculate an approximate value a short time. Notice that the values start before zero so that initial conditions can be used. h. later. In this example we are determining velocity by integrating the acceleration caused by a force. If the time step.) The equation shown is known as Euler’s equation. This is then used to calculate values iteratively in the table. t Figure 91 t+h First-order numerical integration The example in Figure 92 shows the solution of Newton’s equation using Euler’s method. (Note: Recall that the state equations allow us to calculate first-order derivatives. The acceleration is put directly into Euler’s equation.2 Numerical Integration The simplest form of numerical integration is Euler’s first-order method. the error would decrease. were smaller. A smaller time step will increase the accuracy. If the system was second-order we would need two previous values for the calculations. . Notice that the function being integrated curves downward. dF ---- v = --- dt M dv ( t + h ) ≈ v ( t ) + h ---- v ( t ) dt ) F( tv ( t + h ) ≈ v ( t ) + h --------. We will assume that the system is initially at rest and that a force of 1N will be applied to the 1kg mass for 4 seconds.page 127 Given the differential equation. i -1 0 1 2 3 4 5 6 7 8 t (sec) -2 0 2 4 6 8 10 12 14 16 F (N) d/dt vi 0 1 1 2 2 2 2 2 2 2 0 1 1 2 2 2 2 2 etc vi 0 0 2 4 8 12 16 20 etc Figure 92 Numerical integration example . A time step of 2 seconds will be used. dF = M ---- v dt we can create difference equations using simple methods. M first rearrange equation put this in the Euler equation finally substitute in known terms We can now use the equation to estimate the system response. After this time the force will rise to 2N. x' + 3x = 5 Figure 93 Drill problem: Numerically integrate the differential equation An example of solving the previous example with a traditional programming language is shown in Figure 94. . In this example the results will be written to a text file ’out. The integration is done with a separate function.txt’. The force value is varied over the time period with ’if’ statements. The solution iteratively integrates from 0 to 10 seconds with time steps of 0.1s.page 128 Use first-order integration to solve the differential equation from 0 to 10 seconds with time steps of 1 second. int main(){ double h = 0. if( ( fp = fopen("out. t. M). F.0.0.page 129 double step(double. t < 10. %f\n". FILE *fp.0. "w")) != NULL){ v = 0. double h. F/M).0) && (t < 4.0) F = 2. if(t > 4. double slope){ double v_new.0. v_new = v + h * slope. v = step(v. fprintf(fp.0. %f. M = 1. } } fclose(fp). for( t = 0.1. F. t += h ){ if((t >= 0. } double step(double v. h. } Figure 94 Solving state variable equations with a C program . "%f.0. t. return v_new.txt". double.0)) F = 1. double v. double). v. 0. %f. F/M). double h.0.close(). h. v_new = v + h * slope. v. M = 1. public class Integrate extends Object public void main() { double h = 0.IO_EXCEPTION){ double v = 0. double slope){ double v_new. F. double. if(t > 4. t. t += h ){ if((t >= 0.0) F = 2. } fclose(fp). %f\n".0.0) && (t < 4.writeStatus != fp. "%f.printf(fp.0)) F = 1.0. return v_new. for( double t = 0. t < 10.0. } } Figure 95 Solving state variable equations with a Java program . if(fp. } fp. v = step(v. double). } public double step(double v. fp.page 130 double step(double. F.1.0. M).txt"). FileOut fp = new FileOut("out. .2 d. when a highly curved function is encountered we can use a higher order integration equation.4 d.3.3 d.3 Taylor Series First-order integration works well with smooth functions. But.2 1.page 131 4. Recall the Taylor series equation shown in Figure 96 for approximating a function. Notice that the first part of the equation is identical to Euler’s equation.4 x ( t + h ) = x ( t ) + h ---- x ( t ) + ---. we must first determine the derivatives and substitute these into Taylor’s equation. Given the differential equation.h ---- x ( t ) + ---.h ---- x ( t ) + ---. d1.h ---- x ( t ) + … dt 2! dt 3! dt 4! dt Figure 96 The Taylor series An example of the application of the Taylor series is shown in Figure 97. The resulting equation is then used to iteratively calculate values. but the higher order terms add accuracy.3 1. 7 0. That accuracy can be improved by using higher order derivatives to compensate for function curvature. The Runge-Kutta technique uses first-order differential equations (such as state equations) to estimate the higher order derivatives. x' – x = 1 + e – 20t +t 3 d ---- x = 1 + e –20t + t 3 + x dt d. .5 0.( 0.6 0.2 1.1 ) ( – 1 ) + ---.3 ---- x = e –t + 6t dt 1.3 – t –t 3 2 + t + x ) + ---..page 132 Given We can write. thus providing higher accuracy without requiring other than first-order differential equations.9 – 20t x(t) 0 0 e.2 0.1 ) = 0 + 0.1 ) ( 1 ) = 2! 3! Figure 97 Integration using the Taylor series method Recall that the state variable equations are first-order equations.4 0.3.1 ( 2 ) + ---.h ( – e + 3t ) + ---.1 0. for t=0. to obtain accuracy the Taylor method also requires higher order derivatives. 4.1 112 3 x ( 0 + 0. x( t + h ) = x ( t ) + h( 1 + e Thus x0 = 0 h = 0.1 t (s) 0 0.4 Runge-Kutta Integration First-order integration provides reasonable solutions to differential equations.8 0.h ( e + 6t ) 2! 3! In the Taylor series this becomes.2 ---- x = – e –t + 3t 2 dt d. thus making is unsuitable for use with state variable equations. But.3 0.( 0.g. F 1 = hf ( t.( F 1 + 2F 2 + 2F 3 + F4 ) 6 where. x + ----- 2 2 F2 h F 3 = hf t + --. x ) F1 h F 2 = hf t + --. these are combined to get the final value after one time step. . After this. The function ’f()’ is the state equation or state equation vector. x = the state variables f = the differential function or (d/dt) x t = current point in time h = the time step to the next integration point Figure 98 Fourth order Runge-Kutta integration An example of a Runge-Kutta integration calculation is shown in Figure 99. For each time step the values ’F1’ to ’F4’ are calculated in sequence and then used in the final equation to find the next value. Notice that the two central values in time are more heavily weighted. The solution begins by putting the state equations in matrix form and defining initial conditions. x + ----- 2 2 F 4 = hf ( t + h. the four integrating factors are calculated. The number of calculations for a single time step should make obvious the necessity of computers and calculators. and values from previous time steps are used to ’tweak’ the estimates of the later states. The ’F1’ to ’F4’ values are calculated at different time steps. x + F 3 ) 1 x ( t + h ) = x ( t ) + -. Finally. The final summation equation has a remote similarity to Euler’s equation.page 133 The equations in Figure 98 are for fourth order Runge-Kutta integration. 1 + 0 4 2.108 1 + --------2 F 4 = 0.1 0 4 1.v = 3 + 4v + 5y dt d---.202 + 0.7 53 1 2.04 2.1 0 4 1 5 3 1 4 13 1.5432 xi + 1 vi + 1 xi + 1 vi + 1 = xi 1 + -.5432 3.3108 = 3.1 F 1 = 0.202 0 1 F 3 = 0. 0.x = v dt d---.108 2.185 + 2 0. y = 2 (assumed input) v0 = 1 x0 = 3 h = 0.1 0 1 3 + 0 0 2 = 0.1 1 + 0 = 0.0898667 Figure 99 Runge-Kutta integration example .7 0.3108 0 4 1 + 2.202 + 0 0 2 = 0.185 3 + -----------2 0 0 2 = 0.7 2.( F 1 + 2F 2 + 2F 3 + F4 ) vi 6 1 = 3 + -.108 5 3 1 2.page 134 d---.185 0 1 F 2 = 0.x = 0 1 x + 0 0 y dt v 0 4 v 5 3 1 For the first time step.1 0 1 3 + 0.04 5 3 1 2.04 1 + -----2 0.1 + 2 0.1974667 1 6 1.1 3 + -----2 + 0 0 2 = 0. 5 s F = 10 M=1 Figure 100 Drill problem: Integrate the acceleration function .page 135 dF = M ---- x dt 2 use. x(0) = 1 v(0) = 2 h = 0. page 136 Kd Leave the solution in variable form. K d = 10Nsm –1 y M K s = 10Nm M = 1kg –1 Ks y0 = 1 y 0' = 0 Figure 101 Drill problem: Integrate to find the system response . and then change values to see how the system response changes. 5f %9.5f\n". double t.0. for( t = 0. double[].5f %9. } 2 1000 10000 10 100 // the length of the state vector // the spring coefficient // the damping coefficient // the mass coefficient // the applied force . XXXXXXXXXXXXXXXXXXXXXXXX // // A program to do Runge Kutta integration of a mass spring damper system // #include <stdio. double[]. X[1]). int j = 0. #defineSIZE #defineKs #defineKd #defineMass #defineForce int main(){ FILE *fp. double X[SIZE].// set initial condition for v if( ( fp = fopen("out.h> voidmultiply(double. h. double[]). " t(s) x v \n\n"). double[]). t < 50. double[]. } } fclose(fp). double[]). X).txt". double h = 0.// create state variable list X[0] = 0. if(j >= 10) j = 0. voidadd(double[].// set initial condition for x X[1] = 0. "%9. t. X[0]. voidderivative(double.001. t += h ){ step(t. j++.page 137 The program below is used to perform a Runge-Kutta integration of a mass-springdamper system.0. double[]). if(j == 0) fprintf(fp. "w")) != NULL){ fprintf(fp. double. voidstep(double. derivative(t+h/2. tmp). F2[SIZE]. F2). double h. dX). double X[]){ double tmp[SIZE]. tmp. dX.page 138 Figure 102 Runge-Kutta integration program // // First order integration done here (could be replaced with runge kutta) // void step(double t. // Calculate F2 multiply(0. tmp. tmp). dX. // Calculate F3 multiply(0. dX[SIZE].0. F4). F2. F1). X. tmp).5.0/6. tmp). multiply(2.0. tmp). F3[SIZE].0. X. multiply(h. multiply(h. tmp.0. X). // Calculate the weighted sum add(F2. tmp. add(tmp. tmp). F3. // Calculate F4 add(X.5. tmp. // Calculate F1 derivative(t. F3. } . F1[SIZE]. dX. tmp). dX). dX. multiply(h. add(X. tmp). tmp. add(F1. tmp). derivative(t+h. derivative(t+h/2. F4[SIZE]. dX). F1. F3). add(X. tmp. multiply(h. tmp. multiply(1. tmp. dX). add(F4. tmp). page 139 Figure 103 Runge-Kutta integration program (continued) // // State Equations Calculated Here // void derivative(double t.4. i < SIZE. double X[]. (Note: this can also be done . double R[]){ for(int i = 0. In addition to these methods there is a technique that can determine the steady-state response of the system. } // // A subroutine to multiply a vector by a scalar to simplify other equations // void multiply(double X. Consider the example in Figure 105. In both cases details such as time constants and damped frequencies can be obtained by the same methods used for experimental analysis. i++) R[i] = X*V[i].4 SYSTEM RESPONSE In most cases the result of numerical analysis is graphical or tabular. and then solving the equations. double dX[]){ dX[0] = X[1]. } Figure 104 Runge-Kutta integration program (continued) 4. double X2[]. dX[1] = (-Ks/Mass)*X[0] + (-Kd/Mass)*X[1] + (Force/Mass). The solution begins with a state variable matrix. double R[]){ for(int i = 0. } // // A subroutine to add vectors to simplify other equations // void add(double X1[]. i < SIZE. double V[].1 Steady-State Response The state equations can be used to determine the steady-state response of a system by setting the derivatives to zero. 4. i++) R[i] = X1[i] + X2[i]. = ----KS K s ----0 1 M K s Kd – ----.v M M M Solve for x and v 1 F Kd F ---- – ---. Given the state variable form: 0 d---.= ---------.page 140 without the matrix also.– ----M M Figure 105 Finding the steady-state response 4. or integral.– ----. Given data points.5 DIFFERENTIATION AND INTEGRATION OF EXPERIMENTAL DATA When doing experiments.– ----M M 0 0 0 Ks F – ----. data is often collected in the form of individual data points (not as complete functions).) The derivatives on the left hand side are set to zero. y.= ---------. t. collected at given times. The basic equations for integrating and differentiating are shown in Figure 106. we can integrate and differentiate using the given equations.v M M M 0 1 0 x = K s Kd F – ---– ----.v M M Set the derivatives to zero 0 1 0 0 = x + K s Kd F ---0 – ----. The integral is basically the average height of the two points multiplied by the width to give an area. The first derivative is basically the slope between two points.= 0 K s ----0 1 M K s Kd – ----. It is often necessary to integrate or differente these values.– ----. T. so the difference in time can be replaced with a sample period.x = K s dt v – ----M 1 0 x + Kd F ---– ----.– ---M M 0 v = ---------------------------. In a computer based system the time points are often equally spaced in time.– ---- M M M F x = ---------------------------. Ideally the time steps would be as small as possible to . The second derivative is the change in slope values for three points. and the equations are rearranged and solved with Cramer’s rule. we may need to choose an input that is more complex than the inputs such as the step. The easiest way to do this is to use switching functions. y(t) yi + 1 yi yi – 1 ti – 1 ti T ti T ti + 1 yi + yi – 1 T y ( t i ) dt ≈ -------------------.page 141 increase the accuracy of the estimates.y ( t i ) ≈ -------------------- = --------------------i = -.( y i – y i – 1 ) = -.( y i – y i – 1 ) d- 2 T T ---. ramp.6. By changing .y ( t ) ≈ ----------------------------------------------------------------. sinusoidal and parabolic. Switching functions turn on (have a value of 1) when their arguments are greater than or equal to zero.6 ADVANCED TOPICS 4. Examples of the use of switching functions are shown in Figure 107. or off (a value of 0) when the argument is negative.( y i + 1 – y i ) ti – ti – 1 t i + 1 – ti dt T T 1 1 -.= – 2 y i + y i – 1 + y i + 1 -------------------------------------------i 2 dt T T Figure 106 Integration and differentiation using data points 4.1 Switching Functions When analyzing a system.( y i + y i – 1 ) ∫ti – 1 2 2 yi – yi – 1 yi + 1 – y d1 1 ---. ( t i – t i – 1 ) = -.( y i + 1 – y i ) – -. . An example of a curve created with switching functions is shown in Figure 108.page 142 the values of the arguments we can change when a function turns on and off. u(t) 1 t u ( –t ) 1 t u(t – 1) 1 t u(t + 1) 1 t u(t + 1) – u(t – 1 ) 1 t Figure 107 Switching function examples These switching functions can be multiplied with other functions to create a complex function by turning parts of the function on or off. return f.0 * (t .0).page 143 f(t) 5 t seconds 0 1 3 4 f ( t ) = 5t ( u ( t ) – ( t – 1 ) ) + 5 ( u ( t – 1 ) – u ( t – 3 ) ) + ( 20 – 5t ) ( u ( t – 3 ) – u ( t – 4 ) ) or f ( t ) = 5tu ( t ) – 5 ( t – 1 )u ( t – 1 ) – 5 ( t – 3 )u ( t – 3 ) + 5 ( t – 4 )u ( t – 4 ) Figure 108 Switching functions to create a non-smooth function The unit step switching function is available in Mathcad and makes creation of complex functions relatively trivial.1. as shown in Figure 109.5.5.0) * u(t .0.0) . For the function f ( t ) = 5tu ( t ) – 5 ( t – 1 )u ( t – 1 ) – 5 ( t – 3 )u ( t – 3 ) + 5 ( t – 4 )u ( t – 4 ) double u(double t){ if(t >= 0) return 1. f= 5.0) + 5.4.0 * (t . Step functions are also easy to implement when writing computer programs.0) * u(t .3.4.3.1.0 * (t . } Figure 109 A subroutine implementing the example in Figure 108 .0 return 0.0) * u(t . } double function(double t){ double f.0 * t * u(t) . in place of an equation.1 0.4 2.0 + ( 2.4 2. (Note: it is called this because of its’ similarity to the equation for a lever.2 Interpolating Tabular Data In some cases we are given tables of numbers instead of equations for a system component. Once this is found the valve angle is calculated as the ratio between the two known values.2 – 0. . A simple application of the lever law gives approximate values for the flow rates.0 ) ----------------- = 2.4 + ( 1. but we want flow rates at 46 and 23 degrees.) 0 10 20 30 40 50 60 70 80 90 flow rate (gpm) 0 0. Tabular data consists of separate data points as seen in Figure 110.) The table in the example only gives flow rates for a valve at 10 degree intervals. 46 – 40 Q = 2. These can still be used to do numerical integration by calculating coefficient values as required.3 2.18 50 – 40 Given a valve angle of 23 degrees the flow rate is.3 – 2. valve angle (deg. But. we may need values between the datapoints.4 2.0 2.2 2. 23 – 20 Q = 0.64 30 – 20 Figure 110 Using tables of values to interpolate numerical values using the lever law The subroutine in Figure 111 was written to return the numerical value for the data table in Figure 110.4 1. In the subroutine the tabular data is examined to find the interval that the flow rate value falls between.4 Given a valve angle of 46 degrees the flow rate is.4 ) ----------------- = 0. A simple method for finding intermediate values is to interpolate with the "lever law".page 144 4.6. .4}.0. 2.0. 0. using the coefficients as the unknown values. 2.3}. and then put into matrix form.4}.0.4}}. {60. The matrix is then solved to obtain the coeficient values for the final equation. 2. In this case a second order polynomial is used.data[i][0]) + data[i][1]. 0. {10. 2. i++){ if((rate >= data[i][0]) && (rate <= data[i+1][0]){ return (data[i+1][1] . but the simplest is to use a polynomial fitted to a set of points.data[i][0]) / (data[i+1][0] .0.0}. 0.page 145 #define double SIZE 10.4}. {50. {20. {30.1}.0.0}. {40. data[SIZE][2] = {{0. 2.6.0. There are multiple methods for creating splines.0. i < SIZE-1.data[i][1]) * (rate .2}. {80. double angle(double rate){ for(int i = 0.0. These curves are known as splines. } } printf("ERROR: rate out of range\n").3 Modeling Functions with Splines When more accuracy is required smooth curves can be fitted to interpolate points.4}. 1. The example in Figure 112 shows a spline curve being fitted for three data points.0. The three data points are written out as equations. } Figure 111 A tabular interpolation subroutine example 4. {90. This equation can then be used to build a mathematical model of the system.0. exit(1). {70. 2. so we can fit the curve with a second (3-1) order polynomial. P ( 1000 ) = A1000 + B1000 + C = 105 2 P ( 4000 ) = A4000 + B4000 + C = 205 2 P ( 6000 ) = A6000 + B6000 + C = 110 This can then be put in matrix form to find the coefficients. 1000 1000 1 A 105 2 4000 4000 1 B = 205 C 110 2 6000 6000 1 A 1000000 1000 1 = 16000000 4000 1 B C 36000000 6000 1 –8 –1 2 2 2 105 205 110 –7 Note: in this example the inverse matrix is used.600 – 1.617 × 10 B = 0.617 × 10 )S + 0.400 –5 A – 1. substitution might have been a better approach.000 × 10 –4 205 C 110 1.667 × 10 1.667 × 10 –4 1.page 146 The datapoints below might have been measured for the horsepower of an internal combustion engine on a dynamometer.000 –5 2 Figure 112 A spline fitting example . S (RPM) 1000 4000 6000 P (HP) 105 205 110 In this case there are three datapoints.000 × 10 105 B = – 6.114 C 7. –7 A 6. If the equations were simpler.000 P ( S ) = ( – 1.000 0.114S + 7.167 × 10 –3 – 5. P ( S ) = AS + BS + C Data values can be substituted into the equation. but other methods for solving systems of equations are equally valid.667 × 10 – 1. The major task is to calculate the coefficients so that the curve passes through all of the given points. Consider the mass and an applied force shown in Figure 113. In this model the height of the road will change and drive the tire up. as the number of points increases. In the last chapter we looked at dealing with non-linearities by linearizing them locally.7 CASE STUDY Consider the simplified model of a car suspension shown in Figure 114. The upper spring and damper are the vibration isolation units. This results in a non-linear differential equation. A common way for dealing with this problem is to fit the spline to a smaller number of points and then verify that it matches the remaining points. The tire acts as a stiff spring. with little deflection. This equation can be numerically integrated using a technique such as Runge-Kutta.6. or allow it to drop down.4 Non-Linear Elements Despite our deepest wishes for simplicity. most systems contain non-linear components. Note that the state equation matrix form cannot be used because it requires linear equations. The damper has been designed to stiffen as the damper is compressed. x F M 20x' 2 ∑ Fx = F – 20x' = Mx'' (1) (2) 2 x' = v – 20 2 F v' = -------. 4. Although. . Numerical techniques will handle non-linearities easily. the shape of the curve will become less smooth. The model distributes the vehicle weight over four tires with identical suspensions.page 147 The order of the polynomial should match the number of points. The given table shows how the damping coefficient varies with the amount of compression.v + ---M M Figure 113 Developing state equations for a non-linear system 4. so the mass of the vehicle is divided by four. As the mass moves an aerodynamic resistance force is generated that is proportional to the square of the velocity. but smaller time steps are required for accuracy. . and ignore its rotational motion. The differential equations describing the system are developed in Figure 115.page 148 Mc yc K s1 Kd N K s1 = 50000 --m N K s2 = 200000 --m M c = 400Kg M t = 20Kg L (cm) 30 0 -20 -30 Kd (Ns/m) 1000 1600 2000 2250 Mt yt K s2 yr Figure 114 A model of a car suspension system For our purposes we will focus only on the translation of the tire. This is done in Figure 116.page 149 Mc K s1 ( y t – y c ) yc K d ( y t' – y c' ) ∑F = K s1 ( y t – y c ) + K d ( y t' – y c' ) – M c g = M c y c'' M c y c'' = ( K s1 )y t + ( – K s1 )y c + ( K d )y t' + ( – K d )y c' – M c g d---. y c + ------ v t + -------. y r + ------------------------- y t + ------. v t + ----.y c = v c (1) dt d---. . v c + ( – g ) (3) Mc Mc M c Mc K s1 ( y t – y c ) K d ( y t' – y c ' ) Mt ∑F = K s2 ( y r – y t ) – K s1 ( y t – y c ) – K d ( y t' – y c' ) – M t g = M t y t'' M t y t'' = ( K s2 )y r + ( – K s2 – K s1 )y t + ( K s1 )y c + ( – K d )y t' + ( K d )y c' – M t g K s2 – K s2 – K s1 K s1 –Kd Kd v t' = ------. y c + -------. v c + ( – g ) (4) Mt Mt Mt M t Mt K s2 ( y r – y t ) Figure 115 Differential and state equations for the car suspension system The damping force must be converted from a tabular form to equation form. y t + ---------.y t = v t (2) dt K s1 – K s1 Kd –Kd v c' = ------. 2 ) + D 3 2 2250 = A ( – 0. K d ( L ) = AL + BL + CL + D 3 2 L (cm) 30 0 -20 -30 Kd (Ns/m) 1000 1600 2000 2250 The four data points can now be written in equation form.09 0. and then put into matrix form.3 ) + D 3 2 1600 = A ( 0 ) + B ( 0 ) + C ( 0 ) + D 2000 = A ( – 0.027 0.3 ) + C ( 0.3 1 1 1 1 A 1000 B = 1600 C 2000 D 2250 3 2 3 2 The matrix can be solved to find the coefficents.2 ) + C ( – 0. A – 2778 B = 277. .8 )L + ( – 1833 )L + 1600 Figure 116 Fitting a spline to the damping values 3 2 The system is to be tested for overall deflection when exposed to obstacles on the road.027 0.2 ) + B ( – 0. This can be done by setting the accelerations and velocities to zero. and the final equation written.page 150 There are four data points.09 – 0.3 ) + C ( – 0.04 – 0. 1000 = A ( 0.3 ) + B ( – 0.008 0.8 C – 1833 D 1600 K d ( L ) = ( – 2778 )L + ( 277.3 ) + B ( 0. so a third order polynomial is required. For the initial conditions we need to find the resting heights for the tire and car body. and finding the resulting heights.3 0 0 0 – 0.2 – 0.3 ) + D 0. y c + -------.page 151 The initial accelerations and velocities are set to zero. . assuming the car has settled to a steady state height. K s1 – K s1 Kd –K d 0 = ------.– g ------K s2 K s1 Mc + Mt y t = – g ------------------K s2 Mc + M Mc y c = – g -------------------t + ------. 0 + ------------------------- y t + ------. This then yields equations that can be used to calculate the initial deflections. K s2 K s1 Figure 117 Calculation of initial deflections The resulting calculations can then be written in a computer program for analysis. as shown in Figure 118. Assume the road height is also zero to begin with. 0 + ----. 0 + ( – g ) Mt Mt Mt M t Mt gM t = ( – K s2 – K s1 )y t + ( K s1 )y c Mc gM t = ( – K s2 – K s1 )y t + ( K s1 ) y t – g ------. y t + ---------. K s1 Mc + Mt Mc y c = – g ------------------. y c + ------ 0 + -------. 0 + ( – g ) Mc Mc M c Mc Mc y c = y t – g ------K s1 K s2 – K s2 – K s1 K s1 –Kd Kd 0 = ------. 8*L*L . i < SIZE.001// define step size #defineKs1 50000. i++) state[i] += h * derivative[i].h> #include <math. // a zero input to test the initial conditions // return 0. } double y_r(double t){ // return 0.0.h> #defineSIZE4 #definey_c 0 #definey_t 1 #definev_c 2 #definev_t 3 // define state variables #defineN_step10000// number of steps #defineh_step0. double derivative[]){ for(int i = 0.1833*L + 1600). double state[].// a step function // return 0. } double damper(double L){ return (-2778*L*L*L + 277.0 #defineMt 20.0 #defineMc 400.// a sinusoidal oscillation return 0.0 #defineKs2 200000.2 * sin(t).page 152 #include <stdio.// a ramp function } Figure 118 Program for numerical analysis of suspension system .2 * t.2.0 #definegrav9.81 // define component values void integration_step(double h. i < N_step.grav * ( (Mc/Ks1) + (Mt + Mc)/Ks2 ).txt". double derivative[]){ double Kd.grav * (Mt + Mc) / Ks2. t += h_step){ if((i % 100) == 0) fprintf(fp_out. state[y_c] = . "w")) != NULL){ // open the file fprintf(fp_out. // initial values state[y_t] = .0.((Ks2+Ks1)/Mt)*state[y_t] + (Ks1/Mt)*state[y_c] . t. double derivative[SIZE]. i++. " t Yc Yt Vc Vt \n"). derivative[y_c] = state[v_c]. derivative[v_c] = (Ks1/Mc)*state[y_t] .0.grav.(Ks1/Mc)*state[y_c] + (Kd/Mc)*state[v_t] . state. } } else { printf("ERROR: Could not open file \n"). if((fp_out = fopen("out. state[v_t]).grav.page 153 void d_dt(double t.0. i = 0. derivative).(Kd/Mc)*state[v_c] . FILE *fp_out. state. } main(){ double state[SIZE]. } fclose(fp_out). d_dt(t.state[y_t]). "%f %f %f %f %f \n". double t. double state[]. state[v_c] = 0. Kd = damper(state[y_c] . for(t = 0.(Kd/Mt)*state[v_t] + (Kd/Mt)*state[v_c] . derivative). } Figure 119 Program for numerical analysis of suspension system (continued) This program was then used to test various design cases by selecting input types . int i. derivative[v_t] = (Ks2/Mt)*y_r(t) . state[y_c]. integration_step(h_step. state[v_t] = 0. state[y_t]. derivative[y_t] = state[v_t]. state[v_c]. 1 1. and is fully transmitted to the automobile.2m )t 2.3 0 1 -0.25 0.04 0.3 0. The oscillation is relatively slow.3 0.2m sin ( t ) 0.4 Figure 120 Graphs of simulation results .0 0 1 -0.1 -0.05 8 15 22 29 36 43 50 57 64 71 78 85 92 99 -0. and then graphing the results in a spreadsheet program.5 0 1 -0.2 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series 1 Series 2 1 Series Series -0.5 -0.15 y r ( t ) = 0. As shown the height of the vehicle changes.2 -0.12 -0.2m 0.02 8 15 22 29 36 43 50 57 64 71 78 85 92 99 y r ( t ) = 0.15 0.1 -0. The ramp function shows that the car follows the rise of the slope with small transient effects at the start. These results were obtained by running the program. y r ( t ) = 0.06 Series1 Series2 Series Series -0.5 2 0. The step function shows some oscillations that settle out to a stable final value.5 8 15 22 29 36 43 50 57 64 71 78 85 92 99 -0.05 0 1 -0. Some of these results are seen in Figure 120. and the model is stable.page 154 for changes in the road height.08 -0.1 0.2 y r ( t ) = ( 0.1 0. indicating that the initial height calculations are correct. The input of zero for the road height was used to test the program. and then calculating how the tire and vehicle heights would change as a result. page 155 4.9 PRACTICE PROBLEMS 1. a) Put the differential equations given below in state variable form. The masses are also connected with a cable that is run over a massless and frictionless pulley. b) Put the state equations in matrix form y 1'' + 2y 1' + 3y 1 + 4y 2' + 5y 2 + 6y 3' + t + F = 0 y 1' + 7y 1 + 8y 2' + 9y 2 + 10y 3'' + 11y 3 + 5 cos ( 5t ) = 0 y 1' + 12y 2'' + 13y 3' = 0 y 1. Write the differential equations for the system. • Switching functions allow functions terms to be turned on and off to provide more complex function. • Higher order integration. x Kd F M Ks 3.8 SUMMARY • State variable equations are used to reduced to first order differential equations. such as Runge-Kutta increase the accuracy. Develop state equations for the mass-spring-damper system below. The system below is comprised of two masses. 4. y 2. There is viscous damping between the masses and between the bottom mass and the floor. and . y 3 = outputs F = input 2. • First order equations can be integrated numerically. + v 2 -------------------. Assume the initial value of x is 1. x' + 0. x1 M1 B1 M2 B2 x2 F Ks (ans. + -----.page 156 put them in state variable form. T +y +x Ks x 1 M1 B 1 ( x 1' – x 2' ) ∑F = – T – K s x 1 – B 1 ( x 1' – x 2' ) = M 1 x 1'' v 1 = x 1' v 2 = x 2' –Ks –B1 B1 –T v 1' = x 1 -------- + v 1 -------. Given the differential equation below integrate the values numerically (show all work) for the first ten seconds in 1 second intervals. You may use first order or Runge Kutta integration. + v 2 -----.25x = 3 . + ----------------- M 2 M2 M2 4. M1 M1 M 1 M 1 B 1 ( x 1' – x 2' ) T M2 F B 2 x 2' ∑F = – T + B 1 ( x 1' – x 2' ) + F – B2 x 2' = M 2 x 2'' B1 –B 1 – B2 –T+F v 2' = v 1 -----. Given the following differential equation and initial conditions. b) Also solve the problem using your calculator (and state equations) to verify your solution.page 157 (ans.75 2.489 0.275 0. Do a first order numerical integration of the derivative below from 0 to 10 seconds in one second step.0 10.367 0.6V o' + 2.5V o'' + 0.36 8. and compare the results.16 0.870 0.81 7.9 11.25x dx ( t + h ) = x ( t ) + h ---.75 5.652 0.75x ( t ) + 3 t 0 1 2 3 4 5 6 7 8 9 10 x 1 3. x Kd K s = 10 K d = 10 F M = 10 M Ks F = 10 .2 11. The input is a step function that turns on at t=0. Sketch the results. Assume the system starts at rest. Assume the system starts at rest and undeflected. x' = 3 – 0.4 x’ 2. 0.52 9.x ( t ) = 5 ( t – 4 ) 2 dt 6.39 10.55 1.206 5.25x ( t ) ) x ( t + h ) = 0. Use at least two different methods. draw a sketch of the first 5 seconds of the output response.x ( t ) dt x ( t + h ) = x ( t ) + 1 ( 3 – 0. d---. a) For the mass-spring-damper system below solve the differential equation as a function of time.1V o = 3V i + 2 initial conditions V i = 5V Vo = 0 V o' = 1 7.5 10.06 1. 5 cos ( C 2 ) 2 –1 –1 tan ( C 2 ) = -----C 2 = atan -----.page 158 (ans. Follow the steps below to develop a solution to the problem.5C 1 cos ( C 2 ) = 0 2 1 3 – -----. F M K d x' Ks x ∑F = F – K d x' – K s x = Mx'' Mx'' + K d x' + K s x = F 10x'' + 10x' + 10x = 10 x'' + x' + x = 1 homogeneous: x'' + x' + x = 0 A +A+1 = 0 3 – 1 ± 1 – 4( 1 )( 1 ) A = --------------------------------------------.t – 0.5236 + 1 2 8.5t x' = – -----.= – 1.t + C 2 2 2 2 1 3 x' ( 0 ) = – -----.t + C 2 + 1 2 3 3 3 – 0.5236 ) + 1 = 0 –1 C 1 = -------------------------------. The mechanical system below is a mass-spring-damper system.5t – 0.5236 3 3 x ( 0 ) = C 1 cos ( – 0. = – 0. The motion is resisted by the spring and damper.t + C 2 2 2 particular: xp = B 0+0+B = 1 xp = 1 initial conditions: x = xh + xp = C1e – 0.5236 ) x = – 1.5 ± j -----2 2(1) 3 – 0.5t 3 cos -----.sin ( C 2 ) = 0. A force ’F’ of 100N is applied to the 10Kg cart at time t=0s.C sin ( C 2 ) – 0.155 e – 0.C e sin -----.5t xh = C1 e cos -----.155 cos ( –0.= – 0.5t 3 cos -----.t + C 2 – 0. The spring coefficient is 1000N/m. Assume the system always starts undeflected and . and the damping coefficient is to be determined.5C 1 e cos -----. a) Develop the differential equation for the system.page 159 at rest. Find the differential equations for the system. g. . x Kd F M Ks 9. f) Write a computer program (in C. Draw a graph of the results. K1=K2=100N/m. Use working model to find the values for the first 10 seconds. d. Use Mathcad and the Runge-Kutta method to find the first 10 seconds using half second intervals. B=10Nm/s. Draw a graph of the results. Assume that the system starts at rest. d) Solve the system with a first order numerical analysis using Mathcad for damping coefficients of 100Ns/m and 10000Ns/m. Put the equations in state variable form. Java or Fortran) to do the Runge Kutta numerical integration in step e). Verify the results by numerically integrating. e) Solve the system with a Runge Kutta numerical analysis using Mathcad for damping coefficients of 100Ns/m and 10000Ns/m. g) Compare all of the solutions found in the previous steps. M1=M2=1kg. c. For the mechanism illustrated in the figure below: x1 x2 F M1 K s1 M2 K s2 a. b) Solve the differential equation using damping coefficients of 100Ns/m and 10000Ns/m. and the springs are undeformed initially. Use your calculator to find values for x1 and x2 over the first 10 seconds using 1/ 2 second intervals. Use the values. e. Consider the effects of gravity. h) Select a damper value to give an overall system damping coefficient of 1. c) Develop the state equations for the system. f. Draw a graph of the results. b. Use Mathcad to plot the values for the first 10 seconds. Draw a graph of the results. Put the equations in state variable matrices. e. Use Mathcad and the Runge-Kutta calculations in the notes to find the first 10 seconds using half second intervals. Repeat step g. using the first-order approximation method. M1=M2=1kg. Put the equations in state variable form. g. c. . Use working model to find the values for the first 10 seconds. Kd1=10Nm/s. using the first-order approximation method. Find the differential equations for the system. Use the values. f. h. For the mechanism shown in the figure below: x1 K d1 M1 K s1 M2 x2 F K s2 a. Use Mathcad to plot the values for the first 10 seconds.page 160 h. 10. Assume that the system starts at rest. Put the equations in state variable matrices. Ks1=Ks2=100N/m. Repeat step g. d. Use your calculator to find values for x1 and x2 over the first 10 seconds using 1/ 2 second intervals. b. and the springs are undeformed initially. 5.2 α = ---- ω = ---- θ dt dt θ(t) = ω( t ) (1) (2) (3) (4) T(t ) (5) α ( t ) = --------JM where. velocity and acceleration J M = second mass moo bfm hatft oiee enn toi dr y T = torque applied to b o d y ∫ ω ( t ) dt = ∫ ∫ α ( t ) dt dt = ∫ α ( t ) dt Figure 121 Basic properties of rotation . θ.1 INTRODUCTION The equations of motion for a rotating mass are shown in Figure 121. ω. gears and belts • Design cases Objectives: • To be able to develop and analyze differential equations for rotational systems. dampers. Given the angular position. α = position. but inversely proportional to the mass moment of inertia. levers. the angular velocity can be found by differentiating once. equations of motion θ T OR dω = ---- θ dt dd. the angular velocity can be integrated to find the angular position. The angular acceleration can be integrated to find the angular velocity. the angular acceleration can be found by differentiating again. The angular acceleration is proportional to an applied torque. springs.page 161 5. ROTATION Topics: • Basic laws of motion • Inertia. rotate small angles • gears and belts .page 162 Note: A ’torque’ and ’moment’ are equivalent in terms of calculations. The main difference is that ’torque’ normally refers to a rotating moment. The force components normally considered in a rotational system include.2 MODELING Free Body Diagrams (FBDs) are required when analyzing rotational systems. θ = 1rad rad ω = 2 -------s rad α = 3 -------2 s Figure 122 Drill problem: Find the position with the given conditions 5. find the state 5 seconds later.change rotational speeds and torques . • inertia .oppose velocity • levers .opposes acceleration and deceleration • springs . as they were for translating systems.resist deflection • dampers . Given the initial state of a rotating mass. This can be calculated using integration.1 Inertia When unbalanced torques are applied to a mass it will begin to accelerate.2. in rotation. Later we will use the ’area’ moment of inertia for torsional springs. other than the centroid. or found in tables. not the area moment of inertia. The center of rotation for free body rotation will be the centroid. Figure 123 Summing moments and angular inertia The mass moment of inertia determines the resistance to acceleration. The sum of applied torques is equal to the inertia forces shown in Figure 123.page 163 5. Moment of inertia values are typically calculated about the centroid. θ. If the object is constrained to rotate about some point. . the moment of inertia value must be recalculated. α ∑T I xx = = JM α (6) (7) (8) (9) J M = I xx + I yy J T I yy = ∫ y dM 2 ∫ x dM 2 Note: The ’mass’ moment of inertia will be used when dealing with acceleration of a mass. The parallel axis theorem provides the method to shift a moment of inertia from a centroid to an arbitrary center of rotation. ω. as shown in Figure 124. When dealing with rotational acceleration it is important to use the mass moment of inertia. . the area and volume centroids can be used as the center. The integrals for the moments about the x and y axes. J A = area moment about the new point J˜A = area moment about the centroi d A = mass of the object r = distance from the centroid to the new point Figure 125 Parallel axis theorem for shifting a area moment of inertia Aside: If forces do not pass through the center of an object.page 164 2 J M = J˜ + Mr M where. If the object is made of a homogeneous material. An example of calculating a mass moment of inertia is shown in Figure 126. it will rotate. In this problem the density of the material is calculated for use in the integrals. If the gravity varies over the length of the (very long) object then the center of gravity should be used. If the object is made of different materials then the center of mass should be used for the center. J M = mass moment about the new point J˜ = mass moment about the centroi d M M = mass of the object r = distance from the centroid to the new point Figure 124 Parallel axis theorem for shifting a mass moment of inertia 2 J A = J˜A + Ar where. This is then shifted from the centroid to the new axis using the parallel axis theorem. The integrals are then developed using slices for the integration element dM. and then added to give the polar moment of inertia. 33Kgm 3 3 I yy = ∫–5 x 2 dM = ∫–5 x 3 2 ρ2 ( 4m ) dx = 1Kgm ---3 3 –1 x 3 5 –5 – 1 ( 5m ) 2 .– ----------------. Find the mass moment of inertia.33Kgm = 136. The given dimensions are in meters.67Kgm M Figure 126 Mass moment of inertia example .5m ) + ( – 1m ) ) = 136.( – 5m ) ∴ = 1Kgm -------------. 10Kg –2 ρ = ------------------------------.25Kgm -------------. = 53.5 -1 -4 5 ∫–4 y 5 4 2 dM = ∫–4 y 5 4 2 ρ2 ( 5m ) dy = 1.67Kgm + ( 10Kg ) ( ( – 2. The total mass of the object is 10kg. First find the density and calculate the moments of inertia about the centroid.67Kgm 2 2 2 The centroid can now be shifted to the center of rotation using the parallel axis theorem. 2 2 2 2 2 J M = J˜ + Mr = 136.25Kgm ---3 3 3 –1 y 3 4 –4 ( – 4m ) – 1 ( 4m ) 2 ∴ = 1.page 165 The rectangular shape to the right is constrained to rotate about point A.– ----------------- = 83.125Kgm 2 ( 5m )2 ( 4m ) I xx = 4 -5 -2.33Kgm + 83.33Kgm 3 3 J M = I xx + I yy = 53.= 0. The total mass of the object is 10kg.page 166 The rectangular shape to the right is constrained to rotate about point A. The given dimensions are in meters. -5 4 -2.5 -1 -4 5 Figure 127 Drill problem: Mass moment of inertia calculation . Find the mass moment of inertia WITHOUT using the parallel axis theorem. .2 Springs Twisting a rotational spring will produce an opposing torque. A simple example of a solid rod torsional spring is shown in Figure 129. the shear modulus. If a torque of 10 Nm is applied for 5 seconds. the area moment of inertia. The angle of rotation is determined by the applied torque. L. JA. and the length. G. what will the angular velocity be? Figure 128 Drill problem: Find the velocity of the rotating shaft 5. T. This torque increases as the deformation increases. of the rod.2.page 167 The 20cm diameter 10 kg cylinder to the left is sitting in a depression that is effectively frictionless. The constant parameters can be lumped into a single spring coefficient similar to that used for translational springs. The calculation for the area moment of inertia is similar to that for the mass moment of inertia. The calculations are similar to those for the mass moments of inertia.page 168 L θ JAG T = --------. (8) (9) Figure 129 A solid torsional spring The spring constant for a torsional spring will be relatively constant. θ L T = – K S ( ∆θ ) T Note: Remember to use radians for these calculations. In fact you are advised to use radians for all calculations. An example of calculating the area moment of inertia is shown in Figure 130. Note: This calculation uses the area moment of inertia. When dealing with strength of material properties the area moment of inertia is required. Note the difference between the mass moment of inertia and area moment of inertia for the part. and based on the previous example in Figure 126. except for the formulation of the integration elements. The area moment of inertia can be converted to a mass moment of inertia simply by multiplying by the density. . Also note the units. or the geometry of the spring changes significantly. Don’t forget to set your calculator to radians also. unless the material is deformed outside the linear elastic range. 5 -1 -4 I xx = 5 ∫–4m 4m 5m y dA = 2 y2 ∫–4m y 2 ( 5m ) dy = 10m ---3 4m 5m 2 3 3 4m – 4m ( 4m ) .7 )m = 1093.– ----------------- = 666.– ----------------- = 426.7 + 666. 2 J A = J˜A + Ar ∴ = 1093. All dimensions are in m.( – 5m ) 4 = 8m -------------. multiplying by density will yield the mass moment of inertia.7m 3 3 4 4 J˜A = I xx + I yy = ( 426. the area moment of inertia is calculated about the centroid by integration. Figure 130 Area moment of inertia .4m + ( ( 4m – ( – 4m ) ) ( 5m – ( – 5m ) ) ) ( ( –1m ) + ( – 2. the mass moment of inertia is the result.7m 3 3 3 3 3 3 5m I yy x= ∫ x dA = ∫ x 2 ( 4m ) dx = 8m ---– 5m – 5m 3 2 – 5m ( 5m ) .( – 4m ) 4 = 10m -------------.page 169 4 -5 First. shift the area moment of inertia from the centroid to the other point of rotation.4m Next. I xx = I yy = ∫ y dA 2 ∫ x dA 2 (8) (9) (10) (11) J A = I xx + I yy 2 J A = J˜A + Ar Note: You may notice that when the area moment of inertia is multiplied by the density of the material.5m ) ) ∴ = 1673m 4 4 2 2 Note: The basic definitions for the area moment of inertia are shown to the right. -2. Therefore if you have a table of area moments of inertia. Keep track of units when doing this. The right hand spring is anchored solidly in a wall. at mass J1.) These equations are then rearranged into state variable equations. and finally put in matrix form. and will not move.page 170 For a 1/2" 1020 steel rod that is 1 yard long. . find the torsional spring coefficient. Because the torsional spring is considered massless the tow will be the same at the other end of the spring. and for translational springs. A torque is applied to the left hand spring. There are three torsional springs between two rotating masses. (Note: the similarity in the methods used for torsional. and forces are summed. FBDs are drawn for both of the masses. Figure 131 Drill problem: Find the torsional spring coefficient An example problem with torsional springs is shown in Figure 132. 0 ω 2 J M2 J M2 Figure 132 A rotational spring example . Leave the results in state variable form. θ1 K s2 ( θ 1 – θ 2 ) + ∑M = τ – K s2 ( θ 1 – θ 2 ) = J M1 θ 1'' J M1 θ 1'' = – K s2 θ 1 + K s2 θ 2 + τ J M1 τ θ2 θ 1' = ω 1 – K s2 K s2 ω 1' = ---------.0 J M1 0 K s2 ------J M1 0 0 θ1 ω1 0 + τ 0 0 θ 2' = ω 2 – K s3 – K s2 K s2 ω 2' = -------------------------.page 171 τ K s1 J M1 K s2 J M2 K s3 Model the system above assuming that the center shaft is a torsional spring. θ 2 + ------. θ 1 + ------. and that a torque is applied to the leftmost disk.1 = dt θ 2 ω2 0 0 0 1 θ2 K s2 – K s3 – K s2 ------.ω ---. θ 1 JM J M2 2 J M2 K s3 θ 2 0 1 – K s2 ---------.0 -------------------------. θ 2 + ------. θ 1 JM JM 2 2 (3) (4) θ1 d. θ 2 + τ JM JM 1 1 (1) (2) K s2 ( θ 2 – θ 1 ) + ∑M = – K s2 ( θ 2 – θ 1 ) – K s3 θ 2 = J M2 θ 2'' – K s3 – K s2 K s2 θ 2'' = -------------------------. The first equation is used for a system with one rotating and one stationary part.page 172 5. The state equations were developed in matrix form. but ’Kd’ could have also been used.2. such as oils. what is the deceleration? Figure 134 Drill problem: Find the deceleration The example in Figure 132 is extended to include damping in Figure 135. T = –K d ω T = Kd ( ω1 – ω2 ) Figure 133 The rotational damping equation If a wheel (JM=5kg m**2) is turning at 150 rpm and the damping coefficient is 1Nms/ rad. used for lubrication. The second equation is used for damping between two rotating parts. It opposes angular velocity with the relationships shown in Figure 133. In this case the damping coefficients are indicated with ’B’.3 Damping Rotational damping is normally caused by viscous fluids. Visual comparison of the final matrices in this and the previous example reveal that the damping terms are the . The primary addition from the previous example is the addition of the damping forces to the FBDs. ω 2 + -------------------------. θ 1 + ------. θ 2 + τ (2) JM JM JM 1 1 1 θ2 +∑ M = – K s2 ( θ 2 – θ 1 ) – B 2 θ 2' – K s3 θ2 = J M 2 θ 2'' –B2 – K s3 – K s2 K s2 θ 2'' = -------.ω ---. θ 1 JM JM JM 2 2 2 J M2 K s3 θ 2 0 – K s2 ---------J M1 0 K s2 ------J M2 1 –B1 -------JM1 0 B 2 θ 2' 0 K s2 ------J M1 θ 2' = ω 2 (3) – B2 – K s3 – K s2 K s2 (4) ω 2' = -------.1 = dt θ 2 ω2 0 – K s3 – K s2 0 -------------------------J M2 1 θ2 –B2 ω 2 -------J M2 Figure 135 A System Example . θ 2' + -------------------------. and that a torque is applied to the leftmost disk. θ 2 + ------. τ K s1 B1 J M1 K s2 J M2 B2 K s3 Model the system above assuming that the center shaft is a torsional spring.page 173 only addition. Leave the results in state variable form. θ 1 JM JM J M2 2 2 0 0 θ1 ω1 0 + τ 0 0 θ1 d. θ1 K s2 ( θ 1 – θ 2 ) + ∑ M = τ – K s2 ( θ 1 – θ 2 ) – B 1 θ 1' = J M1 θ 1'' J M1 θ 1'' = – B 1 θ 1' – K s2 θ 1 + K s2 θ 2 + τ J M1 τ B 1 θ 1' K s2 ( θ 2 – θ 1 ) (1) θ 1' = ω 1 –B1 – K s2 K s2 ω 1' = -------. θ 2 + ------. ω 1 + ---------. it typically has a limited range of motion.if the lever is 2m long and the distance from the fulcrum to the rock is 10cm.page 174 5. This allows the lever to work over a range of angles. The amplification is determined by the ratio of arm lengths to the left and right of the center.4 Levers The lever shown in Figure 136 can be used to amplify forces or motion.2. how much force is required to lift it? Figure 137 Drill problem: Find the required force . F2 d1 d2 δ2 F1 δ1 F2 δ1 d1 ---. The lever above would become ineffective if it was vertical.= ---d2 F1 δ2 Note: As the lever rotates the length ratio will be maintained because of similar triangles.= ----. Figure 136 Force transmission with a level Given a lever set to lift a 1000 kg rock . Although theoretically a lever arm could rotate fully. • A lever is a simple device used to balance moments in a system. = ---T2 r2 n2 Vc = ω1 r1 = –ω2 r2 r2 –ω 1 –α1 –∆ θ1 n2 ---.The teeth follow a helix around the rotational axis. Some of the basic gear forms are listed below.5 Gears and Belts While levers amplify forces and motions over limited ranges of motion. In this example the gear ratio on the left is 4:1. In a compound gear set two or more gears are connected on a single shaft. The number of teeth on a gear is proportional to the diameter.Round gears with teeth parallel to the rotational axis Rack . Gear teeth are carefully designed so that they will ’mesh’ smoothly as the gears rotate.A straight gear (used with a small round gear called a pinion Helical . Bevel .= ---r1 r2 –T1 r1 n1 -------.= -------.= ---. T 1 = Fc r1 T2 = –Fc r2 n1 n2 ---. as shown in Figure 138. The gear ratio is used to measure the relative rotations of the shafts. Together they give a gear ratio of 16:1. and the ratio for the set on the right is 4:1. The ratio of motions and forces through a pair of gears is proportional to their radii.= --------. gears can rotate indefinitely.2. To do this compound gear sets are required. Spur . as shown in Figure 139. . n = number of teeth on respective gears r = radii of respective gears Fc = force of contact between gear teeth Vc = tangential velocity of gear teeth T = torques on gears Figure 138 Basic Gear Relationships For lower gear rations a simple gear box with two gears can be constructed. For higher gear ratios more gears can be added. allowing forces to be transmitted at angles.= -----------.The gear has a conical shape. The forces on gears acts at a tangential distance from the center of rotation called the ’pitch diameter’.page 175 5.= ---r1 ω2 α2 ∆θ 2 n1 where. For example a gear ratio of 20:1 would mean the input shaft of the gear box would have to rotate 20 times for the output shaft to rotate once. = 16 N3 N5 In this case the output shaft turns 16 times faster than the input shaft. If we reversed directions the output (former input) would now turn 1/16 of the input (former output) shaft speed. . Notice that when in reverse an additional compound gear set is added to reverse the direction of rotation. In the transmission the gear ratio is changed by sliding some of the gears to change the sequence of gears transmitting the force. Input shaft Output shaft N 3 = 15 N 4 = 60 Figure 139 A compound gear set A manual transmission is shown in Figure 140.page 176 N 2 = 60 N 5 = 15 N2 N4 e = -----------. The basic relationships are shown in Figure 141. At this point all of the needed gears will be meshed and turning. . A rack is a long straight gear that is driven by a small mating gear called a pinion.page 177 9 clutch stem gear 2 Motor shaft reverse idler 7 8 3 4 10 11 6 5 Speed (gear) 1 2 3 4 reverse Gear Train 2-3-6-9 2-3-5-8 2-3-4-7 bypass gear train 2-3-6-10-11-9 In this manual transmission the gear shifter will move the gears in and out of contact. The final step is to engage the last gear in the gear train with the clutch (plate) and this couples the gears to the wheels. Figure 140 A manual transmission Rack and pinion gear sets are used for converting rotational to translation. • A belt around two or more pulleys will act like gears. and an output gear that has 40 teeth.page 178 T = Fr where. a center gear that has 100 teeth. If the input shaft is rotating at 5 rad/sec what is the rotation speed of the output shaft? What if the center gear is removed? . A gear train has an input gear with 20 teeth. V c = ωr ∆l = r∆θ r = radius of pinion F = force of contact between gear teeth Vc = tangential velocity of gear teeth and velocity of rack T = torque on pinion Figure 141 Relationships for a rack and pinion gear set Belt based systems can be analyzed with methods similar to gears (with the exception of teeth). • A belt wound around a drum will act like a rack and pinion gear pair. The friction force is left as a variable for the derivation of the state equations. Basically these problems require that the problem be solved as if the friction surface is fixed. Calculating friction values in rotating systems is more difficult than translating systems. The result of this calculation and the previous static or dynamic condition is then used to determine the new friction value.6 Friction Friction between rotating components is a major source of inefficiency in machines. It is the result of contact surface materials and geometries. An example problem with rotational friction is shown in Figure 143. . There is friction between the shaft and the hole in the wall.2. Normally rotational friction will be given as a static and kinetic friction torques. The friction value must be calculated using the appropriate state equation.page 179 Figure 142 Drill problem: Find the gear speed 5. If the friction force exceeds the maximum static friction the mechanism is then solved using the dynamic friction torque. page 180 Model the system and consider the static and kinetic friction forces on the shaft on the right hand side. The program loops to integrate the state equations. and then used to determine the new torque force. the torque force must be calculated. τ JM Ks T s ≤ 10Nm T k = 6Nm θ Ks θ JM τ FF + ∑M = τ – K s θ – T F = J M θ'' (1) (2) (3) J M θ'' = τ – K s θ – T F θ' = ω τ – TF Ks ω' = -------------- + ----. θ J M J M Next. . For the purposes of the example some component values are selected and the system is assumed to be at rest initially. Each loop the friction conditions are checked and then used for a first-order solution to the state equations. J M ω' = τ – K s θ – T test T test = τ – K s θ – J M ω' cases: Not slipping previously T test ≤ 10Nm T test > 10Nm Slipping previously T test < 6Nm T test ≥ 6Nm (4) T F = T test T F = 6Nm T F = T test T F = 6Nm Figure 143 A friction system example The friction example in Figure 143 can be solved using the C program in Figure 144. t.} } acceleration = (tau . theta = 0. Ttest. } } fclose(fp). t += h ){ // loop Ttest = tau . // set the initial acceleration to zero also if( ( fp = fopen("out. w = 0. acceleration.txt".0. w = w + h * acceleration. theta = theta + h * w. fprintf(fp. } h = 0. In a permanent magnet motor there are magnets . t < 10.} } else { // slipping if(Ttest < 6){ TF = Ttest. "%f. Ks = 10. theta. "w")) != NULL){ // open a file to write the results to for( t = 0.0.0.J*acceleration. w).starting at rest here TF = 0. theta. tau = 5. if(slip == 0){ // not slipping if(Ttest >= 10){ TF = 6. J = 10. } else { TF = Ttest. slip = 1. } else { TF = 6.Ks*theta .0.0. %f\n". w. TF. slip = 0.2. %f. // the initial conditions .TF + Ks*theta) / J. // set the initial friction to 0. slip = 0.7 Permanent Magnet Electric Motors DC motors create a torque between the rotor (inside) and stator (outside) that is related to the applied voltage or current.page 181 int main(){ double int FILE *fp. acceleration = 0.1. // time step // the state variables // the acceleration // friction force // the friction test force // the moment of inertia (I picked the value) // the applied torque (I picked the value) // the spring constant (I picked the value) // the system starts with no slip Figure 144 A C program for the friction example in Figure 143 5. When a voltage is applied to the coils the motor will accelerate. but when a load is added this should be added to the value of ’J’. The differential equation for a motor is shown in Figure 145. The moment of inertia ’J’ should include the motor shaft. ω = the angular velocity of the motor K = the motor speed constant J M = the moment of inertia of the motor and attached loads R = the resistance of the motor coils T load = a torque applied to a motor shaft Figure 145 Model of a permanent magnet DC motor The speed response of a permanent magnet DC motor is first-order. as shown in Figure 146. The value of the constant ’K’ is a function of the motor design and will remain fixed. while the rotor consists of wound coils.page 182 mounted on the stator. – ---------- dt JR JR JM where. = V s ----. The steadystate velocity will be a straight line function of the torque applied to the motor. The value of the coil resistance ’R’ can be directly measured from the motor. and will be derived in a later chapter.3 OTHER TOPICS The energy and power relationships for rotational components are given in Figure . In addition the line shifts outwards as the voltage applied to the motor increases.T load ∴ ---- ω + ω ----. T voltage/current increases ω ss Figure 146 Torque speed curve for a permanent magnet DC motor 5. 2 dKK. To begin the analysis the velocity curve in Figure 148 was obtained experimentally by applying a voltage of 15V to the motor with no load attached. The motor drives a 10000kg mass in translation through a rack and pinion gear set. The mass moves on rails with static and dynamic coefficients of friction of . These can be useful when designing a system that will store and release energy. We want to select a shaft diameter that will keep the system critically damped when a voltage step input of 20V is applied to the motor. The pinion has a pitch diameter of 6 inches. A 10 foot long shaft is required between the gear box and the rack and pinion set. . E = E K + EP EK = JM ω E P = Tθ P = Tω 2 (5) (6) (7) (8) Figure 147 Energy and power relations for rotation 5.1 respectively.2 and . In addition the resistance of the motor coils was measured and found to be 40 ohms. A 20:1 gear box is used to reduce the speed and increase the torque of the motor.4 DESIGN CASE A large machine is to be driven by a permanent magnet electric motor.page 183 147. The steady-state speed and time constant are used to determine the constants for the motor. 8 × 10 Kgm θ m' = ω m ω m' = V s 50. --------. K 1--------.8 × 10 –3 -------- rad -4 –6 2 J = -------------------------------------------.5s 2 K Kd ---- ω + ω --------.1min 2πrad ( K ) = 15V min 60s 1rot 15V – 3 Vs K = ---------------------------. = V --------.5s Vs 39.3V –1 s –2 rad ) – ----------------------------------------m m s –6 2 dt 19.= 39.8 × 10 -------–1 rad 120πrads The time constant can be used to find the remaining parameters.8 × 10 Kgm –1 ( 40Ω ) ( 2s ) T load d ---- ω + ω 2s –1 = V ( 50.3V s rad – ω m 2s – 1 –2 –1 2 2 (1) – 50505Kg m T load –1 –2 (2) Figure 148 Motor speed curve and the derived differential equation The remaining equations describing the system are developed in Figure 149.198005 ×10 = 19.= 2s – 1 JM R 0. 2 rot K K 2400 -------. – T load ----------m J R s J R dt m JM M M The steady-state velocity can be used to find the value of K.= --------.-------------- 2400 -------. – ( 0 ) . These calculations are done with the assumption that the inertias of the gears and other compo- .page 184 rpm 2400 R = 40Ω 0.= 0. = 15V --------.-----------. (0) + J M R J M R min rot. = M mass θ pinion''π6in 6in ------ 2 θ pinion'' = ( θ gear – θ pinion )1. ω gear = angular position and velocity of the shaft at the gear b o x θ pinion.141 × 10 )m Kg K s 20 θ pinion' = ω pinion ω pinion' = 57.page 185 nents are insignificant. 2 ∑ Fmass = F mass = M mass x mass'' K s ( θ gear – θ pinion ) --------------------------------------------. The long shaft must now be analyzed. θ gear. x mass = θpinion π6in 6in T shaft = F mass ------.θ m 20 1ω gear = ----.1 × 10 Figure 149 – 12 –6 –2 –1 (3) m Kg K s θ m – 1.θ m – θ pinion 1.768 × 10 in Kg K s 10. 2 6in K s ( θ gear – θ pinion ) = F mass ------.141 × 10 m Kg K s θ pinion –2 –1 –9 –2 –1 (4) Additional equations to model the machine . This will require that angles at both ends be defined.768 × 10 in Kg K s --------------------- 20 1.ω m 20 T shaft = K s ( θ gear – θ pinion ) The rotation of the pinion is related to the displacement of the rack through the circumferential travel.0m 1–9 –2 –1 θ pinion'' = ----. and the shaft be considered as a spring.0254in 2 –6 – 2 –1 θ pinion'' = ----.θ m – θ pinion ( 1. This ratio can also be used to find the force applied to the mass. ω pinion = angular position and velocity of the shaft at the pinion 1θ gear = ----. then we can say that the torque load on the motor is equal to the torque in the shaft. The analysis involves iteratively solving the equations and determining the point at which the system begins to overshoot.θm – θ pinion 20 –1 –2 –1 –2 –1 ω m' = ( V s 50.page 186 If the gear box is assumed to have relatively small inertia.3V s rad ) + θ pinion ( 50505Kg m K s ) + ω m ( – 2 s ) + θ m ( – 2525 Kg m K s ) The state equations can then be put in matrix form for clarity. The Tload term is eliminated from equation (2) ω m' = V s 50. but acknowledging that they are consistent. indicating critical damping.1 × 10 – 12 –1 –1 –2 1 –2 0 0 50505K s 0 –9 0 0 θm ωm + 0 Vs 50. This then allows the equation for the motor shaft to be put into a useful form. as shown in Figure 150.3 0 0 1 θpinion K s 0 – 1.3V s rad – ω m 2s ω m' = V s 50.ω m ---= dt θ pinion ω pinion 0 –2525 K s 0 57. Having this differential equation now allows the numerical analysis to proceed.141 × 10 K s 0 ω pinion Figure 150 Numerical analysis of system response .3V s rad – ω m 2s –1 –2 – 1 –2 – 1 –2 –1 – 50505Kg m K s ( θgear – θ pinion ) 1– 1 –2 – 50505Kg m K s ----. θm d. The units will be eliminated for brevity. 5 SUMMARY • The basic equations of motion were discussed. • A design case was presented. The right most shaft is fixed in a wall. 5. Τ θ1 θ2 JM1 Ks1 B JM2 Ks2 (ans.6 PRACTICE PROBLEMS 1. T J M1 θ1 K s1 ( θ 1 – θ 2 ) J M2 K s1 ( θ 1 – θ 2 ) K s2 θ 2 θ2 Bθ 2' + + ∑ M1 ∑ M2 = T – K s1 ( θ1 – θ 2 ) = J M1 θ 1'' = K s1 ( θ 1 – θ 2 ) – Bθ 2' – K s2 θ2 = J M 2 θ 2'' . • Mass and area moment of inertia are used for inertia and springs. • Rotational dampers and springs. Draw the FBDs and write the differential equations for the mechanism below.page 187 5. 6 unknowns 3. The system below consists of two masses hanging by a cable over mass ‘J’. b) Convert the differential equations to state variable equations . The cable doesn’t slip on ‘J’. There is a spring in the cable near M2. Draw the FBDs and write the differential equations for the mechanism below. a) Derive the differential equations for the following system. θ2 R1 JM1 θ1 R2 JM2 Ks Kd x1 x2 M1 (ans. T1 T2 M1 J M1 gM 1 –x 1 θ 1 = ------R2 + + + T1 x1 θ 2 = ----R1 = T 1 – gM 1 = M 1 x 2'' = – T 1 R 1 + T 2 R 1 = – J M1 θ 2'' = T 2 R 2 – R 2 K d x 1' = – J M2 θ 1'' T2 T1 = Ks ( x2 – x1 ) J M2 K d x 1' ∑ Fy ∑ M1 ∑ M2 6 equations.page 188 2. a) RT θK s1 JM M1 RK s2 ( x 2 – θR ) F T K s2 ( x 2 – θR ) M2 M1 g M2 g if(T < 0) T=0 if(T >= 0) Rθ = – x 1 ∑ FM1 = T – M1 g – F = –M1 x1'' T = – M 1 x 1'' + M 1 g + F = – M 1 Rθ'' + M 1 g + F ∑ MJ = – RT – θK s1 + RK s2 ( x 2 – θR ) = J M θ'' 2 2 – R ( M 1 g + F ) – θ ( K s1 + R K s2 ) + ( RK s2 )x 2 = ( J M – R M 1 )θ'' (1) (2) ∑ FM2 = K s2 ( x 2 – θR ) – M 2 g = – M 2 x 2'' .page 189 θ JM R K s1 K s2 x1 F M2 x2 M1 (ans. F1 R1 JM1 θ1 θ2 R 2 K d1 D ( x 1 – x 3 ) JM2 K d1 D ( x 1 – x 3 ) K s1 ( x 1 – x 3 ) τ θ1 N 1 = θ2 N2 N2 τ ----N1 x3 θ 2 = ----R2 M R 2 K s1 ( x 1 – x 3 ) Mg 6. N 1 J M2. i) R1 x2 F1 J M1. for the system pictured below a) write the differential equations (assume small angular deflections) and b) put the equations in state variable form. for the system pictured below a) write the differential equations (assume small angular deflec- . x3 Ks1 x1 (ans. Write the state equations for the system to relate the applied force ’F’ to the displacement ’x’. K d1 F x JM r θ M K s1 K s2 K s3 K d2 5.page 190 4. N 2 Kd1 M R2 Two gears with fixed centers of rotation and lever arms. 3). ii) Kd1 Ks1 M2 Ks2 J M1.page 191 tions) and b) put the equations in state variable form. θ2 K d1 Dx 1 (ans. It is connected to a round mass that rolls and does not slip. R 1 M1 K s2 ( x 1 – x 2 ) τc x2 θ 1 = ----R1 M2 θ1 F1 7. for the system pictured below a) write the differential equations (assume small angular deflec- . K s1 x 1 x1 µ k N ------x1 N = M 2 g cos ( θ 2 ) M 2 g sin ( θ 2 ) K s2 ( x 1 – x 2 ) J M1. R 1 M1 x2 θ1 F1 x1 A mass slides on a plane with dry kinetic friction (0. A force is applied to a belt over the drum. for the system pictured below a) write the differential equations (assume small angular deflec- . and a spring damper combination on the other side with a suspended mass. x1 9. 8.page 192 tions) and b) put the equations in state variable form. iii) R1 J1 x2 Kd1 F1 θ1 M1 x1 Ks1 R2 R3 R4 A round drum with a slot. iv) R1 R2 J1 x3 F M1 Ks1 x2 Kd1 A lever arm has a force on one side. The slot drives a lever arm with a suspended mass. for the system pictured below a) write the differential equations (assume small angular deflections) and b) put the equations in state variable form. On one side is a mass. v) R1 N1 x2 Kd1 θ1 Ks1 J1 N2 J2 T1 R2 θ2 M1 x1 Two gears have levers attached. for the system pictured below a) write the differential equations (assume small angular deflec- . M3 Ks2 R2.J1 11.J2.M2 x2 x3 F1 θ1 R1. for the system pictured below a) write the differential equations (assume small angular deflections) and b) put the equations in state variable form. vi) Kd3 Ks3 A pulley system has the bottom pulley anchored. the other side a spring damper pair. 10. A torque is applied to one gear. A mass is hung in the middle of the arrangement with springs and dampers on either side.page 193 tions) and b) put the equations in state variable form. θ2 M1 x1 . R2 R1 viii) Two gears have a force on one side. Kd2 Ks2 F1 x3 12. both susN1 pended from moment arms. and a mass Kd1 N2 on the other.page 194 tions) and b) put the equations in state variable form. for the system pictured below a) write the differential equations (assume small angular deflections) and b) put the equations in state variable form. vii) M1 x1 Kd1 R1 Ks1 R2 x2 A mass is suspended over a lever arm. There is a rotaJ1 J2 x2 tional damping on one F1 Ks1 θ1 of the gears. Forces are applied to the lower side of the moment arm through a spring damper pair. How are they related? (ans.page 195 13. For area: J area R 2 R 2 R 3 r = ∫ r dA = ∫ r ( 2πr dr ) = 2π ∫ r dr = 2π ---4 0 0 0 4 R 0 πR = --------2 4 MFor mass: ρ = M = ----------2 A πR R R 2 2 R 3 J mass r= ∫ r dM = ∫ r ( ρ2πr dr ) = 2πρ ∫ r dr = 2πρ --4 0 0 0 4 R 0 πR MR = ρ -------. b) Combine the equations in input-output form with y as he output and F as the input.R J. Find the polar moments of inertia of area and mass for a round cross section with known radius and mass per unit area. For both systems pictured below. c) Write the equations in state variable matrix form. and the wall where it is rigidly held. 14. 15. The rotational spring is connected between a mass ‘J’. d) Use Runge-Kutta to find the system state after 1 second. and also experiences damping ‘B’.R J. . F J.2 θ=45 Ks2 M2 Kd2 M1 Ks1 Kd1 M2 Ks2 Kd2 y F y a) Draw FBDs and write the differential equations for the individual masses. The mass has an applied torque ‘T’. = --------- 2 2 4 2 The mass moment can be found by multiplying the area moment by the area density.R J.R Ks1 Kd1 M1 µk=0. – -------.– θ – ----------------.θ – ----. a) JM Bθ' b) θ' = ω T + Ks θ ∑M = T – K s θ – Bθ' = J M θ'' J M θ'' + Bθ' + K s θ = T BT Ks ω' = ----.– -------. –1 –2 –2 θ'' + ( 1s )θ' + ( 10s )θ = 10s (ans. b) Put the equation in state variable form (using variables) and then plot the position (not velocity) as a function of time for the first 5 seconds with your calculator using the parameters below.ω rad rad 2 1 0 5s .ω 2 2 2 1Kgm 1Kgm 1Kgm Nm s10θ ω' = ------------.page 196 a) Derive the differential equation for the rotational system shown.ω 2 rad rad Kgm s10θ –2 ω' = s 10 – -------. Solve the differential equation to get a function of time. Nm K s = 10 -------rad J M = 1Kgm 2 Nms B = 1 ---------rad T T = 10Nm θ J Ks B c) A differential equation for the rotating mass with a spring and damper is given below.ω JM JM JM Nm Nms 10 -------1 ---------rad rad 10Nm ----------------ω' = ----------------. Assume the system starts at rest.– ----.ω 2 rad rad Kgm Kgm m ---------- 2 s s10θ ω' = --------------------. 10 – -------.– -------. Assume the system starts at rest. 10 – -------. 159 ) + 1 = 0 θ ( t ) = – 1.5s t –1 C 2 = – 0.123 sin ( C 2 ) = 0 sin ( C 2 ) – 0.123s t + C 2 ) – 3.5s t –1 10s A = -----------.page 197 (c homogeneous: θ'' + ( 1s )θ' + ( 10s )θ = 0 guess: θh = e 2 At 2 At –1 –1 –2 2 At θ h' = Ae At At –2 θ h'' = A e At A e + ( 1s )Ae + ( 10s )e A + ( 1s )A + 10s –1 –1 –2 = 0 – 1s ± ( 1s ) – 4 ( 1 ) ( 10s ) A = -----------------------------------------------------------------------------2( 1) –1 –1 2 –2 = 0 –2 – 1s ± 1s – 40s –1 A = -----------------------------------------------------.5s C 1 ( 1 ) cos ( C 2 ) – 3.159 ) cos ( 3.123 C 1 cos ( – 0.5 ------------------.123s 0 + C 2 ) + 1 = 0 cos ( 3.5 ± j3.123s t + C 2 ) –1 θ' ( 0 ) = – 0.013 cos ( – 0.123 )s 2(1) θh = C1 e particular: θ'' + ( 1s )θ' + ( 10s )θ = 10s θ p' = 0 θp = A guess: –1 –2 –1 –2 –2 – 0.5 cos ( C 2 ) – 3.= ( – 0.5s t –1 –1 θ ( 0 ) = C1 e –1 – 0.159 –1 C 1 = ----------------------------.123s C 1 e –1 –1 –1 – 0.123s t – 0.123s t + C 2 ) –1 θ p'' = 0 –2 ( 0 ) + ( 1s ) ( 0 ) + ( 10s ) ( A ) = 10s θp = 1 Initial conditions: θ ( t ) = C1e – 0.159 ) + 1 –1 .013 e – 0.= – 1.5s C 1 e – 0.5s t –1 –2 cos ( 3.= -----------.123s t + C 2 ) + 1 cos ( 3.= 1 –2 10s –2 cos ( 3.5s t –1 –1 sin ( 3.123s C 1 ( 1 ) sin ( C 2 ) = 0 – 0.5s 0 –1 –1 C 1 cos ( C 2 ) + 1 = 0 θ' ( t ) = – 0.= tan ( C 2 ) cos ( C 2 ) 3. . + -------------------------------- JM – R2 M1 J M – R2 M 1 J M – R2 M 1 x 2' = v 2 RK s2 – K s2 v 2' = θ ----------. + g M2 M2 2 c) K s2 ( x 2 – θR ) – M 2 g = – M 2 x 2 D 2 2 x 2 ( K s2 + M 2 D ) + θ ( – RK s2 ) = M 2 g 1 x 2 = ---------------------------.( ( – M 2 g ) + x 2 ( K s2 + M 2 D 2 ) ) ( ( K s1 + R 2 K s2 ) – ( J M – R 2 M 1 )D 2 ) + x 2 ( RK s2 ) = R ( M 1 g + K s2 ( M 2 g – x 2 ( K s2 + M 2 D ) ) ( K s1 + R K s2 – J M D + D R M 1 ) + x 2 ( R K s2 ) = R K s2 ( M 1 g + F ) x 2 ( ( – K s2 – M 2 D ) ( K s1 + R K s2 – J M D + D R M 1 ) + R K s2 ) = R K s2 ( M 1 g + F ) – M 2 g ( K s1 + R K s2 – J M D + D R M 1 ) etc.page 198 b) θ' = ω – K s1 – R K s2 RK s2 – RM 1 g – RF ω' = θ --------------------------------- + x 2 ------------------------. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...( ( – M 2 g ) + x 2 ( K s2 + M 2 D ) ) RK s2 2 (3) (4) 2 2 – R ( M 1 g + F ) – θ ( K s1 + R K s2 ) + ( RK s2 )x 2 = ( J M – R M 1 )θD 2 2 2 – θ ( ( K s1 + R K s2 ) – ( J M – R M 1 )D ) + x 2 ( RK s2 ) = R ( M 1 g + F )(5) for x2 put (4) into (5) 1 --------. + x 2 ---------.( ( M 2 g ) + θ ( RK s2 ) ) 2 K s2 + M 2 D 1 2 θ = ----------. The first-order axiom can be used to help solve a first-order differential equation. input-output equations • Design case . The basic definition of this operator. 6. In this chapter we will look at methods for manipulating differential equations into useful forms. In this book there have been two forms used thus far. . and related operations are shown in Figure 151.vibration isolation Objectives: • To be able to develop input-output equations for mechanical systems. solve it numerically or symbolically.page 199 6. INPUT-OUTPUT EQUATIONS Topics: • The differential operator. Multiplying by ’D’ results in a derivative. For convenience we will add a third.1 INTRODUCTION To solve a set of differential equations we have two choices. In basic terms the operator can be manipulated as if it is a normal variable. dividing by ’D’ results in an integral. d/dt x and x’. 6. For a symbolic solution the system of differential equations must be manipulated into a single differential equation.2 THE DIFFERENTIAL OPERATOR The differential operator ’d/dt’ can be written in a number of forms. ’D’. = e ( ∫ x ( t )e dt + C ) (D + a) n simplification first-order axiom Figure 151 General properties of the differential operator Note: x' + Ax = y ( t ) xD + Ax = y ( t ) e xD + e Ax = e y ( t ) e xD = e y ( t ) e xD = e y ( t ) e x = x = e At At At At At At At At xD + Ax = y ( t ) x( D + A) = y( t) y( t) x = ------------D+A ∫e At y ( t )dt + C At dd---.= D n – m x m D x(D + a) -------------------.x = Dx dt d -----.x = D ∫ x dt Dx + Dy = D ( x + y ) Dx + Dy = Dy + Dx Dx + ( Dy + Dz ) = ( Dx + Dy ) + Dz D x --------.= D n n dt n 1 --.x + ae at x dt dt De x = e Dx + ae x at at at –A t ∫ e y ( t )dt + C At y(t )------------.= e –A t ∫ e y ( t )dt + C D+A Figure 152 Proof of the first-order axiom .page 200 basic definition algebraic manipulation d---.( e at x ) = e at ---.= x (D + a) – at at x( t) ----------------. Notice that the manipulation follows the normal rules of algebra.x + 5x = 5t dt dt D x + Dx + 5x = 5t x ( D + D + 5 ) = 5t 5t x = -------------------------2 D +D+5 5 x = t -------------------------- 2 D +D+5 2 2 Figure 153 An example of simplification with the differential operator An example of the solution of a first-order differential equation is given in Figure 154. The initial conditions are then used to find the unknowns. .page 201 Figure 153 contains an example of the manipulation of a differential equation using the ’D’ operator. The first-order axiom is then used to obtain the solution. After this the equation is rearranged to simplify the expression. This begins with replacing the differential operator and rearranging the equation. dd.2 ---- x + ---. The solution begins by replacing the ’d/dt’ terms with the ’D’ operator. 6 x = e –5 t d---. and these are always shown on the left hand side. such as that in Figure 155.6 5 –5t –5t 5t 5t x = 0.x + 5x = 3t dt Dx + 5x = 3t 3t x = -----------D+5 x = e –5 t x ( 0 ) = 10 d---. These equations will have only a single output variable.( te5t – e 5t ) dt = 5te + e – e 5t 5t 5t 5t guess.6e x = 0. The input variables (there can be more than one) are all on the right hand side of the equation.6e Figure 154 An example of a solution for a first-order system 6. (0)( 1) – ( 1) x ( 0 ) = ( 1 ) 3 ----------------------------- + C = 10 5 C = 10. The basic technique is to arrange the equations into an input-output form. d---.6t – 0. . These equations can be solved to find a single differential equation that can then be integrated.6 ( t – 1 ) + 10. + C 5 Initial conditions.= 5 5t 5t ∫e 5t t dt te – e 3 -------------------.6 + 10. ∫ e 5t 3tdt + C 5t 5t = 5te te – e –5 t x = e 3 -------------------. and act as the non-homogeneous forcing function. + 10.page 202 Given.3 INPUT-OUTPUT EQUATIONS A typical system will be described by more than one differential equation.( te 5t – e 5t ) = 5e 5t t dt te – e -------------------. 5Du 1 + 0.5u 1 + D u 2 – Du 2 ∴0. (1) Dy 1 = – 3y 1 + 2y 2 + u1 + 2Du 2 ∴y 1 ( D + 3 ) = 2y 2 + u 1 + 2Du 2 D+3 ∴y 2 = y 1 -----------.5y 1 = Du 1 + 0.5u1' – 0. Given the differential equations.5u 1 – Du 2 2 (2) Dy 2 = 2y 1 + y 2 + Du 1 ∴y 2 ( D – 1 ) = 2y 1 + Du 1 (1) (2) D+3 ∴ y 1 -----------. y 1' = – 3y 1 + 2y 2 + u 1 + 2u 2' y 2' = 2y 1 + y 2 + u 1' Find the input-output equations. – 0.5u 1 – Du 2 ( D – 1 ) = 2y 1 + Du 1 2 D + 2D – 3 2 ∴y 1 ----------------------------.– 2 – 0.5y 1'' + y 1' – 3.page 203 e. y = outputs u = inputs Figure 155 Developing input-output equations An example of deriving an input-output equation from a system of differential equations is given in Figure 156.5u 2 + u 3' where.5u 1 – D u 2 + Du 2 = Du 1 2 ∴0.5y 1 = u 1' + 0.5u 1 + u 2' – u 2' 2 2 2 Figure 156 An input output equation example ..5D y 1 + Dy 1 – 3.g. 2y 1''' + y 1'' + y 1' + 4y 1 = u 1' + u 1 + 3u 2 + u 3'' + u 3 y 2'' + 6y 2' + y 2 = u 1 + 3u 2'' + u 2' + 0. The solution ends by rearranging the equation to input-output form. This begins by replacing the differential operator and combining the equations to eliminate one of the output variables. – 0.5Du 1 – 0. 3. Figure 157 Drill problem: Find the second equation in the previous example 6.1 Converting Input-Output Eqautions to State Equations .page 204 Find the second equation for the example in Figure 156 for the output y2. F M1 Ks ( x2 – x 1 ) ∑ Fx ∑ Fx = F + Ks ( x2 – x1 ) = M1 D x1 2 2 x1 ( M1 D + K s ) = F + Ks x2 Ks ( x2 – x 1 ) M2 = –Ks ( x2 – x1 ) = M2 D x2 2 2 Ks x1 = x 2 ( M2 D + Ks ) The equations can be combined to eliminate x2. Ks x 1 2 x 1 ( M 1 D + K s ) = F + K s -------------------------- 2 M 2 D + K s x1 ( ( M1 D + K s ) ( M2 D + Ks ) – Ks ) = F ( M2 D + Ks ) x1 ( D M1 M2 + D Ks ( M1 + M2 ) + Ks – Ks ) = F ( M 2 D + Ks ) x1 ( D M1 M2 + D Ks ( M1 + M2 ) ) = F ( M2 D + Ks ) d.page 205 x1 F M1 Ks M2 x2 Equations of motion can be derived for these masses. d.2 ---- x M M + x K ( M + M ) = FM + ( F ( dt ) dt )K 1 s 1 2 2 ∫∫ dt 1 1 2 s 4 2 2 4 2 2 2 2 2 2 2 2 Figure 158 Writing an input-output equation as a differential equation .2 ---- x M M + ---- x K ( M + M ) = ---- FM + FK s 2 dt 1 1 2 dt 1 s 1 dt 2 This equation can’t be analyzed because of the derivatives on the right hand side.4 d.2 d. These can be eliminated by integrating the equation twice. 3.2 Integrating Input-Output Eqautions . d ---- dt x 1 = v 1 d ---- q = q 1 dt 2 d ---- q = F dt 1 d ---- v M M + x K ( M + M ) = FM + q K 1 s 1 2 2 2 s dt 1 1 2 q2 Ks d ---- v = – x K s ( M 1 + M 2 ) + -----. x1 d.2 dt q 1 v1 0 0 0 0 = 0 0 Ks ( M1 + M2 ) Ks – ------------------------------.q ---.-------------M1 M2 M1 M2 01 x 0 1 10 0 q2 + F 00 q1 F-----0 0 v M1 1 Figure 159 Writing a differential equation with differentials in the non-homogeneous part as a state equation 6.page 206 This can then be written in state variable form by creating dummy variables for integrating the function ’F’.+ -------------------------------------------.F1 1 dt M1 M2 M1 M1 M2 These equations can then be written in matrix form. page 207 The solution begins by evaluating the homogeneous equation. M 1 M 2 2 ( M 1 + M 2 ) PM 2 M1 C = ------------------------------. d ---- x M M + x K ( M + M ) = 0 1 s 1 2 dt 1 1 2 A M1 M2 + Ks ( M1 + M2 ) = 0 Ks ( M1 + M2 ) x 1h = C 1 cos ------------------------------. and then integrated.K --1 s 1 2 2 dt 1 1 2 2 s Guess.2 = ---------------------------.t + C2 M1 M2 The particular solution can also be found. but in this case the input force must be specified. 1 – ------------------------- Ks ( M1 + M2 ) ( M 1 + M 2 ) x 1p PM 2 P .K 2 s PK s P AK s ( M 1 + M 2 ) = --------A = ---------------------------2 2 ( M1 + M2 ) BK s ( M 1 + M 2 ) = 0 ( 2A )M 1 M 2 + CK s ( M 1 + M 2 ) = PM 2 P CK s ( M 1 + M 2 ) = PM 2 – 2 ---------------------------. d. For this example a step function of magnitude ’P’ is used.2 ---- x M M + x K ( M + M ) = PM + ( P ( dt ) dt )K 1 s 1 2 2 ∫∫ dt 1 1 2 s 2 2 d ---- x M M + x K ( M + M ) = PM + P t . x 1 p = At + Bt + C 2 2 2 Ks ( M1 + M2 ) -j A = ± ------------------------------M1 M2 x 1p' = 2At + B x 1p'' = 2A 2 t 2 ( 2A )M 1 M 2 + ( At + Bt + C )K s ( M 1 + M 2 ) = PM 2 + P --. t + ---------------------------------- 2 2 ( M 1 + M 2 ) Ks ( M1 + M2 ) 2 B = 0 PM 2 C = ---------------------------------2 Ks ( M1 + M2 ) 2 Figure 160 Integrating an input-output equation . x = – ------------------------------.t + ---------------------------.C sin ( C 2 ) M1 M2 1 PM 2 0 = C 1 cos ( 0 ) + ---------------------------------- K s ( M 1 + M 2 ) 2 The final equation can then be written. t 2 ( M 1 + M 2 ) dt 1 M1 M2 M1 M2 1 Ks ( M1 + M2 ) 0 = – ------------------------------. The differential operator is replaced. t + ---------------------------------- M1 M2 2 ( M 1 + M 2 ) K s ( M 1 + M 2 ) 2 PM 2 0 = C 1 cos ( C 2 ) + ---------------------------------- K s ( M 1 + M 2 ) 2 Ks ( M1 + M2 ) Ks ( M1 + M2 ) dP ---.page 208 The initial conditions can then be used to find the values of the coefficients. The transfer function is given in two different forms because the system is reversible and the output could be either ’F’ or ’x’. –P M2 PM 2 Ks ( M1 + M2 ) P . It will be assumed that the system starts undeflected and at rest.2 x 1 = ---------------------------------- cos ------------------------------. t + ---------------------------------- M1 M2 K s ( M 1 + M 2 ) 2 2 ( M 1 + M 2 ) K s ( M 1 + M 2 ) 2 2 2 2 2 2 C2 = 0 –P M2 C 1 = ---------------------------------2 Ks ( M1 + M2 ) 2 Figure 161 Integrating an input-output equation (cont’d) 6.2 x 1 = C 1 cos ------------------------------. PM 2 Ks ( M1 + M2 ) P .C sin ------------------------------. and the equation is manipulated into transfer function form.t + C 2 + ---------------------------.4 DESIGN CASE The classic mass-spring-damper system is shown in Figure 162.t + C2 + 2 ---------------------------. . In this example the forces are summed to provide an equation. A system experiencing a sinusoidal oscillating force is given in Figure 163. Mass-spring-damper systems are often used when doing vibration analysis and design work. Numerical values are substituted and the homogeneous solution to the equation is found.= ----------------------------------------2 F MD + K d D + K s 2 2 2 F Aside: An important concept that is ubiquitous yet largely unrecognized is the use of functional design. The first stage of such analysis involves finding the actual displacement for a given displacement or force.+ K s x 2 dt dt x F = MD x + K d Dx + K s x F -. an output is the resulting change in a system.+ Ks x = –M -------2 dt dt d x dx F = M ------. and is a function of time. Also keep in mind that if we were given a force applied to the system it would become the input (action force) and the output would be the displacement (resulting motion). . To do this all we need to do is flip the numerators and denominators in the transfer function.= MD 2 x + K d Dx + K s x x OR x 1 -. When shown with differentials it is obvious that the ratio is not simple. Figure 162 A transfer function for a mechanical system Aside: Keep in mind that the mathematical expression ‘F/x’ is a ratio between input (displacement action) and output (reaction force). and there is some change in ‘F’. turning the crank does not produce gasoline). An input is typically something we can change. others are not (consider a internal combustion engine. For the example above ‘F’ over ‘x’ implies that we are changing the input ‘x’.page 209 Kd M Ks d x dx ∑ Fy = – F + Kd ----. We look at parts of systems as self contained modules that use inputs to produce outputs. Some systems (such a mechanisms) are reversible.+ K d ----. We know this could easily be reversed mathematically and practically. m m m A = -----------------------------------------------------------------------------------------2 ( 1Kg ) A = 0.+ 2 --.dx .5 ----. 2 d x Ns dx N .1Kg 2 dt m m dt The homogeneous solution can be found.page 210 Given the component values input force.392t + C2 ) Explicit analysis of a mechanical system The solution continues in Figure 164 where the particular solution is found and put in phase shift form. x = 0 2 dt m m dt Ns Ns 2 N – 0.5 ( – 0.+ 2 --.5 ----. 2 d x N ------.+ 0.+ 0.1Kg ------.5 ± 0. – 4 ( 1Kg ) 2 --. .5 Ns ----.25t –1 –1 cos ( 1.5 ----. ----.± 0.25 ± 1. x = 5 sin ( 6t ) N ----. M = 1Kg N K s = 2 --m Ns K d = 0.392j )s xh = C1 e Figure 163 – 0.25 – 8 )s A = ( – 0.5 ----m F = 5 sin ( 6t ) N The differential equation for the mass-spring damper system can be written. ( – 0.5 ( 6A cos 6t – 6B sin 6t ) + 2 ( A sin 6t + B cos 6t ) = 5 sin ( 6t ) 34 – 36B + 3A + 2B = 0 A = ----.B – 3B = 5 3 34 5 A = ----.5 ----.+ 2 --.+ 0.392rad/s and 6rad/s. ----.1460 B = ---------------------------.page 211 The particular solution can now be found with a guess. x = 5 sin ( 6t ) N 2 m dt m dt x p = A sin 6t + B cos 6t x p' = 6A cos 6t – 6B sin 6t x p'' = – 36 A sin 6t – 36B cos 6t –36 A sin 6t – 36B cos 6t + 0.01288 ) cos 6t ) 2 2 ( – 0. and this is used to find the constants in the homogeneous solution in Figure 165.1466 sin 6t + atan --------------------.1460 ) sin 6t + ( – 0.483 ) 2 2 Figure 164 Explicit analysis of a mechanical system (continued) The system is assumed to be at rest initially. Finally the displacement of the mass is used to find the force exerted through the spring on the ground.2932N.1460 ) + ( – 0.( ( – 0.01288 3 – 34 ( 34 ) ------------------.01288 ) x p = -----------------------------------------------------------------.01288 ) cos 6t ( – 0.1460 ) sin 6t + ( – 0.= – 0.9961 x p = 0.1466 ( – 0.01288 ) = – 0.08788 cos 6t ) – 0.25). and should be negligible within a few seconds of starting the machine. 2 d x Ns dx N .08788 x p = 0. The transient effects have a time constant of 4 seconds (1/0. .01288 ) x p = 0.B 3 – 36A – 3B + 2A = 5 34 – 34 ----.1466 sin ( 6t + 1.1460 ) + ( – 0.1Kg ------. In this case there are two force frequency components at 1. The steady-state force at 6rad/s will have a magnitude of . – 0.– 3 3 x p = ( – 0.9961 sin 6t –0. 25t cos ( 1.392t – 0. The design begins by developing the differential .392t + C 2 ) ) + 6 ( 0.1460 C 1 = ------------------cos ( C 2 ) 0 = –0.1673 cos ( –0.1460 –0.1460 C 1 = -------------------------------.5099 ) + 0.483 ) )N Figure 165 Explicit analysis of a mechanical system (continued) A decision has been made to reduce the vibration transmitted to the ground to 0.0365 + 0.1N.5099 – 0.25t cos ( 1. F = Ks x N – 0.392t + C 2 ) + 0.5099 ) + 0.1460 – 0.25C 1 e 0 – 0.07713 0.5099 ) x = ( – 0.392t + C 2 ) – 1. = – 0. x = xh + xp = C1 e x' = –0.3346 e – 0.0365 + ( 0. Values must be selected for the mass and spring.1466 cos ( 0 + 1.1673 e cos ( 1. The mass and spring above have been added to reduce the vibration that will reach the ground.1673 e – 0.07713 C 2 = atan ----------------------------------------.1466 sin ( 6t + 1.1 The initial conditions can be used to find the unknown constants.25t cos ( 1.sin ( C 2 ) + 0.25t F = 2 --.2032 ) tan ( C 2 ) + 0.1460 0 = – 0.1466 sin ( 0 + 1.cos ( C 2 ) – 1.25 ------------------.1466 sin ( 6t + 1.392 ( C 1 e sin ( 0 + C 2 ) ) + 6 ( 0.392t – 0. 0 = C 1 e cos ( 0 + C 2 ) + 0. as shown in Figure 166.1466 sin ( 6t + 1.25C 1 cos ( C 2 ) – 1.25t – 0.5099 ) + 0.07713 – 0.25C 1 e cos ( 0 + C 2 ) – 1.392 ( C 1 sin ( C 2 ) ) + 0. ( – 0.392t – 0.483 ) )m m F = ( – 0.page 212 The particular and homogeneous solutions can now be combined.25t 0 0 cos ( 1.483 ) 0 = – 0. This can be done by adding a mass-spring isolator.392 ( C 1 e sin ( 1. In the figure the bottom mass-spring-damper combination is the original system.2032 – 0.07713 cos ( C 2 ) cos ( C 2 ) 0 = 0.392 ------------------.483 ) – 0.483 ) C 1 cos ( C 2 ) = – 0.2932 sin ( 6t + 1.= – 0. assuming the spring is massless.483 ) )m The displacement can then be used to find the force transmitted to the ground. In addition a value for the upper mass is selected.page 213 equations for both masses. The given values for the mass-spring-damper system are used. K s2 M2 x2 Kd K s1 M1 F – K s2 x 2 M2 K d ( x 2' – x 1' ) K s1 ( x 2 – x 1 ) x1 ∑F = – K s2 x 2 – K d ( x 2' – x 1' ) – K s1 ( x 2 – x 1 ) = M 2 x 2'' 2 –K s2 x 2 – K d ( x 2 D – x1 D ) – K s1 ( x 2 – x 1 ) = M 2 x 2 D 2 x 2 ( – K s2 – K d D – K s1 – M 2 D ) = x 1 ( – K d D – K s1 ) K s2 + K d D + K s1 + M 2 D x 1 = x 2 ------------------------------------------------------------- K d D + K s1 2 (1) K d ( x 2' – x 1' ) M1 F K s1 ( x 2 – x 1 ) ∑F = K d ( x 2' – x 1' ) + K s1 ( x 2 – x 1 ) – F = M 1 x 1'' 2 K d ( x 2 D – x 1 D ) + K s1 ( x 2 – x 1 ) – F = M 1 x 1 D 2 x 1 ( – K d D – K s1 – M 1 D ) + x 2 ( K d D + K s1 ) = F (2) Figure 166 Vibration isolation system For the design we are only interested in the upper spring. This is arbitrarily chosen to be the same as the lower mass. This choice may need to be changed later if the resulting spring constant is not practical. An input-output equation for that spring is developed in Figure 167. . as it determines the force on the ground. 5D – 2 – D ) + x 2 ( 0. This can then be used to find the needed spring coefficient.5D + 2 ) This can now be converted back to a differential equation and combined with the force.5K s2 ---- x 2 – 2K s2 x 2 = 15 cos ( 6t ) + 10 sin ( 6t ) dt 2 dt dt Figure 167 Developing an input output equation This particular solution of the differential equation will yield the steady-state displacement of the upper mass.5D – 2 ) + x 2 ( 0. spring and damper.2 dd– ---- x + K s2 ---- x 2 – 0.5D + 2 ) = F 0.numerical values for the lower mass.5K s2 ) + ( – 2K s2 ) ) = F ( 0.5 ---- F + 2F dt dt dt dt 2 4 2 1 2 2 2 2 2 d.2 d– ---- x + K s2 ---- x 2 – 0.2 dd d- – ---- x + K s2 ---- x 2 – 0. ( – 0.5 ----M 2 = 1Kg m m K s2 + 0.5D + 2 x 2 ( D + 0. 4 d. .5D + 2 + K s2 ) ( D – 0.5 ---- 5 sin ( 6t ) + 2 ( 5 ) sin ( 6t ) dt 2 dt dt dt d.5D + 2 + D 2 x 2 -----------------------------------------------.4 d. K s2 + K d D + K s1 + M 2 D 2 x 2 ------------------------------------------------------------- ( – K d D – K s1 – M 1 D ) + x 2 ( K d D + K s1 ) = F K d D + K s1 N Ns K s1 = 2 --M 1 = 1Kg K d = 0.5K s2 ---- x 2 – 2K s2 x 2 = 0.5D + 2 ) = F ( 0. We can also limit the problem by selecting a mass value for the upper mass.4 d.5K s2 ---- x 2 – 2K s2 x 2 = 0.5D + 2 ) x 2 ( D ( – 1 ) + D ( K s2 ) + D ( – 0.page 214 The solution begins by combining equations (1) and (2) and inserting the. – 10 ( – 1296 – 38K s2 ) ( – 1296 – 38K s2 ) 45K s2 ----------------------------------------.5K s2 6B – 2K s2 A ) = 10 sin ( 6t ) A ( – 1296 – 38K s2 ) + B ( 3K s2 ) = 10 10 + A ( 1296 + 38K s2 ) B = ----------------------------------------------------3K s2 cos ( 6t ) ( – 1296B – 36BK s2 + ( – 0.+ ( 1296 + 38K s2 ) ( – 1296 – 38K s2 ) 45K s2 + 10 ( 1296 + 38K s2 ) A = -----------------------------------------------------------------------------------------------------2 – 9K s2 + ( 1296 + 38K s2 ) ( – 1296 – 38K s2 ) 425K 2s + 12960 A = --------------------------------------------------------------------------------2 – 1453K 2s – 98496K 2s – 1679616 2 2 4 Figure 168 Finding the particular solution .( – 1296 – 38K s2 ) = 15 3K s2 A ( – 9K s2 ) + ( 10 + A ( 1296 + 38K s2 ) ) ( – 1296 – 38K s2 ) = 45K s2 – 9K s2 45K s2 A ----------------------------------------- + A ( 1296 + 38K s2 ) = ----------------------------------------.4 d.2 d– ---- x + K s2 ---- x 2 – 0. d.– 10 ( – 1296 – 38K s2 ) A = -------------------------------------------------------------------------------------2 – 9K s2 ----------------------------------------.3 ---- x = – 216 A cos 6t + 216B sin 6t dt p d ---- x = 1296A sin 6t + 1296B cos 6t dt p sin ( 6t ) ( – 1296A – 36AK s2 + 0.5 )K s2 6A – 2K s2 B ) = 15 cos ( 6t ) A ( – 3K s2 ) + B ( – 1296 – 38K s2 ) = 15 10 + A ( 1296 + 38K s2 ) A ( – 3K s2 ) + ----------------------------------------------------.2 ---- x = – 36 A sin 6t – 36B cos 6t dt p d.page 215 The particular solution begins with a guess.5K s2 ---- x 2 – 2K s2 x 2 = 15 cos ( 6t ) + 10 sin ( 6t ) dt 2 dt dt x p = A sin 6t + B cos 6t d ---- x = 6A cos 6t – 6B sin 6t dt p d. This is then used to calculate the spring coefficient. .1 = A +B 2 2 540K 2s + 69918768 425K 2s + 12960 2 2 --------------------------------------------------------------------------------- + --------------------------------------------------------------------------------- – 1453K 2 – 98496K 2s – 1679616 – 1453K 2 – 98496K 2s – 1679616 2s 2s A value for the spring coefficient was then found using Mathcad to get a value of 662N/m.page 216 The value for B can then be found. 425K 2s + 12960 10 + --------------------------------------------------------------------------------. ( 1296 + 38K s2 ) – 1453K 2 – 98496K 2s – 1679616 2s B = -----------------------------------------------------------------------------------------------------------------------------------------3K s2 10 ( – 1453K 2s – 98496K 2s – 1679616 ) + ( 425K 2s + 12960 ) ( 1296 + 38K s2 ) B = ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2 3K s2 ( – 1453K 2s – 98496K 2s – 1679616 ) 1620K 2s + 2.1N. amplitude = 0.097563 ×10 K 2s B = -------------------------------------------------------------------------------------------------2 3K s2 ( – 1453K 2s – 98496K 2s – 1679616 ) 540K 2s + 69918768 B = --------------------------------------------------------------------------------2 – 1453K 2s – 98496K 2s – 1679616 2 8 2 Figure 169 Finding the particular solution (cont’d) Finally the magnitude of the particular solution is calculated and set to the desired amplitude of 0. The following differential equations were converted to the matrix form shown. x 1'' + x 1' + 2x 1 – x 2' – x 2 = 0 – x 1' – x 1 + x 2'' + x 2' + x 2 = F 3. There is viscous damping between the block and the ground. Fy'' + 2x = ----10 7y' + 4y + 9x'' + 3x = 0 Fy = ----10 2 ( 7D + 4 ) ( 9D + 3 ) x 0 (D ) 2 (2) . Develop the input-output equation for the mechanical system below. Use Cramer’s rule to find ‘y’. Find the input-output form for the following equations. x F M B (ans. A force is applied to cause the mass the accelerate.page 217 Figure 170 Calculation of the spring coefficient 6.6 PRACTICE PROBLEMS 1.5 SUMMARY • The differential operator can be manipulated algebraically • Equations can be manipulated into input-output forms and solved as normal differential equations 6. x'' ( M ) + x' ( B ) = F 2. 9 ) + F ( 0. θ1 θ2 4 2 2 2 F----10 (2) τ K s1 B1 J1 K s2 J2 B2 5.= -------------------------------------------------------------.2 d.2 d.3 ) 10 y = ------------------------------------------------------. and the outputs are ‘y’ and the angle theta. Find the input-output equations for the systems below.1 d.page 218 (ans. Here the input is the torque on the left hand side.3 ) d. The input is force ‘F’.3 ) dt dt dt dt 4. F2 ----.= --------------------------------------------------2 2 4 2 D ( 9D + 3 ) – 2 ( 7D + 4 ) 9D + 3D – 14D – 8 2 (D ) (2) ( 7D + 4 ) ( 9D + 3 ) y ( 9D + 3D – 14D – 8 ) = F ( 0.9D + 0. Write the input-output equations for the mechanical system below.9D + 0. and gravity for mass . Include the inertia of both masses.4 ---- y ( 9 ) + ---- y ( 3 ) + ---- y ( –14 ) + y ( – 8 ) = ---- F ( 0.( 9D 2 + 3 ) 2 0 ( 9D + 3 ) F ( 0. page 219 ‘M’. K R JM θ K y M F . – RK 2 y --------------------------------- ( KR ) + y ( MD + K ) = – F – Mg 2 2 2R K + J M D 4 2 2 2 2 JM D 2 JM D M 2 2 2 2 JMD y 2R MD + -----------------. θ JM R ( K ( – y – θR ) ) y ∑M = – R ( K ( θR ) ) + R ( K ( – y – θR ) ) = J M θ'' R Kθ + RKy + R Kθ = –J M θ'' 2R K + J M D θ --------------------------------- = y – RK 2 2 2 2 R ( K ( θR ) ) K ( – y – θR ) M ∑F = K ( – y – θR ) – F – Mg = My'' K ( y + θR ) + F + Mg = – M yD 2 2 θ ( KR ) + F + Mg = y ( – MD – K ) F+Mg for the theta output equation.4 ----------d. = F + Mg KR R JM d.+ -----------.+ K2R + J M D – R K = – F 2R + -----------.page 220 (ans. 2R K + J M D 2 θ ( KR ) + θ --------------------------------- ( MD + K ) = – F – Mg – RK 2 2 2 2 2 θ ( – K R ) + θ ( 2R K + J M D ) ( MD + K ) = FKR + MgKR 4 2 J M MD JM D 2 θ – K R + 2RMD + 2RK + -----------------.4 ---- θ J M M + ---- θ 2RM + ----. + θ ( KR ) = FKR + MgKR dt KR dt R for the y output equation. – Mg 2R + -------------- K K K ddd ---- y J M M + ---- y ( 2R2 M + J ) + y ( R 2 K ) = ---- F J M + F ( 2R 2 ) + ( – 2 MgR 2 ) --------------M dt K dt dt K 4 2 2 2 2 θ ( KR ) + y ( MD + K ) = – F – Mg 2 . second edition.D.page 221 6...K. Industrial Noise and Vibration Control. Close. . Prentice Hall Publishers. C. The applied force ‘F’ is the input to the system. D. 1995.7 REFERENCES Irwin. given F(t) = 10N for t >= 0 seconds.. K1 = 500 N/m K2 = 1000 N/m M = 10kg x w F a) What is the steady-state response for an applied force F(t) = 10cos(t + 1) N ? b) Find x(t).. John Wiley and Sons. E. “Modeling and Analysis of Dynamic Systems. and Frederick. 6.R.M. 1979. Inc. J. and Graf. and the output is the displacement ‘x’. thus violating the law of conservation of matter. the lower the resistance of a material. 7. If the sum of currents was not zero then electrons would be appearing and disappearing at that node.1 INTRODUCTION A voltage is a pull or push acting on electrons. typically only requiring algebraic manipulation. The voltage will produce a current when the electrons can flow through a conductor. The node current law holds true because the current flow in and out of a node must total zero. The loop voltage law states that the sum of all rises and drops around a loop must total zero. ELECTRICAL SYSTEMS Topics: • Basic components.page 222 7. capacitors. In AC circuit analysis we consider the steady-state response to a .2 MODELING Kirchoff’s voltage and current laws are shown in Figure 171. resistors. The more freely the electrons can flow. inductors and op-amps • Device impedance • Example circuits Objectives: • To apply analysis techniques to circuits 7. Most electrical components are used to control this flow. power sources. ∑ Inode = 0 ∑ Vloop = 0 Figure 171 node current loop voltage Kirchoff’s laws The simplest form of circuit analysis is for DC circuits. The simplest are passive. • resistors . these block DC currents • inductors .find the initial response to changes. If the output resistance is very large. I + V R V I = -R V = IR Figure 172 Ohm’s law The voltage divider example in Figure 173 illustrates the methods for analysis of circuits using resistors.1 Resistors Resistance is a natural phenomenon found in all materials except superconductors.deliver power to a circuit • capacitors . The output voltage on the right hand side will be some fraction of the input voltage. often requiring integration. A resistor will oppose current flow as described by ohm’s law in Figure 172.find the steady-state response to an AC input.very high gain amplifiers useful in many forms 7. A list of components that will be discussed in this chapter are listed below. The resistance value is assumed to be linear. In this circuit an input voltage is supplied on the left hand side. such as op-amps and transistors. • AC (Alternating Current) .reduce current flow as described with ohm’s law • voltage/current sources .page 223 sinusoidal input. To prove this the cur- .2. these block high frequencies • op-amps . capacitors and inductors. • Transient .find the response for a constant input. Active components are capable of changing their behaviors. There is a wide range of components used in circuits. no current will flow. • DC (Direct Current) . but in actuality it varies with conductor temperature.resist changes in current flow.pass current based on current flow. or similar techniques. Finally the most complex is transient analysis. and the ratio of output to input voltages is determined by the ratio of the resistance between R1 and R2. such as resistors. so I2 is negligible.1∴V o ----.+ ----- = V i ----- R 1 R 2 R 1 R1 + R2 1∴V o ----------------. I1 + I2 + I3 = 0 + R1 Vi I2 R2 I3 + Vo I1 Vi – Vo 0 – Vo ∴ ---------------. = V i ----- R 1 R2 R 1 Vo R2 ∴----. The equations are then manipulated to produce the final relationship.= ----------------Vi R 1 + R2 Figure 173 A voltage divider circuit If two resistors are in parallel or series they can be replaced with a single equivalent resistance. . as shown in Figure 174. Vi – V o – Vo ∴ ---------------- + -------.page 224 rents into the center node are summed and set equal to zero. = 0 R1 R2 11. + I 2 + -------------- = 0 R1 R2 Assume the output resistance is large. The arrow indicates the direction of positive current flow. The circle with a sine wave is an AC voltage supply. with the symbols indicating polarity.2 Voltage and Current Sources A voltage source will supply a voltage to a circuit.+ ----R1 R2 R1 R 2 R eq = ----------------R1 + R2 Figure 174 Equivalent resistances for resistors in parallel and series 7.2. by varying the voltage as required.page 225 R1 series resistors R eq = R 1 + R 2 R2 parallel resistors R1 R2 11. The supplies with ’+’ and ’-’ symbols provide DC voltages.1------. The schematic symbols for voltage and current sources are shown in Figure 175. The last symbol with an arrow inside the circle is a current supply. The symbol with two horizontal lines is a battery.+ ----R eq R1 R2 1 R eq = -----------------1 1 ----. .= ----. A current source will supply a current to a circuit. by varying the current as required. Vo.1. Vo – Vi Vo Vo I = ---------------. The circuit is solved using the node voltage method. will be solved. The currents into the upper right node. R1 + Vi + - R2 R3 Vo - Examining the circuit there are two loops. so the node current methods is the most suitable for calculations.+ ----. This will reduce the chances of careless mistakes.1V o ----.+ ----.page 226 + V - + V - V+ - V I Figure 175 Voltage and current sources A circuit containing a voltage source and resistors is shown in Figure 176.+ ----. Figure 176 A circuit calculation . and in negative.+ ----- = V i ------ R 1 R 2 R 3 R1 R1 + R2 + R3 1V o ------------------------------ = V i ------ R 1 R 2 R3 R1 R2 R3 V o = Vi ------------------------------ R 1 + R 2 + R 3 Aside: when doing node-current methods. but only one node. select currents out of a node as positive.= 0 ∑ R1 R2 R3 11. Find the output voltage Vo. Figure 177 Drill problem: Mesh solution of voltage divider .page 227 Solve the circuit in Figure 176 using the loop voltage method. page 228 Solve the voltage divider problem in Figure 173 using the loop current method. and an output resistor on the right. V = f( ) + - I = f( ) Figure 179 Dependant voltage sources . Remember that the output resistance should be infinite. The voltage and current values of these supplies are determined by their relationship to some other circuit voltage or current. The dependant voltage source will be accompanied by a ’+’ and ’-’ symbol. Hint: Put a voltage supply on the left. Figure 178 Drill problem: Mesh solution of voltage divider Dependant (variable) current and voltage sources are shown in Figure 179. while the current source has an arrow inside. Temporarily this creates a small current flow until the plates reach equilibrium. The equation for a capacitor and schematic symbols are given in Figure 181.V=f(V1) 3ohm I Find the output current. high frequency AC currents will be pass through the device. When a voltage is applied across the capacitor.2. . In practical terms this means that the capacitor will block any DC voltages. and pulled out of the other plate. I.page 229 1A 2ohm + V1 - + . electrons will be forced into one plate.3 Capacitors Capacitors are composed of two isolated metal plates very close together. any voltage change will result in some current flow. But. except for transient effects. So. f(V) = 3V What if the input current is 1sin(2t)A? Figure 180 Drill problem: Find the currents in the circuit above 7. These contain a special fluid that increases the effective capacitance of the device but requires that the positive and negative sides must be observed in the circuit. + V= 5cos(10t)V C=1uF I Figure 182 Drill problem: Find the current through the capacitor .page 230 + + C C V I dI = C ---- V = CDV dt Figure 181 Capacitors The symbol on the left is for an electrolytic capacitor.) The other capacitor symbol is for a regular capacitor. Find the current as a function of time. (Warning: reversing the polarity on an electrolytic capacitor can make them explode. 2. and inductor will pass it. The core can be hollow. voltage). designers normally try to avoid using inductors in circuits. Therefore the inductor resists changes in the current. .page 231 7. The schematic symbol and relationship for an inductor are shown in Figure 183.. Inductors usually cost more than capacitors.e.4 Inductors While a capacitor will block a DC current. In addition. or be made of ferrite to increase the inductance. otherwise the field is maintained without effort (i. When a current flows through the coils. inductors are susceptible to interference when metals or other objects disturb their magnetic fields. If the current through the inductor changes then the magnetic field must change. + L V I dV = L ---- I = LDI dt Figure 183 An inductor An inductor is normally constructed by wrapping wire in loops about a core. a magnetic field is generated. When possible. Inductors are basically coils of wire. • adders. subtractors. and so no current will flow. multipliers.simple analog math operations • amplifiers .increase the amplitude of a signal • impedance isolators . Both of these inputs are assumed to have infinite impedance.page 232 Find the current as a function of time.5 Op-Amps The ideal model of an op-amp is shown in Figure 185. and dividers . In circuits op-amps are used with feedback to perform standard operations such as those listed below. + V= 5cos(10t)V L=1mH I Figure 184 Drill problem: Find the current through the inductor 7.2. Op-amp application circuits are designed so that the inverting and non-inverting inputs are driven to the same voltage level. On the left hand side are the inverting and non-inverting inputs.hide the resistance of a circuit while passing a voltage . The output of the op-amp is shown on the right. This is a function of the circuit design.page 233 II+ V+ V+ Vo Note: for analysis use.= V+ Figure 185 An ideal op-amp A simple op-amp example is given in Figure 186. so it will force both of the inputs to 0V. The gain of the amplifier is determined by the ratio of the input and feedback resistors. or amplifier.) The non-inverting input is connected directly to ground. When the currents are summed at the inverting input. (Note: most opamp circuits are designed to force both inputs to have the same voltage.= I+ = 0 V. As expected the voltages on both of the op-amp inputs are the same. The final equation shows the system is a simple multiplier. so it is always reasonable to assume they are the same. . an equation with both the input and output voltages is obtained. I. – V V. .page 234 R2 R1 + Vi + + Vo - The voltage at the non-inverting input will be 0V. ∑ IV- V.= 0 R1 R2 0 – Vi 0 – Vo ------------.= 0 R1 R2 –R 2 Vi V o = -------------R1 –R2 V o = -------. Vi R1 Figure 186 A simple inverting operational amplifier configuration An op-amp circuit that can subtract signals is shown in Figure 187.– Vo = ---------------i + ---------------. V + = 0V V . by design the voltage at the inverting input will be the same.+ -------------.= V + = 0V The currents at the inverting input can be summed. page 235 R2 Find the input/output ratio. R1 + + Vi R5 + Vref R3 R4 + Vo - Figure 187 Op-amp example For ideal op-amp problems the node voltage method is normally the best choice. The general approach to this solution is to sum the currents into the inverting and non-inverting input nodes. Notice that the current into the op-amp is assumed to be zero. After that algebraic manipulation results in a final expression for the op-amp. . Notice that if all of the resistor values are the same then the circuit becomes a simple subtractor. Both the inverting and non-inverting input voltages are then set to be equal. The equations for the circuit in Figure 187 and derived in Figure 188. typically 100.000 times.= V+ R4 R2 R1 V ref ----------------. R 4 + R 5 R 1 + R 2 R1 + R 2 R1 R2 R4 V o ----------------. A typical op-amp will work for signals from DC up to about .+ ----- = V ref ----- R 4 R 5 R 5 R4 V . = V i ----------------. + V o ----------------. = V i ----- + V o ----- R1 R2 R 1 R 2 R2 R1 V + = V i ----------------. – V ref ----------------. The gain is multiplied by the difference between the inverting and non-inverting terminals to form an output. although others can be used if the non-ideal op-amp model is used.= 0 R1 R2 111.+ ----- = V i ----- + V o ----- R 1 R 2 R 1 R 2 R1 + R2 11V + ----------------. R 1 + R 2 R 1 + R2 (1) V . V.1V + ----. R 1 + R 2 R 1 + R 2 R 4 + R 5 R2 R4 ( R1 + R2 ) V o = Vi ----- – V ref ----------------------------- R 1 R 1 ( R 4 + R 5 ) (2) Figure 188 Op-amp example (continued) An op-amp (operational amplifier) has an extremely high gain.1V .+ ----.= 0 ∑ R5 R4 11.= ------------------.page 236 Note: normally node voltage methods work best with op-amp circuits. ----.– V ref VI V. + V o ----------------. First sum the currents at the inverting and non-inverting op-amp terminals. R 4 + R 5 Now the equations can be combined. ∑ IV+ V+ – V V + – V o = ----------------i + ----------------. = Vi ----------------.= V ref ----------------. 3 IMPEDANCE Circuit components can be represented in impedance form as shown in Figure 190. instead of resistances. Notice that the primary difference is that the differential operator has been replaced. ’Z’. In this form we can use impedances as if they are resistances. except that it includes time variant features also. ’R’. The voltage difference drives a dependent voltage source with a large gain. When represented this way the circuit solutions can focus on impedances. This model includes a large resistance between the inverting and non-inverting inputs. When the op-amp is being used for high frequencies or large gains. the model of the op-amp in Figure 189 should be used.page 237 100KHz. V = ZI Capacitor Inductor Figure 190 Impedances for electrical components .) Vo ro typically. Device Resistor Time domain V ( t ) = RI ( t ) 1 V ( t ) = --. The output resistance will limit the maximum current that the device can produce. r n > 1MΩ A > 10 r o < 100Ω 5 V + Figure 189 A non-ideal op-amp model 7. V– rn + A ( V+ – V.∫ I ( t ) dt C dV ( t ) = L ---.I ( t ) dt Impedance Z = R 1Z = ------DC Z = LD Note: Impedance is like resistance. Notice that the two impedances at the right (resistor and capacitor) are equivalent to two resistors in parallel.1 1 RCD + 1 ------------. DC Treat the circuit as a voltage divider.page 238 When representing component values with impedances the circuit solution is done as if all circuit components are resistors. An example of this is shown in Figure 191. R --------------------- 1 + DCR R Vo = 50V ----------------------------------------. DL t=0sec 50VDC + R 1/DC + Vo - Find the equivalent for the capacitor and resistor in parallel.= --------------------1 .= -----------------.+ -DC + -R R 1 ------. The impedances are written beside the circuit elements. 2 R D RLC + DL + R --------------------- DL + 1 + DCR Figure 191 A impedance example for a circuit . and the overall circuit is a voltage divider.= 50V -----------------------------------------. DL 50VDC + - 1 1 R -----------------------. Before continuing. . Otherwise. 2. The most important concept to remember is that a minute of thinking about the solution approach will save ten minutes of backtracking and fixing mistakes. 5. 1. If the circuit contains fewer loops. 6. 4. For the current loop method define current loops and indicate voltage rises or drops by adding ’+’ or ’-’ signs. Identify the desired value and eliminate unwanted values using algebra techniques. select the current loop method. verify that the select method can be used for the circuit. If the circuit contains fewer nodes. consider the nodes and loops in the circuit.4 EXAMPLE SYSTEMS The list of instructions can be useful when approaching a circuits problem. Write the equations for the loops or nodes. If so. Look at the circuit to determine if it is a standard circuit type such as a voltage divider. or two nodes. The circuit in Figure 192 could be solved with two loops. Use numerical values to find a final answer. 3. use the standard solution to solve the problem.page 239 7. The voltages around each loop are summed to provide equations for each loop. current divider or an op-amp inverting amplifier. select the node voltage method. An arbitrary decision is made to use the current loop method. For the node voltage method define node voltages and current directions. First.+ ------------------. This current can be used to find the current through the output resistor R2. .page 240 R1 C + V - L I1 I2 + Vo - R2 Note: when summing voltages in a loop remember to deal with sources that increase the voltage by flipping the sign. sum the voltages around the loops and then eliminate I1.+ R 2 I 2 = 0 CD I2 L ( DI 2 – DI 1 ) + ------. I 2 R 1 + LD R 1 + LD I2 = L ( DI 2 – DI 1 ) + ------.+ R 2 I 2 = 0 CD 1 ( DL )I 1 = LD + ------. The output voltage can then be found by multiplying the R2 and I2. ∑ VL1 = – V + R 1 I 1 + L ( DI 1 – DI 2 ) = 0 (1) (2) ( R 1 + LD )I 1 = V + ( LD )I 2 LD V I 1 = ------------------.+ ------- I 2 2 LD CLD (4) Figure 192 Example problem The equations in Figure 192 are manipulated further in Figure 193 to develop an input-output equation for the second current loop.+ R2 I 2 CD ∑ VL2 (3) R2 1 I 1 = 1 + -------------. In this case a dummy variable is required to replace the two first derivatives in the first equation.page 241 First.– ------------------. and the output variable must be calculated separately. which now becomes an output variable. R2 LD V 1 I 1 = ------------------.+ ------------------. sum the voltages around the loops and then eliminate I1. as shown in Figure 194.+ ------.= --------------------------------------------------------------------------------------------------- I 2 2 R 1 + LD CLD 2 CLD I 2 = --------------------------------------------------------------------------------------------------------------------------------.+ ------- I 2 2 LD R 1 + LD R 1 + LD CLD R2 V 1 LD - ------------------. V ( R 1 + LD ) ( ( CLD 2 + 1 + CDR 2 ) ( R 1 + LD ) – CL 2 D 3 ) 2 CLD I 2 = --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- V 2 CL ( R1 + R 2 )D 3 + L ( CR 2 + 2CR 1 R 2 + L )D 2 + R 1 ( CR1 R 2 + 2L )D + ( R 1 ) 1 2 2 3 Convert it to a differential equation. In the final matrix form the state equations are in one matrix. . The dummy variable is used in place of I1. I 2 = 1 + -------------. 2 CL ( R 1 + R 2 )I 2''' + L ( CR1 + 2CR1 R 2 + L )I 2'' + R 1 ( CR 1 R 2 + 2L )I 2' + ( R 1 )I 2 = CLV'' 2 Figure 193 Example problem (continued) The equations can also be manipulated into state equations. In the remaining state equations I1 is replaced by q1.= 1 + -------------. I 2 2 LD R + LD R 1 + LD 1 CLD ( CLD + 1 + CDR2 ) ( R 1 + LD ) – CL D V ------------------. – ----q1 q1 -dL L ---= + L dt I 1 I 2 V – R 1 – R1 + --.+ R 2 I 2' = 0 C I2 V – R 1 ( q 1 + I 2 ) + --.2 C (13) I1 = 1 1 q1 I2 Figure 194 Example problem (continued) .= – R 2 I 2' C (12) (11) (10) (3) becomes 1 I 2' = I 2 – R 1 + --- + q 1 ( – R 1 ) + V C These can be put in matrix form.I 1 L L I1 = q1 + I2 V R1 q 1' = -.+ R 2 I 2' = 0 C I2 V – R1 I 1 + --.( q 1 + I 2 ) L L R1 R1 V q 1' = q 1 – ----- + I 2 – ----- + - L L L I2 LI 2'' – LI 1'' + --.– ----. (1) becomes R 1 I 1 + LI 1' = V + LI 2' LI 1' – LI 2' = V – R 1 I 1 V R1 I 1' – I 2' = -.I 1 L L q1 = I1 – I2 V R1 q 1' = -. R1 R1 V – ----.page 242 State equations can also be developed using equations (1) and (3).– ----.– ----. Figure 195 Drill problem: Use the node voltage method .page 243 solve the problem in Figure 192 using the node voltage method. page 244 Find the equation relating the output and input voltages. Rf C Vin Ri + Vout Figure 196 Drill problem: Find the state equation . t=0 V s = 3 cos t + - C R + Vo - As normal we relate the source voltage to the output voltage. Figure 197 Circuit solution using impedances The first-order differential equation in Figure 197 is continued in Figure 198 where the equation is integrated. except for the supply voltage. . DC CRD V o = Vs --------------------- CRD + 1 V o ( CRD + 1 ) = V s ( CRD ) V o' ( CR ) + V o = Vs' ( CR ) 1V o' + Vo ------- = V s' CR where. The solution is left in variable form. Z R + Z C R ------------------ V o = Vs 1 - R + ------. In this case the result is a first-order differential equation. we may combine the equations. ZR V o = Vs -----------------.page 245 The circuit in Figure 197 can be solved as a voltage divider when the capacitor is represented as an impedance. and convert it to a differential equation. The we find the values for the various terms in the frequency domain. ZR = R 1Z C = ------DC Next. the particular solution can be determined.+ 1 = 3 2 2 C R 2 2 3C 2 R 2 – 1 3C R – 3 CR B = --------------------A = --------------------. A The homogeneous and particular solutions can now be combined. The system will be assumed to be at rest initially. 1dV o' + Vo ------- = ---- ( 3 cos t ) = – 3 sin t CR dt V p = A sin t + B cos t V p' = A cos t – B sin t 1( A cos t – B sin t ) + ( A sin t + B cos t ) ------- = – 3 sin t CR 1A + B ------- = 0 CR – 1A = B ------- CR 1– B + A ------- = – 3 CR –1.page 246 First write the homogeneous solution using the known relationship. A V 0 = Vh + V p = C1 e B 2 2 C 1 = – A + B sin 0 + atan -. A t – ------CR Figure 198 Circuit solution using impedances (continued) . A B 0 2 2 0 = C 1 e + A + B sin 0 + atan -.1 – B + B ------- ------- = – 3 CR CR 1 B -----------. ------- = --------------------2 2 2 2 CR 2 2 1+C R 1 + C R 1+C R B 2 2 A + B sin t + atan -. 1V o' + Vo ------- = 0 CR yields Vh = C1 e t – ------CR Next. starting with a guess. Vp = B 2 2 + A + B sin t + atan -. When a voltage is applied the torque will cause the rotor to accelerate. as shown in Figure 199. For any voltage and load on the motor there will tend to be a final angular velocity due to friction and drag in the motor. On the left hand side is the resistance of the motor and the ’back emf’ dependent voltage source. And.page 247 7. T voltage/current increases ω Figure 199 Torque speed curve for a permanent magnet DC motor The basic equivalent circuit model is shown in Figure 200. includes the rotational inertia of the rotor and any attached loads. . for a given voltage the ratio between steady-state torque and speed will be a straight line.5 PERMANENT MAGNET DC MOTORS DC motors apply a torque between the rotor and stator that is related to the applied voltage/current. On the right hand side the inertia components are shown. and the second inertia is an attached disk. The rotational inertia J1 is the motor rotor. = ------------------K R dKK. ω Vm + - J1 J2 Because a motor is basically wires in a magnetic field.page 248 I Voltage Supply + Vs - R T. the torque (force) generated will be proportional to the current. – ---------- dt JR JR J 2 Figure 201 The first-order model of a motor . The current-voltage relationship for the left hand side of the equation can be written and manipulated to relate voltage and angular velocity.T load ∴ ---- ω + ω ----. Vs – V m I = ----------------R Tm V s – Kω ∴----. ∑M Figure 200 d= T m – T load = J ---- ω dt d∴T m = J ---- ω + T load dt The torque and inertia in a basic motor model These basic equations can be manipulated into the first-order differential equation in Figure 201. consider the power in the motor. = Vs ----. And.= ------------------K R dJ ---- ω + T load dt V s – Kω ∴-----------------------------------. the electron flow (current) in the wire will push against the magnetic field. Tm T m = KI ∴I = -----K Next. ∴V m = Kω P = V m I = Tω = KIω Consider the dynamics of the rotating masses by summing moments. R r f Figure 202 Basic model of an induction motor • The torque relationships are given below.page 249 7. .6 INDUCTION MOTORS • The equivalent circuit for an AC motor is given below. Ls Rs Lr Rr V Lm IL RL 1 –f R L = --------. 7 BRUSHLESS SERVO MOTORS .the motors use a permanent magnet on the rotor. d∑ M = Trotor – Tload = J ---.ω dt 7. and coils on the stator. .page 250 First the torques on the motor are summed. of motor K e = motor speed constant ω = motor speed K t = motor torque constant T = motor torque .L I m + E dt E = Ke ω T = Kt Im where.f.page 251 Va windings on stator Vb N S permanent magnet rotor Vc Figure 203 The construction of a brushless servo motor dV t = R m + ---. V t = terminal voltage across mor nns o idg tw i R m = resistance of a motor winding L = phase to phase inductance I m = current in winding E = back e.m. + K e ω dt Kt JR m d Rm LJ d.L -----------------------------.---.V t = --------.---.T load + ---.2 dd( LJ ) ---- ω + ( JR m ) ---.T load + K e ω dt K t dt Kt Kt K t dt d.d.L ---.d.2 ---- ω + Rm ---.T load – R m T load dt dt dt Kt Vt Rm T load d.ω + T load dt where.page 252 Figure 204 Basic relationships for a brushless motor d.ω + T load ddt V t = R m + ---.ω = ---------.ω + K e K t ω = K t V t – L ---.ω + K e K. ---- ω + -----.TV t = R m + ---.– 1 ---.ω + ----.ω dt dT = J ---.2 L.load – -----------------------. J = combined moments of inertia for the rotor and external loads T load = the applied torque in the syste m dJ ---.d-----------t dt L dt LJ LJ J dt LJ Figure 205 An advanced model of a brushless servo motor Vt t(ms) Figure 206 Typical supply voltages .+ K e ω dt K t d∑ M = T – Tload = J ---.T -. Find the combined values for resistors.10 PRACTICE PROBLEMS 1. as resistances will dissipate power in the form of heat. • node and loop methods can be used to analyze circuits.8 OTHER TOPICS The relationships in Figure 207 can be used to calculate the power and energy in a system. V2 P = IV = I R = ----R 2 E = Pt Figure 207 Electrical power and energy 7. Consider the following circuit.9 SUMMARY • Basic circuit components are resistors. • Capacitor and inductor impedances can be used as resistors in calculations. 2. capacitors. L Vi + C R a) Develop a differential equation for the circuit. such as inductors and capacitors. 7. + Vo - . but don’t dissipate it. inductors op-amps. Notice that the power calculations focus on resistance.page 253 7. capacitors and inductors in series and parallel. b) Put the equation in state variable matrix form. store energy. Other devices. = V i' ----- R 1 R 2 L R 1 ωn = 1-----LC L ( R1 + R2 ) ζ = -----------------------------2 CR 1 R 2 . R1 Vi + L C R2 - + Vo 4. Consider the following circuit. and then find the natural frequency and damping coefficient. Find the input-output equation for the circuit below. Develop differential equations and the input-output equation for the electrical system below. R1 Vi + L R2 C + Vo - (ans.1Vo'' ( C ) + Vo' ----.page 254 3. L Vi + R1 + R3 Vo C R2 - 5. a) b) 1 11. Develop a differential equation for the circuit.+ ----- + V o -. + V o = V i R c) Solve the differential equation found in part b) using the numerical values given below. + V o = Vi R b) Convert the equation to an input-output equation. Sum currents at node Vo ( Vo – Vi ) ( Vo ) ∑ IVo = --------------------. L = 10mH C = 1µF R = 1KΩ V i = 10V V V o = 2V V o ′ = 3 -at t=0s s . and the output is Vo.= 0 DL R V o DL 2 V o – V i + V o D LC + ------------.= 0 R L V o'' ( LC ) + V o' -.page 255 6. (ans. the circuit has the voltage Vo and the first derivative shown below. Assume at time t=0. a) Find the differential equation for the circuit below where the input is Vi. L Vi + + C R Vo (ans. L V o'' ( LC ) + V o' -.+ ( Vo )DC + ---------. 050 V o = – 8. + V o = V i R 10 –2 – 2 –6 V o'' ( 10 10 ) + V o' ---------- + V o = 10 10 3 V o'' ( 10 ) + V o' ( 10 ) + V o = 10 V o'' + V o' ( 10 ) + V o ( 10 ) = ( 10 ) 3 8 9 –8 –5 homogeneous. Vo = C1 e – 500t cos ( 9987t + C 2 ) + 10 2 = C1 e cos ( 9987 ( 0 ) + C 2 ) + 10 – 8 = C 1 cos ( C 2 ) (1) – 500t – 500 ( 0 ) for t=0. Vo’=3V cos ( 9987t + C 2 ) – 9987C 1 e – 500t sin ( 9987t + C 2 ) 3 = – 500C 1 cos ( C 2 ) – 9987C 1 sin ( C 2 ) 3 = – 500C 1 cos ( C 2 ) – 9987C 1 sin ( C 2 ) –8 3 = – 4000 – 9987 ------------------.page 256 (ans. – 500t cos ( 9987t + 0.01 e 7. Vp = A guess ( 0 ) + ( 0 ) ( 10 ) + ( A ) ( 10 ) = ( 10 ) 3 8 9 A = 10 V p = 10 for initial conditions. Vo=2V V o' = –500C 1 e for t=0. L V o'' ( LC ) + V o' -.050 ) + 10 a) Write the differential equations for the system pictured below.= – 8.= tan ( C 2 ) 8 ( 9987 ) cos ( C 2 ) –8 C 1 = ------------------.= – 500 ± 9987j 2 – 500t Vh = C1 e cos ( 9987t + C2 ) 2 3 8 3 3 2 8 2 At At 3 At 8 particular. sin ( C 2 ) cos ( C 2 ) sin ( C 2 ) 4003 ------------------. A e + Ae ( 10 ) + e ( 10 ) = 0 – 10 ± ( 10 ) – 4 ( 10 ) A + A ( 10 ) + ( 10 ) = 0 A = ------------------------------------------------------------.= ------------------.01 cos ( C 2 ) C 2 = 0. . Simplify the results. find the ratio between the output and the input. + Vi' ( –C ) = V o ----- R 1 R 2 8. and use them to find the response to . R1 R2 Vi C + Vo ans. R2 Vi R1 + C Vo ans. Vo – R2 ----. a) b) –1 –1 V i ----- + V i' ( – C ) + V o ----- = 0 R 1 R 2 –1 1V i ----.page 257 b) Put the equations in input-output form.= ------------------------------Vi R1 + sR 1 R 2 C 9. Develop the differential equation(s) for the system below. Given the circuit below. Assume that the circuit is off initially. Examine the following circuit and then derive the differential equation. L R1 + Vi + + Vo R2 . R3 + Vi + R4 C Vo R1 R2 R1=R2=R3=R4=1Kohm C=1uF a) b) c) Vi = 5 sin ( 100t ) Vi = 5 sin ( 1000000t ) Vi = 5 10.page 258 the following inputs. a) Find the differential equation for the circuit below.page 259 11.001H 1000Ω + Vi + 10Ω + Vo - . Examine the following circuit and then derive the differential equation. L R2 R1 + Vi + + Vo - 12. 1000Ω 1µF 0. 000001D ) = 0 1000 1000 ( –Vo ) ( –1 ) 1000000 ----------. Create a node between the inductor and resistor Va.+ ------------------------. and the input is Vi=5V. b) Put the equations in state variable form. d---.= 0 0.+ ( V – – V o ) ( 0. –9 –3 2 (ans. + ------------. and see what the magnitude of the output is.001D ) = 1000000V i V o'' ( – 10 ) + V o' ( – 1. and use the node voltage method ∑ IV A ( VA – Vi ) ( VA – V– ) = --------------------.V o = V o' dt d---. 1000000 + D V– = V + = 0V XXXXADD UNITSXXXXX ∑ IV – ( V– – VA ) ( V– – Vo ) = ------------------------. a) Write the differential equations for the system pictured below.001D ) = V i -----------------------------.+ -----------------------. The general method is put in a voltage such as Vi=1sin(___t).V i -----------------------------.+ ( – V o ) ( 0.page 260 (ans. Assume the system starts at rest.001 ( 10 ) ) + V o ( – 1 ) = V i b) Put the differential equation in state variable form and use your calculator to produce a detailed sketch of the output voltage Vo. 1000000 + D V o ( – 1000000 – D – 1000D – 0. Note: This should act as a high pass or low pass .V o' = – 1000000000V i – 1001000Vo' – 1000000000V o dt 13.001D 1000 1000000 ( V A – V i ) + V A D = 0 1000000 V A = V i -----------------------------. c) Use mathcad to find the ratio between input and output voltages for a range of frequencies.000001D ) = 0 1000 1000000 + D 1000 1000000 V o ( – 1 – 0. Divide the magnitude of the output sine wave by the input magnitude. d) Plot a graph of gain against the frequency of the input. L R + Vi + C Vo - . Write the differential equation for the following circuit.page 261 filter. R2 R1 Vi C C=1uF R1=1K R2=1K + Vo 14. 8. The right hand side is comprised of constants and the ’D’ operator. block diagrams and simplification • Feedback controllers • Control system design Objectives: • To be able to represent a control system with block diagrams. A manual transmission has an input shaft from the motor and from the shifter. • To be able to select controller parameters to meet design objectives. For example this could be an amplifier that accepts a signal from a sensor and amplifies it. while ’F’ is the input.2 TRANSFER FUNCTIONS Transfer functions are used for equations with one input and one output variable. The general form calls for output over input on the left hand side. An example of a transfer function is shown below in Figure 208. When analyzing systems we will often use transfer functions that describe a system as a ratio of output to input. The general form output ---------------. Or.page 262 8. consider a mechanical gear box with an input and output shaft. In the example ’x’ is the output. A function can be described as a transformation of inputs to outputs.= -------------------------------2 F D + 4D + 16 Figure 208 A transfer function example . 8. FEEDBACK CONTROL SYSTEMS Topics: • Transfer functions.= f ( D ) input An example x 4+D -.1 INTRODUCTION Every engineered component has some function. approximate frequency of control system oscillations. f2 x'' + 2ζωn x' + ω n x = ---M f2 2 xD + 2ζω n xD + ω n x = ---M f2 2 x ( D + 2ζω n D + ω n ) = ---M 1 ---- M x . The nonhomogeneous solution ends up as the numerator of the expression. In reality many systems are not reversible. If < 1 underdamped. Damping factor of system. As damping factor approaches 0. . and never any oscillation (more like a first-order system). and system will oscillate. This is shown for the second-order differential equation in Figure 209. The homogeneous equation (the left hand side) ends up as the denominator of the transfer function. As before the homogeneous and non-homogeneous parts of the equation becomes the denominator and the numerator of the transfer function. Figure 209 The relationship between transfer functions and differential equations for a mass-spring-damper example The transfer function for a first-order differential equation is shown in Figure 210.page 263 If both sides of the example were inverted then the output would become ’F’. This ability to invert a transfer function is called reversibility. If =1 critically damped. If < 1 overdamped. and the input ’x’.= ------------------------------------------2 2 f D + 2ζω n D + ω n particular homogeneous ωn ξ Natural frequency of system. the first peak becomes infinite in height. There is a direct relationship between transfer functions and differential equations. = ------------f 1 D + -τ Figure 210 A first-order system response 8.x = f τ 1 xD + -. The input. In this control system the output velocity is subtracted from the setpoint to get a system error. in this figure it is shown inside the dashed line. or result. . The system output. The subtraction occurs in the summation block (the circle on the left hand side). or control variable is the gas pedal angle. When a cruise control system is engaged the gas pedal must automatically be adjusted to maintain a desired velocity setpoint. In standard operation the gas pedal angle is controlled by the driver.3 CONTROL SYSTEMS Figure 211 shows a transfer function block for a car.x = f τ 1 x D + -- = f τ x 1 . is the velocity of the car.page 264 1 x' + -. This error is used by the controller function to adjust the control variable in the system. Negative feedback is the term used for this type of controller. To do this a control system is added. In a negative feedback control the setpoint and output values are subtracted. Negative feedback also makes systems more immune to random variations in component values and inputs. The rules in the figure give a general idea of how a control function might work for a cruise control system.g. velocity) vdesired + _ verror control function θgas car vactual Note: The arrows in the diagram indicate directions so that outputs and inputs are unambiguous. θgas) SYSTEM (e. Figure 211 An automotive cruise control system There are two main types of feedback control systems: negative feedback and positive feedback. . As a rule negative feedback systems are more stable than positive feedback systems. Each block in the diagram represents a transfer function. For example if the desired velocity is 50mph and the actual velocity 60mph. The control function in Figure 211 can be defined many ways.g.page 265 Control variable INPUT (e. a car) OUTPUT (e. Recall that the system error is the difference between the setpoint and actual output.g. When the system output matches the setpoint the error is zero. and the car should be slowed down. In a positive feedback control system the setpoint and output values are added. Larger differences between the setpoint and output will result in larger errors. A possible set of rules for controlling the system is given in Figure 212. the error is -10mph. When there is a sudden change occurs in the error value the differential branch will give a quick response. 5. The results of all three branches are added together in the second summation block. If verror is not zero. In this case the potentiometer on the left is used as a voltage divider. and there are three separate gain constants for the three terms. keep θgas the same 4. If verror is near zero. This result is then amplified to drive the motor. . providing a setpoint voltage. de u = K p e + K i ∫ edt + K d ----- dt Figure 213 A PID controller equation Figure 214 shows a basic PID controller in block diagram form. The resulting error is used in the PID function. etc. The voltages from the setpoint and output are subtracted at the summation block to calculate the feedback error. 8. also used as a voltage divider. The overall performance of the system can be changed by adjusting the gains in the three branches of the PID function.page 266 Human rules to control car (also like expert system/fuzzy logic): 1.1 PID Control Systems The Proportional Integral Derivative (PID) control function shown in Figure 213 is the most popular choice in industry. If verror suddenly becomes bigger/smaller. In the proportional branch the error is multiplied by a constant. increase/decrease θgas 2. Figure 212 Example control rules In following sections we will examine mathematical control functions that are easy to implement in actual control systems. In the equation given the ’e’ is the system error. then increase/decrease θgas. If an error is largely positive or negative for a while the integral branch value will become large and push the system towards zero. The result is a control variable value. and has been positive/negative for a while. At the output the motor shaft drives a potentiometer.3. to provide a longterm output for the motor (a ballpark guess). If verror is very big/small increase/decrease θgas 3. this controller is generally good for eliminating long term errors.page 267 proportional V + e Kp ( e ) integral Ki ( ∫ e ) derivative dK d ---. For a PI Controller θ gas = K p v error + K i ∫ v error dt For a P Controller θ gas = K p v error For a PD Controller dv error θ gas = K p v error + K d --------------.e dt + + + u PID function V +V amp -V motor Figure 214 A PID control system There are other variations on the basic PID controller shown in Figure 215. but is very responsive to system changes. I a P controller only the proportional gain in non-zero. but it is prone to overshoot. but often cannot eliminate errors. The PD controller does not deal with longterm errors. This controller will generally work. dt Figure 215 Some other control equations . Recall the second order response . A PI controller results when the derivative gain is set to zero. 8.page 268 Aside: The manual process for tuning a PID controlled is to set all gains to zero. r 1 + G ( D )H ( D ) Figure 216 A negative feedback block reduction Block diagram equivalencies for other block diagram forms are shown in Figure 217 to Figure 223. The proportional gain is then adjusted until the system is responding to input changes without excessive overshoot. Typically a block diagram will be developed for a system. equivalent blocks for a negative feedback loop are shown in Figure 216. After that the integral gain is increased until the longterm errors disappear. . In all cases these operations are reversible. along with an algebraic proof. The diagram will then be simplified through a process that is both graphical and algebraic. The differential gain will be increased last to make the system respond faster. Proofs are provided. except for the cases where the equivalence is obvious. r + - G( D) c is equal to r G( D) -----------------------------------1 + G ( D )H ( D ) c H( D) c = G ( D )e c = G ( D ) ( r – H ( D )c ) c ( 1 + G ( D )H ( D ) ) = G ( D )r G(D) c = -----------------------------------.3. meaning that it may be manipulated into new forms.2 Manipulating Block Diagrams A block diagram for a system is not unique. For example. page 269 r + + G( D) c is equal to r G( D) -----------------------------------1 – G ( D )H ( D ) c H( D) c = G ( D )e c = G ( D ) ( r + H ( D )c ) c ( 1 – G ( D )H ( D ) ) = G ( D )r G(D ) c = ------------------------------------ r 1 – G ( D )H ( D ) Figure 217 A positive feedback block reduction r G( D) c is equal to c = G ( D )r 1 r = c ------------- G ( D ) c 1 ------------G( D) r Figure 218 Reversal of function blocks r G( D) c is equal to r G( D) G( D) c c c Figure 219 Moving branches before blocks . page 270 r G( D) x H( D) b is equal to r G ( D )H ( D ) b x = G ( D )r b = H ( D )x b = H ( D )G ( D ) )r Figure 220 Combining sequential function blocks r G( D) c r G( D) 1 ------------G( D) r c is equal to r Figure 221 Moving branches after blocks r G( D) ± ± e r is equal to ± ± c G( D) e b e = ± G ( D )r ± b b e = G ( D ) ± r ± ---------------. ± G ( D ) 1 ------------G( D) b Figure 222 Moving summation functions before blocks . This block diagram is first simplified by multiplying the blocks in sequence. . so by default the function is ’1’ .everything that goes in. Notice that the feedback line doesn’t have a function block on it. This example is extended in Figure 224 to include mathematical models for each of the function blocks. The feedback loop is then reduces to a single block. comes out.page 271 r G( D) c is equal to r G( D) c d c = G ( D ) ( ±R ± d ) c = ±R ( G ( D ) ) ± d ( G ( D ) ) G( D) d Figure 223 Moving summation function past blocks Recall the example of a cruise control system for an automobile presented in Figure 211. .+ K d D -------.+ K D -------.+ K D -------.g. ----i d MD p D -------------------------------------------------------------------------Ki 10 1 + K p + ---. ----i d MD p D H(D) = 1 vactual vdesired 10 K + K. ( 1 ) MD D vactual Figure 224 An example of simplifying a block diagram The function block is further simplified in Figure 225 to a final transfer function for the whole system. The block diagram of the car speed control system vdesired + verror θgas F 1-------MD vactual K K p + ----i + K d D D 10 vdesired + - verror K K p + ----i + K d D D θgas 10-------MD vactual = G(D) vdesired + verror 10 K + K.page 272 e. Some elements such as power supplies and commons for voltages are omitted for clarity.3 A Motor Control System Example Consider the example of a DC servo motor controlled by a computer.page 273 vdesired K + K.+ K d D 10 D vactual vdesired 2 D ( Kd ) + D ( K p ) + ( Ki ) ---------------------------------------------------------------------- M D 2 ----.+ K p + ---.+ K D ----i d p D ------------------------------------------------------- Ki Ms -----. The purpose of the controller is to position the motor.+ K + D ( K ) + ( K ) p i 10 d Figure 225 An example of simplifying a block diagram (continued) 8.= ---------------------------------------------------------------------- v desired M D 2 ----. . The system in Figure 226 shows a reasonable control system arrangement.3.+ K + D ( K ) + ( K ) p i 10 d vactual 2 v actual D ( K d ) + D ( Kp ) + ( Ki ) ---------------. page 274 2. desired position voltage + Vd - gain Kp op-amp motor shaft potentiometer Figure 227 A block diagram for the feedback controller .2K Computer Running Labview PCI-1200 data acquisition card from National Instruments gain Kp 1K + LM675 op-amp shafts are coupled 12Vdc motor X + +5V 5K potentiometer desired position voltage Vd -5V Figure 226 A motor feedback control system The feedback controller can be represented with the block diagram in Figure 227. 2K Vo ----.+ ----------. The op-amp is basically an inverting amplifier with a fixed gain of -2. potentiometer and motor shaft The basic equation for the motor is derived in Figure 229 using experimental data.= 0 1K 2.= 0 1K 2.2 Vi For the potentiometer assume that the potentiometer has a range of 10 turns and 0 degrees is in the center of motion. Given or selected values: .2 times. θ V o = 5V -------------- 5 ( 2π ) Vo ----. so there is no need to calculate ’J’. it integrates the angular velocity into position: dω = ---.page 275 The transfer functions for each of the blocks are developed in Figure 228.159Vrad –1 θ For the shaft.= 0. Two of the values must be provided by the system user.gain K For the op-amp: ∑ IV+ V+ – V V + – V o = ----------------i + ----------------.= – 2. In this case the motor was tested with the full inertia on the shaft. The potentiometer is connected as a voltage divider and the equation relates angle to voltage.θ dt θ 1 --.= 0V – Vi – V o ------.desired potentiometer voltage Vd . . Finally the velocity of the shaft is integrated to give position.= --ω D Figure 228 Transfer functions for the power amplifier.2K V + = V . So there are 5 turns in the negative and positive direction. . 146.6rads dt 2 K K0 + ----.page 276 For the motor use the differential equation and the speed curve when Vs=10V is applied: 1400 RPM dKK ---- ω + ----. = 0.6 = ----. ω = ----.= ----------------Vs D + 0.= 11.8 2 Figure 229 Transfer function for the motor The individual transfer functions for the system are put into the system block diagram in Figure 230.73V s ω 11. The block diagram is then simplified for the entire system to a single transfer function relating the desired voltage (setpoint) to the angular position (output).73 JR Dω + 0. = 0.8s 1s K ----. The transfer function contains the unknown gain value ’Kp’.8s JR K0. V dt JR s JR 1s 2s 3s 2 For steady-state d–1 ---- ω = 0 ω = 1400RPM = 146.8s JR K----. 10 JR JR K = 0.73 ---.0682 ----.0682 τ ≈ 0.8ω = 11. 8 )D 0.2 11.0.159 Vd – 25.8 D – 4.81Kp-------------------------( D + 0.page 277 Vd + - Kp -2. The final result of ’Kp’ is negative.159 ) -------------------------( D + 0.81Kp -----------------------------------------------------( D + 0. .81Kp1 + ( 0.8 )D – 25. or critically damped.8 )D ------------------------------------------------------– 25.159 θ Vd + - – 25.81Kp --------------------------------------------------2 D + 0.73 ----------------D + 0. In Figure 231 the gain value is calculated to give the system an overall damping factor of 1.108Kp – 25. and simplification The value of ’Kp’ can be selected to ’tune’ the system performance. This is done by recognizing that the bottom (homogeneous) part of the transfer function is second-order and then extracting the damping factor and natural frequency. but this makes sense when the negative gain on the op-amp is considered.8 1 --D θ 0.81Kp-------------------------( D + 0.8 )D – 4.108Kp θ θ Vd Vd θ Figure 230 The system block diagram. D + 0.4 K = – 2. S = r–c Feedback error.8 D – 0. r + b e G c System error.0717K = 0. The equations for calculating these errors are shown in Figure 232. ξ = 1. H e = r–b Figure 232 Controller errors An example of calculating these errors is shown in Figure 233.232 2 2 2 2 Figure 231 Calculating a gain K 8.0 )ω n ω n = 0.3.8 = 2ξω n 0.0717K = x'' + 2ξω n x' + ω n x 0. If the feedback function ’H’ has a value of ’1’ then these errors will be the same.page 278 We have specified. The system is a . The two common types of error are system error and feedback error.4 System Error System error is often used when designing control systems.4 – 0.0 The denominator of the system transfer function can be compared to the standard second-order response.8 = 2 ( 1. or been given the damping coefficient as a design objective.0717K = ω n – 0. ch = C1 e –Kp t The particular solution is found with a guess. Given.= ----------------. The overall transfer function for the system is calculated and then used to find the system response.page 279 simple integrator. In this case the error will go to zero as time approaches infinity.= ---------------r D + Kp 1 + GH ∴c' + K p c = K p r r = A The homogeneous solution is. with a unity feedback loop. The response is then compared to the input to find the system error. cp = C2 c p' = 0 0 + KpC2 = KpA C2 = A The solutions can be combined and the remaining unknown found for the system at rest initially. S = r–c S = A – ( –A e Figure 233 –Kp t + A ) = Ae –Kp t System error calculation example for a step input . c = ch + cp = C1 e 0 = C1e + A C1 = –A c = –A e –Kp t 0 –Kp t +A +A The error can now be calculated. Kp G ( D ) = ----D H( D) = 1 Kp c G ∴. r = At Figure 234 Drill problem: Calculate the system error for a ramp input .page 280 Solve the previous problem for a ramp input. 1 G ( D ) = ----------------------------2 D + 4D + 5 H(D) = 5 r = 4t Figure 235 Drill problem: Calculate the errors .page 281 Find the system error ’e’ for the given ramp input. R. 3.3.6 State Variable Control Systems State variable matrices were introduced before. These can also be used to form a control system. 1 + ατ 1 D 1 + τ 2 D Figure 236 Standard controller types 8. A more complete table is given in Figure 236.5 Controller Transfer Functions The PID controller. ---------------------. Type Transfer Function Proportional (P) Proportional-Integral (PI) Proportional-Derivative (PD) Proportional-Integral-Derivative (PID) Gc = K 1G c = K 1 + -----. and simpler variations were discussed in earlier sections. τD G c = K ( 1 + τD ) 1G c = K 1 + -----. . as shown in Figure 237.page 282 8.+ τD τD 1 + ατD G c = K -------------------- 1 + τD 1 + τD G c = K -------------------- 1 + ατD α>1 α>1 α>1 τ1 > τ2 Lead Lag Lead-Lag 1 + τ 1 D 1 + ατ 2 D G c = K ---------------------. X dt X C + + Y U 1 --D A D Figure 237 A state variable control system 8.page 283 d---. The feedforward function is basically an inverse model of the process.7 Feedforward Controllers When a model of a system is well known it can be used to improve the performance of a control system by adding a feedforward function. When this is used together with a more traditional feedback function the overall system can outperform more traditional controllers function.X = AX + BU dt Y = CX + D + B + d---. such as PID. feedforward function feedback function process Figure 238 A feed forward controller . as pictured in Figure 238.3. 8. • Other control types are possible for more advanced systems. Develop differential equations and then transfer functions for the mechanical system below. • System errors can be used to determine the long term stability and accuracy of a controlled system. There is viscous damping between the block and the ground. A force is applied to cause the . • Block diagrams can be used to describe and simplify systems • Controllers can be designed to meet criteria.3.5 PRACTICE PROBLEMS 1.4 SUMMARY • Transfer functions can be used to model the ratio of input to output. Gc1 Gc2 Gp1 Gp2 Figure 239 A cascade controller 8. such as damping ratio and natural frequency.8 Cascade Controllers When controlling a multistep process a cascade controller can allow refined control of sub-loops within the larger control system.page 284 8. When y = 0.page 285 mass the accelerate.5Kg Ks Kd M Ultrasonic Proximity Sensor F y 3. Find the transfer functions for the systems below. If y=20cm then Vo=2V and if y=-20cm then Vo=-2V. Develop a transfer function for the system below. The input is the force ‘F’ and the output is the voltage ‘Vo’. x F M B 2. θ1 θ2 τ K s1 B1 J1 K s2 J2 B2 . When the spring is undeflected y=0. Neglect gravity. The mass is suspended by a spring and a damper. the output Vo=0V. and the output is the angle of the second mass. The height is measured with an ultrasonic proximity sensor. N K s = 10 --m sK d = 5N --m M = 0. Here the input is a torque. a) find the transfer function x/F.page 286 4. Given the transfer function below. c) solve the input output equation symbolicaly to find the position as a function of time for Ks = 10N/m. Find the transfer functions for the system below where Vi is the input and Vo is the output. develop a mechanical system that it could be for. M=10kg. determine the time response output Y(t) to a step input X(t). d) solve part c) numerically.= -------------------F(D) 10 + 20s where: x = displacement F = force 7. 4 Y G = -----------. 8. x( D) 1 -----------. Given the transfer function. and gravity pulls it downward. Simplify the block diagram below. and what is it used for? b) What does feedback do in control systems? 9. Given a mass supported by a spring and damper. + Vi Vn A + + C Vo . Kd = 5Ns/m. (Hint: Differential Equations). find the displacement of the supported mass over time if it is released from neutral at t=0sec.= -X ( t ) = 20 When t >= 0 D+2 X 6. C + Vi R1 R2 L + Vo - 5. a) What is a Setpoint. b) find the input function F. G(s). Find the system error when the input is a ramp with the function r(t) = 0.5t. Identify components. A x + B + C + + y 13.page 287 10. G1 R + G4 G2 G3 + G6 + G5 C 11. The system uses a proportional controller. The block diagram below is for a servo motor position control system. Simplify the following block diagram. Simplify the block diagram below to a transfer function. Sketch the system . θd 2 Vd Ve K Vm 10 -----------D+1 ω 1 --D θa Va 2 b) draw a sketch of what the actual system might look like. a) Convert the system to a transfer function. 12. The difference between these two is called the error ‘e’.2D 14. as shown below. all of these equations can be combined into a single system transfer . Given the block diagram below. The PID controller will examine the value ‘e’ and then control the speed of the lift motor with a control voltage ‘c’. R(D ) + 5 ---------------------D( D + 1) R( D) 1 + 0.7 (for a step input).page 288 error as a function of time. It uses a desired height ‘d’ provided by a user. The elevator and controller are described with transfer functions. select a system gain K that will give the overall system a damping ratio of 0. and the actual height of the elevator ‘h’. The following system is a feedback controller for an elevator. What is the resulting undamped natural frequency of the system? + K 2 ----------------------------2 D + 3D + 2 15. = ----------------------------------2 10 ( D + 1 ) d D + 10D + 10 1 + ------------------------ 2 D a) Find the response of the final equation to a step input. e = d–h error 2 K 2D + 1 + D c . 2 D 10D + 10 h system transfer function -.= ( D + 1 ) . a) Develop an equation for the system below relating the two inputs to the output.10 10 h c h .= 10 ( D + 1 ) -------------------------------------------2 2 e c = e = D D D(D + 1) D +D D h 10 ( D + 1 ) eliminate ‘e’ ----------. b) Write find the damping coefficient and natural frequency of the results in part a).= K p + ----i + K d D = ----------------------------. c) verify the solution using the initial and final value theorems.----------------------------.page 289 equation as shown.= -----------------------2 d–h D 10 ( D + 1 ) h = -----------------------.---------------.= ---------------2 c D +D elevator 2D + 1 + D . The system starts at rest on the ground floor.-.( d – h ) 2 D 10 ( D + 1 ) 10 ( D + 1 ) h 1 + ------------------------ = ------------------------ ( d ) 2 2 D D 10 ( D + 1 ) -----------------------.PID controller D D e combine the transfer functions 2 2 h 10 -.= --------------------------------.---------------------. and the input (desired height) changes to 20 as a step input. 16.) R Vf R Vd R + - R Ve . (Hint: think of a summation block. 1K 1K Ve RP + 1K Vs c) The equation below can be used to model a permanent magnet DC motor with an applied torque. Then write the transfer function for the angular velocity of mass 2.page 290 b) Develop an equation for the system below relating the input to the output. = V -----------. and a tachometer . – T load s J R ---------- dt JR J R R M R M Vs + K-----RM - RM -----------------------------2 JR RM D + K T load ω d) Write the transfer function for the system below relating the input torque to the output angle theta2. θ1 θ2 τ K s1 J1 K s2 B J2 e) The system below is a combination of previous components. Prove that the block diagram is equivalent to the equation. 2 dK K ---- ω + ω -----------. An equivalent block diagram is given. page 291 for velocity feedback.= 0 R R V e = 2V .– V f V e = 2 ( 0. Vd + 2R P ------------------R P + 1K K-----RM + RM ------------------------------2 JM RM D + K ω K s2 ----------------------------------------------------------------------------------------------------------------------3 2 D ( J 1 J 2 ) + D ( BJ 1 ) + D ( Ks2 ( J 1 + J 2 ) ) + ( BK s2 ) KT (ans.– V f V . R a) V + = V d -----------.+ ---------------.5V d ) – V f Ve = Vd – Vf Vf Vd Ve .5V d R + R ∑ IV - V. = 0. Simplify the block diagram.– V e = --------------. = V s -----------. = ----- 1K RP 1K substitute in (1) R P + 1K Ve 0.+ ---------------.5V s V + – V e V+ – 0 I V + = ----------------.= ------------------Ve RP + 1K (1) Ve 2R P ------------------R P + 1K Vs note: a constant set by the variable resistor Rp (ans.page 292 (ans.= ------------. – T load 2 R JR RM D + K M . – ----------. – ---------- J R R M J R R M JR JR M K .T load ω = ------------------------------ Vs -----------.= 0 ∑ 1K RP Ve 1 .= 0. = V -----------.– 0 V. JR J R R M D + K 2 J R R M 2 dK K ---- ω + ω -----------. b) V.+ -------------. – T load s J R ---------- dt JR J R R M R M RM Kω = ------------------------------ Vs -----.+ ----.= 0 ∑ 1K 1K V . = ----- R P ( 1K ) 1K Vs 2R P ----. c) 2 K .– V s I V .5V s ------------------.T load K - ω D + -----------.1V + -----. = -----------------------------------------------------------------------------------------------------------------------------4 3 2 τ D ( J 1 J 2 ) + D ( BJ 1 ) + D ( K s2 ( J 1 + J 2 ) ) + D ( BK s2 ) ω 2 = Dθ 2 ω2 K s2 ----. = τ K s2 θ2 K s2 ---.page 293 (ans. τ d) K s2 ( θ 1 – θ 2 ) + J1 ∑M = τ – K s2 ( θ 1 – θ 2 ) = J 1 θ 1 D 2 2 τ – K s2 ( θ 1 – θ 2 ) = J 1 θ1 D 2 θ 1 ( J 1 D + K s2 ) + θ 2 ( – K s2 ) = τ K s2 ( θ 1 – θ 2 ) + J2 Bθ 2 D (1) 2 ∑M = K s2 ( θ 1 – θ 2 ) – Bθ2 D = J 2 θ 2 D 2 K s2 ( θ 1 – θ 2 ) – Bθ2 D = J 2 θ 2 D 2 θ 2 ( J 2 D + K s2 + BD ) = θ 1 ( K s2 ) J 2 D + K s2 + BD θ 1 = θ 2 ----------------------------------------- K s2 2 (2) substitute (2) into (1) 2 J 2 D + BD + K s2 2 θ 2 ----------------------------------------- ( J 1 D + K s2 ) + θ 2 ( – K s2 ) = τ K s2 D ( J 1 J 2 ) + D ( BJ 1 ) + D ( K s2 ( J 1 + J 2 ) ) + D ( BK s2 ) θ 2 -----------------------------------------------------------------------------------------------------------------------------.= ----------------------------------------------------------------------------------------------------------------------3 2 τ D ( J 1 J 2 ) + D ( BJ 1 ) + D ( K s2 ( J 1 + J 2 ) ) + ( BK s2 ) 4 3 2 . But. Initially there is a substantial transient response. the complex part corresponds to the oscillations of the system. D = σ + jω where. that is eventually replaced by a steady state response. 9. In other words the real part of the number will represent the transient effects of the system. D = differential operator σ = decay constant ω = oscillation frequency Fourier transform D = jω Figure 240 Transient and steady-state parts of the differential operator . The real component of the number corresponds to the natural decay (eto-the-t) of the system. input and output.2 FOURIER TRANSFORMS FOR STEADY-STATE ANALYSIS When considering the differential operator we can think of it as a complex number. These techniques involve using the Fourier transform on the system transfer function. PHASOR ANALYSIS Topics: • The Fourier transform • Complex and polar calculation of steady state system responses • Vibration analysis Objectives: • To be able to analyze steady state responses using the Fourier transform 9. Techniques for finding the combined steady state and transient responses were covered in earlier chapters. These include the integration of differential equations. this is the Fourier transform. while the complex part will represent the sinusoidal steady-state. Phasor analysis can be used to find the steady state response only.1 INTRODUCTION When a system is stimulated by an input it will respond. and numerical solutions.page 294 9. as in Figure 240. Therefore to do a steadystate sinusoidal analysis we can replace the ’D’ operator with jω . . But it is needed for the transfer function.( A cos θ input + jA sin θ input ) 2 F( ω) ( 2000 – 1000ω ) + j ( 3000ω ) Figure 241 A Fourier transform example To continue the example in Figure 241 values for the sinusoidal input force are assumed.= ----------------------------------------------------------------. In this example numerical values are assumed to put the equation in a numerical form. and also converted to phasor (complex) form. and the equation is simplified to a complex number in the denominator. The response of the steady state output ’x’ can now be found for the given input. To simplify this expression it is multiplied by the complex conjugate. A Fourier transform can be applied to a transfer function for a mass-spring-damper system. to obtain the output.page 295 An example of the Fourier transform is given in Figure 241.= ----------------------------------------------------------2 2 F( D) 1000D + 3000D + 2000 MD + K d D + K s x(ω ) 1 1 -----------. and then finally back into a function of time.) The general of the system is then obtained by multiplying the transfer function by the input. A generic form of sinusoidal input for the system is defined. x(ω ) 1 x ( ω ) = -----------. Some component values are assumed. the expression is quickly reduced to a simple complex number. In particular having a complex denominator makes analysis difficult and is undesirable. After this the method only requires the simplification of the complex expression. F ( t ) = A sin ( ω input t + θ input ) F ( ω ) = A ( cos θ input + j sin θ input ) F ( ω ) = A cos θ input + jA sin θ input Note: the frequency is not used when converting an oscillating signal to complex form. The complex number is then converted to polar form. After this. This equation then described the overall response of the system to an input based upon the frequency of the input. N Ns K s = 2000 --K d = 3000 ----M = 1000kg m m 1 x(D ) 1 -----------.= ---------------------------------------------------------------------2 2 2 F( ω) ( 2000 – 1000ω ) + j ( 3000ω ) 1000j ω + 3000jω + 2000 A given input function can also be converted to Fourier (phasor) form. (Note: the frequency of the input does not show up in the complex form of the input. but it will be used later. The differential operator is replaced with ’jw’.= ----------------------------------------.F ( ω ) = ---------------------------------------------------------------------. We start with a transfer function for a mass-spring-damper system. 671 This can then be converted to a function of time.( 8.863 ×10 ) + j ( – 0. The complex component is now negative 3.671 )m -6 -6 Figure 242 A Fourier transform example (cont’d) .863 ×10-6 -6 -6 Note: the signs of the components indicate that the angle is in the bottom left quadrant of the complex plane. Only the denominator is used top and bottom ( – 86304248 ) + j ( – 50563212 ) x ( ω ) = ----------------------------------------------------------------------14 1.794 ) ( – 9998000 ) + j ( 300000 ) 8.9999 ×10 sin ( 100t + 3. 1 x ( ω ) = -----------------------------------------------------------------------------------------. A = 10N rad ω = 100 -------s F ( t ) = 10 sin ( 100t + 0.505 ×10-6 -6 2 -6 2 ( –0.( 10 cos 0.505 ×10 ) ∠ atan ----------------------------- + π – 0.5 ) 2 ( 2000 – 1000 ( 100 ) ) + j ( 3000 ( 100 ) ) 1 x ( ω ) = ----------------------------------------------------------.505 ×10 ) x(ω) = – 0. x ( ω ) = 0.9999 ×10 ∠3. To correct for this pi radians are added to the result of the calculation.5 + j10 sin 0.0005 ×10 x ( ω ) = ( –0. so the angle should be between 180 and 270 degrees.776 + j4.------------------------------------------------------– 9998000 + j300000 ( – 9998000 – j300000 ) Note: This is known as the complex conjugate 1.page 296 Assume the input to the system is.5rad These can be applied to find the steady state output response. The value is obviously 1 so it does not change the value of the expression 2.863 ×10 ) + ( –0.776 + j4. x ( t ) = 0.794 ( – 9998000 – j300000 ) x ( ω ) = --------------------------------------------------.5 )N θinput = 0. B 2 2 A + B ∠ atan -. when complex numbers are to be multiplied and divided these become tedious and bulky.7854 + 0.= ------------------------------------------------.∠( θ 1 – θ 2 ) B B ∠θ 2 ( A ∠θ 1 ) ( B ∠θ 2 ) = AB ∠( θ 1 + θ2 ) For example. A C C + jD 2 2 D 2 2 C +D C + D ∠ atan -- C A ∠θ 1 A ------------.6 + j0.7854 -----------------------------25 ∠0. The input frequency is substituted into the transfer function and it is then converted to polar form. The previous example started in Figure 241 is redone using polar notation in Figure 244. XXXXX Unfortunately when the numbers are only added or subtracted they need to be converted back to cartesian form to perform the operations.= ----------------------.2 Figure 243 Calculations in polar notation The cartesian form of complex numbers seen in the last section are well suited to operations where complex numbers are added and subtracted.6325 ∠0. This method eliminates the need to multiply by the complex conjugate.3217 = 0.9273 25 = 0. without the need for calculation. The calculations for magnitudes involve simple multiplications.∠ atan -.46362 ∠0. 3 + 4j = 5 ∠0. After this the output is found by multiplying the transfer function by the input. But. 2 + j( 1 + j ) ------------. After this the polar form of . and the angles added or subtracted. 2 2 A B D A +B A + jB --------------.4636 – 0. The polar form for complex numbers simplifies many calculations.= -. – atan --.9273 2 5 = ------------.page 297 Note: when dividing and multiplying complex numbers in polar for the magnitudes can be multiplied or divided.∠0. The angles are simply added. In this example the input is directly converted to polar form. = ------------------------------------------------------------------------------------------------------------------------------F(ω) 300000 2 2 ----------------------.9998 ×10 ∠– 2.∠( 0 – 3.9998 ×10 ∠– 3.5 )N F ( ω ) = 10 ∠0.5 ) F(ω) x ( ω ) = 0.F ( ω ) = ( 0. F ( t ) = 10 sin ( 100t + 0. 1 x(ω) 1 -----------.= ----------------------. (Note: this is a useful point to convert all magnitudes to powers of 10.) After this the three output impedances are combined to a single impedance. In this case the calculations . imaginary +/+/+ real -/- -/+ Figure 244 Correcting quadrants for calculated angles Consider the circuit analysis example in Figure 245.= --------------------------------------------------2 – 9998000 + j300000 F(ω) ( 2000 – 1000 ( 100 ) ) + j ( 3000 ( 100 ) ) x(ω) 1 ∠0 -----------.= -----------------------------------------------------------------------------------------. + π ( – 9998000 ) + ( 300000 ) ∠ atan – 9998000 1 x( ω) 1 ∠0 -----------. In this example the component values are converted to their impedances. x( ω) -7 x ( ω ) = -----------.page 298 the result is converted directly back to a function of time.112 The output can now be calculated.9998 ×10 ( 10 ) ∠( – 3. and the input voltage is converted to phasor form.112 10002500 F(ω) 10002500 ∠3. x ( ω ) = 0.612 ) -6 -7 -6 Re Note: recall that tan θ = ----but the .112 ) = 0. Consider the input function from the previous example in polar form it becomes. To compensate for this the sign of the real and imaginary components must be considered to determine where the angle lies.112 + 0.= ----------------------------------------. If it lies beyond the -90 to 90 degree range the correct angle can be obtained by adding or subtracting 180 degrees.112 ) ( 10 ∠0.9998 ×10 sin ( 100t – 2.function in atan θ Im calculators and software only returns values between 90 to 90 degrees.5 ) = 0.612 The output function can be written from this result.5 The transfer function can also be put in polar form.9998 ×10-7 ∠– 3. 3 + 4 Z eq + Vo - 11 1 1------. 10 5 ∠0. In this case a combination of cartesian and polar forms are used to simplify the calcula- .3 + 4 10 10 j –3 6 1 -------------------–7 6 10 10 j 10 4 + Vo - The three output impedances in parallel can then be combined.099 ) Figure 245 Phasor analysis of a circuit The analysis continues in Figure 246 as the output is found using a voltage divider. Given the circuit.+ ------–3 6 Z eq 1 - 10 4 10 10 j ------------------- –7 6 10 10 j 1–3 –1 ------.3 ) the impedances and input voltage can be written in phasor form.+ -------------------------.page 299 were simpler in the cartesian form.099 ) Z eq 1 Z eq = ----------------------------------------–4 ( 10 ) + j ( 0. 10KΩ + 6 + 100nF 10KΩ Vo - 1mH V i = 5 sin ( 10 t + 0.= – 10 j + 10 j + 10– 4 = ( 10 –4 ) + j ( 0.= -------------------. 10 5 ∠0. and then the results simply added.∠( 0. Z eq V o ( ω ) = ( 5 ∠0.05 sin ( 10 t – 1. and added together.3 – 1.3 V o ( ω ) = ( 5 ∠0. V o ( t ) = 5.5687761 ) = 5. 4 –4 ( 10 ) ( ( 10 ) + j ( 0.3 5 ∠0. The results are then converted back to functions of time.5 and 20 rad/s. The example considered in Figure 241 is extended in Figure 247. Therefore.3 ) 1 4 10 + ----------------------------------------.5687761 990 2 2 -------2 + 990 ∠ atan 2 5–3 V o ( ω ) = -------. –4 ( 10 ) + j ( 0. This means that the principle of superposition applies.3 ) --------------------------------------------------------------------.099 ) - -------------------------------------------------------------V o ( ω ) = ( 5 ∠0.269 ) mV 6 Figure 246 Phasor analysis of a circuit (cont’d) Phasor analysis is applicable to systems that are linear.3 ) ------------------. The final result is then converted back from phasor form to a function of time.page 300 tions.099 ) ) + 1 1 5 ∠0.099 ) 1 V o ( ω ) = ( 5 ∠0. if an input signal has more than one frequency component then the system can be analyzed for each component.3 ) ---------------------- 10 4 + Z eq 1 ----------------------------------------. The output can be found using the voltage divider form. the output voltage can be written. The transfer function is analyzed for each of these frequencies components. In this example the input has a static component. = --------------------------------------------------. as well as frequencies at 0. –4 ( 10 ) + j ( 0.05 × 10 ∠– 1.= ------------------------------------- 2 + j990 990 ∠1.269 990 Finally. The output components are found by multiplying the inputs by the response at the corresponding frequency. . 34 × 10 ∠– 0.= -----------------------------------------------------------------------------------.5 ) = ----------------------------.0005 ∠0 )1000 ∠0 = 0.0005 ∠0 2 F(0) 2000 ( 2000 – 1000 ( 0 ) ) + j ( 3000 ( 0 ) ) x ( 20 ) 1 1 1 ∠0 -------------.= ----------------------------2 1750 + j1500 2305 ∠0.3 VIBRATIONS Oscillating displacements and forces in mechanical systems will cause vibrations. The equations for transmissibility and isolation is shown in Figure 248. A common approach to dealing with these problems is to design vibration isolators. or possibly lead to premature wear and failure in mechanisms.34 × 10 sin ( 0. .5 ) 1 --------------. The calculation is easy to perform with a transfer function or Bode plot.7 × 10 sin ( 20t – 2. 10 ∠0 = 4.5 ) ( 2000 – 1000 ( 0. F ( t ) = 1000 + 20 sin ( 20t ) + 10 sin ( ( 0. x(0) 1 1 ----------.= ---------------------------------------------------------------------2 F(ω) ( 2000 – 1000ω ) + j ( 3000ω ) and an input with multiple frequency components. x ( t ) = 0.= --------------------------------------------.5 ) ) + j ( 3000 ( 0.5 ) ) These can then be multiplied by the input components to find output components.= ------------------------------. x ( 0 ) = ( 0.992 1 ∠0 –3 x ( 0.5 ∠0 1 ∠0 -4 x ( 20 ) = ----------------------------------.5 + 49. the transfer function for each frequency can be calculated. x(ω) 1 -----------.709 ) –6 –3 Figure 247 A example for a signal with multiple frequency components (based on the example in Figure 241) 9.= ----------.709 F ( 0.992 402497 ∠2.= 0. In some cases these become a nuisance.992 ( 2000 – 1000 ( 20 ) ) + j ( 3000 ( 20 ) ) 1 1 ∠0 x ( 0.5t ) ( N ) ) Note: these are gains and phase shifts that will be used heavily in Bode plots later.= -----------------------------------------------------------------------------.709 Therefore the output is.497 ×10 ∠– 2.992 ) + 4. These equations can compare the ratio of forces or displacements through an isolator.709 2305 ∠0.page 301 Given the transfer function for the system.= --------------------------------------------------------------------------------------.= ----------------------------------2 F ( 20 ) – 398000 + j60000 402497 ∠2.5t – 0. 20 ∠0 = 0. = ----------------F in ( ω ) x in ( ω ) %I = ( 1 – T )100% The gain of a transfer function gives transmissibility Figure 248 Transmissibility Given the transfer function for a vibration isolator below.page 302 Given a vibration force in.= ---------------------------------------2 x in 4D + 20KD + 4 Figure 249 Drill problem: Select a K value . to a force out. find a value of K that will give 50% isolation for a 10Hz vibration. x out ( ω ) F out ( ω ) T = -----------------. x out 5D + 10 -------. 5 PRACTICE PROBLEMS 1.000.4 SUMMARY • Fourier transforms and phasor representations can be used to find the steady state response of a system to a given input. Develop a transfer function for the system pictured below and then find the response to an input voltage of Vi = 10cos(1.000 t) using Fourier transforms. • Vibration analysis determines frequency components in mechanical systems. 1mH 1KΩ + Vi + 1KΩ 1KΩ 1KΩ Vo - .page 303 9. 9. = ----------------------------------------------------------------------------------------------------------------------------------------------6 10 + 0j 1 3 1 0.page 304 (ans. = Vo ----------------- 1KΩ 0.001D 1KΩ 0. = V a ----------------- 0. – ---------------------------- -----------------------------------------6 6 1KΩ 1KΩ 0.001D 1KΩ 1 ----------Vo 1KΩ ----. 000t – 0.000.24 cos ( 1.001D –1 1 3 1 Va ----------.001j10 + 1KΩ ----------.464 )mV 2.2 kN and a stiffness of 340 N/m has a steady-state harmonic excitation force applied at 95 rpm (revolutions per minute).+ ----------------.035 V o = 2.+ ----------------- + Vi ----------.001D 0.= -----------------------------------------------------------------------------------------------------------------Vi 0. = Vo ----------------- 1KΩ 0. 1 ----------Vo 1KΩ ---------------.000 t).– 1KΩ 0.f.6 ∠2.= -----------------------------------------------------------------3 3 ( j10 + 1KΩ ) ( 3j + 1 ) – ( 1 ) 3 + 1 – 1 --( j10 + 1KΩ ) j j 10j 10 ∠1.464 ( – 2001 ) + j ( 4000 ) 4472.+ ----------. What damper value will (2) .= 0 1KΩ 1KΩ 1KΩ 0.001D + 1KΩ –1 1 3 1 V o ------------------------------------ ----------.+ ----------.001D (1) Vo – Va Vo I Vo = ----------------.001D 1KΩ for the given input of Vi = 10cos(1.570795 V o = -------------------------------------------. 000.----------.= 0 ∑ 0.+ ----------------- + Vi ----------.+ ----------. model with a weight of 1.001D 1KΩ 1 1 1 V o ----------------.= 0.001D 1KΩ 0.001D + 1KΩ V o ------------------------------------ = V a 1KΩ substitute (2) into (1) 0.001D + 1KΩ 3 1 1 - ----------------- -----------------------------------.00224 ∠– 0.o.+ ----------------.+ ---------------------------.001D 1KΩ 0.= ---------------------------------.001 ( j10 ) 0.001D 0. + - 1KΩ Va 1mH + 1KΩ Vo Vi 1KΩ 1KΩ - ∑ IVa Va – Vi Va Va V a – Vo = ---------------.+ ----------. A single d.001 ( j10 ) 10 10j V o = -----------------------------------------------------------------. = ----------------------------------------------------------2 F 2 2 ( K s – ω M ) + ( ωK d ) 2 2 . -. M F y ∑ Fy = –K s y – K d yD – F = MyD 2 y –1 -.-----------.= ----------------------------------------2 F D M + DK d + K s Ks Kd F floor = K s y + K d yD F floor -----------.= ---------------------------------------------2 F – ω M + ωjK d + K s Ks + ( K d ω ) F floor -----------.= K s + K d D y F floor y –( Ks + Kd D ) F floor .= -----------. = ----------------------------------------2 y F F D M + DK d + K s F floor – ( K s + K d ωj ) -----------.page 305 give a vibration isolation of 92%? (ans. + K 9.+ 99.377878 ×10 ) ----.d -------2 s m s 0. cont’d For 92% isolation.08 = -------------------------------------------------------------------------------------------------------------------2 N rad 2 rad 2 340 --.08 rad 2 N 115600 N 2 99.0025 ---------. The spring rate is 240 N/m for each spring and the vertical static deflection of the equipment is 10mm. Calculate the weight of the equipment and determine the amount of isolation the springs would afford if the equipment operating frequency is twice the natural frequency of the system.3 ----m 3.= K 2 --------------------------------d 2 15370.95 rad -------d 2 2 2 m s N 340 --.95 rad K = --------------------------------------------------------------------. there is 100-92 = 8% transmission.0025 rad ( 1.– 9.= 122kg N9.95 rad ------- d m s 0. N K s = 340 --m 1200N M = ---------------. ------------- --------------- = 9.197253 ×10 - ----------------.95 -------.page 306 (ans.138 2 m rad 8 2 2 Ns K d = 88.---------2 2 2 0.81 ----kg rev 1min 2πrad rad ω = 95 -------. Four helical compression springs are used at each corner of a piece of equipment.122kg + 9.95 ------- min 60sec rev s 2 N 2 340 --. + K 9.0064 s 2 0.+ K d -----------------.K d = ----------------.95 -------. .-----.95 rad 122kg + 9. at 95rpm.K m s s d 2 N 2 340 --.– 9.0064 m m s 8 2 2 2 2 N s 1. . The transfer function gain and phase angle can be plotted as a function of frequency to give an overall picture of system response. The magnitude is the gain.page 307 10.1 INTRODUCTION When a Fourier transform is applied to a transfer function the result can be expressed as a magnitude and angle that are functions of frequency. At different frequencies the transfer function value will change. In the previous chapter these values were calculated for a single frequency and then multiplied by the input values to get an output value. BODE PLOTS Topics: • Bode plots Objectives: • To be able to describe the response of a system using Bode plots 10. and the angle is the phase shift. and the phase shift is the angle. In this example the transfer function is multiplied by the complex conjugate to eliminate the complex number in the denominator. In the example below the slides are positioned to pass more of the lower frequencies. The position of the sliders adjusts the envelope that the audio signal is filtered through. The magnitude of the resulting transfer function is the gain. The sliders trace out a Bode gain plot. The spectrum can be adjusted so that high or low tones are emphasized or muted. The high frequencies would not be passed clearly. Note that to correct for the quadrant of the phase shift angles pi radians is subtracted for certain frequency values. and the bode plot shifts. As the slides are moved the transfer function is changed. and might sound somewhat muffled.page 308 Aside: Consider a ’graphic equalizer’ commonly found on home stereo equipment.2K-9.7K-20K gain f(Hz) Figure 250 Commonly seen Bode plot The mass-spring-damper transfer function from the previous chapter is expanded in Figure 251.2K 3. In theoretical terms the equalizer can be described with a transfer function.7K 9. . 40-120 120-360 360-1K 1K-3. (Note: recall this example was used in the previous chapter) The phase angle can be added to the input wave to get the phase of the output wave. For each one of these the gain and phase angle is calculated.page 309 x(ω ) 1 -----------. The magnitude of the output wave can be calculated by multiplying the input wave magnitude by the gain.= ----------------------------------------------------------------------------.= ------------------------------------------------------------------------2 2 2 F( ω) ( 2000 – 1000ω ) + ( 3000ω ) 1 ( 2000 – 1000ω ) + ( 3000ω ) x(ω ) -----------. A set of frequencies is used for calculations. An example of this type of analysis is done in Figure 252.= ---------------------------------------------------------------------2 F( ω) j ( 3000ω ) + ( 2000 – 1000ω ) 1 x(ω ) -----------.= ---------------------------------------------------------------------2 F( ω) j ( 3000ω ) + ( 2000 – 1000ω ) x(ω ) ( 2000 – 1000ω ) – j ( 3000ω )-----------. The gain gives a ratio between the input sine wave and output sine wave of the system.= ----------------------------------------------------------------------------2 2 2 F( ω) 2 2 2 ( 2000 – 1000ω ) + ( 3000ω ) ( 2000 – 1000ω ) + ( 3000ω ) – 3000ω – 3ωθ = atan ----------------------------------------- = atan ------------ 2 2 – 1000ω + 2000 2 –ω – 3ω θ = atan ------------ – π 2 2 –ω Figure 251 A Fourier transform example for ( ω ≤ 2 ) for ( ω > 2 ) 2 2 2 2 ( – j ) ( 3000ω ) + ( 2000 – 1000ω ) -----------------------------------------------------------------------------2 ( – j ) ( 3000ω ) + ( 2000 – 1000ω ) 2 The results in Figure 251 are normally left in variable form so that they may be analyzed for a range of frequencies. These need to be converted from Hz to rad/s before use. Also note that the frequencies are changed in multiples of tens. or magnitudes. . Gain is normally converted to ’dB’ so that it may cover a larger range of values while still remaining similar numerically. 6283 6. The resulting output represents the steady-state response to the sinusoidal output. Note: The frequencies chosen should be chosen to cover the points with the greatest amount of change.) Note: the gain values will cover many magnitudes of values. For each of the frequencies a gain and phase shift are calculated. To help keep the graphs rational we will "compress" the values by converting them to dB (decibels) using the following formula. gain db = 20 log ( gain ) Note: negative phase angles mean that the mass motion lags the force. and x is the resulting output. there will be gain*F=x out. Figure 252 A Fourier transform example (continued) In this example gain is defined as x/F.006283 0. The gain means that for each unit of F in. .page 310 f(Hz) 0 0. Therefore F is the input to the system. This is shown in Figure 253.001 0. These are then used to calculate the resulting output wave.) θ (deg.06283 0.283 62. The input and output are sinusoidal and there is a difference in phase between the input and output wave of θ (the phase angle).1 1 10 100 1000 (rad/sec) 0 0.3 6283 Gain Gain (dB) θ (rad.83 628.01 0. where an input waveform is supplied with three sinusoidal components. then 10. then 100.2 BODE PLOTS In the previous section we calculated a table of gains and phase angles over a range of frequencies.page 311 Assuming there is excitation from two sinusoidal sources in addition to the static load. . Along the linear axis (the short one) the gains and phase angles are plotted.5t + ______ ) Figure 253 A Fourier transform example (continued) 10. normally with two graphs side-by-side on a single sheet of paper. the next major division would be 1. and finally 1000 on the other side of the paper. This means that if the paper started at 0. Along the longer axis of this paper the scale is base 10 logarithmic. F ( t ) = 1000 + 20 sin ( 20t ) + 10 sin ( 0.5 + ______ sin ( 20t + _____ ) + _______ sin ( 0. Graphs of these values are called Bode plots. as defined by the equation. such as that seen in Figure 254.5t – ________ -------- 360 gain from calculations or Bode plot phase angle from calculations or Bode plot x ( t ) = 0. These plots are normally done on semi-log graph paper.5t ) ( N ) The result for each component can be evaluated separately 2π· x ( t ) = 1000 ( _________ ) sin 0t + ______ -------- 360 2π+ 20 ( _________ ) sin 20t + _______ -------- 360 2π+ 10 ( __________ ) sin 0. The basic nature of logarithmic scales prevents the frequency from being zero.1 on one side. 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 page 312 . 1 1 10 f(Hz) 100 1000 Figure 255 Drill problem: Plot the points from Figure 252 on graph paper Use computer software. to calculate the points in Figure 251. The general layout is pictured below. such as Mathcad or a spreadsheet.page 313 Figure 254 4 cycle semi-log graph paper Plot the points from Figure 252 in the semi-log graph paper in Figure 254. and then draw Bode plots. gain (dB) -40dB/dec phase (deg) 0. Figure 256 Drill problem: Plot the points from Figure 251 with a computer . Most software will offer options for making one axis use a log10 scale. page 314 Draw the Bode plot for the transfer function by hand or with computer. D+3 ----------------------------------------------------2 D + 10000D + 10000 Figure 257 Drill problem: Draw the Bode plot for gain and phase . Once in that form a straight line approximation for each term can be drawn on the graph. The slope up or down is generally +/.01=-40dB. Plot the straight line pieces. In second-order systems the damping coefficient make may the corner flatter or peaked. there should commonly be a 3dB difference at the corner frequencies. Figure 258 The method for Bode graph straight line gain approximation . For example (D+1)/(D+1000) will have corner frequencies at 1 and 1000 rad/sec. 3.20dB/decade for each term. At each corner frequency a numerator term causes the graph to turn up. 2. When done. A smooth curve is then drawn over top of this curve. The effect of each term is added up to give the resulting straight line approximation. Also note that squared (second-order) terms would have a slope of +/-40dB/decade. Bode plots for transfer functions can be approximated with the following steps. each term in the dominator causes the graph to turn down. For example this transfer function starts at 10(D+1)/ (D+1000)=10(0+1)/(0+1000)=0. This method involves looking at the transfer function and reducing it to roots in the numerator and denominator. 1. the straight line segments are added to produce a more complex straight line curve. a) The gain at 0rad/sec is calculated and used to find an initial offset. An initial gain is also calculated to shift the results up or down. b) Put the transfer function in root form to identify corner frequencies. c) Curves that turn up or down are drawn for each corner frequency.page 315 An approximate technique for constructing a gain Bode plot is shown in Figure 258. When the smooth curve is drawn. ∠– -.= 20 log ( ω c ) = – 20 log ( ω c ) ωc after the corner frequency.90 degrees?? 1 G ( jω ) = -----------------ω c + jω the initial gain is 1 G ( 0 ) = ---------------. Figure 259 Why the straight line method works . the log value becomes 1 larger. ω c < jω –1 1G ( jω ) = ----.= ------------.= 20 log ( ω ) = – 20 log ( ω ) jω each time the frequency increases by a multiple of 10. ω c > jω –1 1G ( jω ) = ----.π 1G ( jω ) π π diff = -------------. thus resulting in a gain change of -20 dB.= – 3. and the phase angle is 45 degrees of the way to +/.= ω c + j0 at the corner frequency 1 G ( jω ) = -------------------ω c + jω c 1----ωc ωc = ω 1 1 π = --------------------.= -----.∠– -π ωc 2 4 ω c 2 ∠-4 Therefore the difference is 1.01dB ∠– - 2 G(0) 4 4 2 4 Why does a first order pole go down at 20dB/dec? 1 G ( jω ) = -----------------ω c + jω before the corner frequency.page 316 Note: Some of the straight line approximation issues are discussed below. Why is there 3dB between a first order corner and the smooth plot.= 20 log ------ ∠– -. = ---------------------. = – atan ----. ω c < jω ωπ angle ( G ( jω ) ) = – atan ----. = 0 ω c ω c after the corner frequency. ω c ω c + jω 2 2 ω- 2 2 ----ωc + ω ω c + ω ∠ atan ω c before the corner frequency. ω0angle ( G ( jω ) ) = – atan ----.page 317 Why does a pole make the phase angle move by -90deg after the corner frequency? 1 ω 1 1 ∠0 G ( jω ) = -----------------. = – atan ( ∞ ) = – - ω c 2 ω c > jω Figure 260 Why the straight line method works (cont’d) .= -------------------------------------------------.∠– atan ----. The two roots will cause two curves downwards at -20dB/dec starting at 10 and 100 rad/sec.page 318 Show that the second order transfer function below would result in a slope of +/. but if Hz are used then it is necessary to convert the values. In this example the transfer function is first put into a root form. An example of the straight line plotting technique is shown in Figure 262. and converted to decibels. The frequency axis is rad/sec by default. 1 G ( jω ) = ------------------------2 ( ω c + jω ) Figure 261 Drill problem: Slope of second order transfer functions.40 dB/decade. The initial gain of the transfer function is also calculated. 10 and 100 rad/sec. 1. In total there are three roots. The single root in the numerator will cause the curve to start upward with a slope of 20dB/dec after 1rad/sec. . Gain (dB) D+1 10 ( 1 ) GAIN 0 = -----------------------.(rad/sec) (could be Hz also) -20dB/dec. -20dB/dec. 0dB 1 10 100 freq.= 10 = 20dB ( 10 ) ( 100 ) 4 20dB/dec. .page 319 100D + 100 10 ( D + 1 ) G ( D ) = -------------------------------------------------.11D + 10 4 (the equation is put in root form) Step 1: Draw lines for each of the terms in the transfer function. 1 --------------D + 10 1 -----------------D + 100 Figure 262 An approximate gain plot example The example is continued in Figure 263 where the straight line segments are added to produce a combined straight line curve.01D + 0.= --------------------------------------------2 ( D + 10 ) ( D + 100 ) 0. For a simple first-order term there is a 3dB gap between the sharp corner and the function. and get the straight line approximation.(rad/sec) Figure 263 An approximate gain plot example (continued) Finally a smooth curve is fitted to the straight line approximation.(rad/sec) .page 320 Step 2: Sum the individual lines. Higher order functions will be discussed later. Gain (dB) 40dB 20dB 0dB 1 10 100 freq. When drawing the curve imagine that there are rubber bands at the corners that pull slightly and smooth out. Step 3: Draw the smooth curve (leaving 3dB at the corners). Gain (dB) 40dB 3dB 20dB 0dB 1 10 100 freq. as seen in Figure 266. a) Put the transfer function in root form to identify center frequencies. terms in the denominator cause the curves to go down 90 deg. Gain plots for transfer functions can be approximated with the following steps. so the phase plot starts at zero degrees. 3. c) Curves that turn up or down are drawn around each center frequency. and then straight line phase shifts are drawn for each of the terms. Plot the straight line segments. and finish one decade after. The root in the numerator causes a shift of positive 90 deg. Each in the denominator will shift the start down by 90 deg. Again terms in the numerator cause the curve to go up 90 deg. Effectively they have a root of 0rad/sec. The effect of each term is added up to give the resulting straight line approximation. while terms in the denominator cause negative shifts of 90 degrees. The two roots in the denominator cause a shift downward. For example the transfer function 10(D+1)/(D+1000) would start at 0 deg while 10D(D+1)/(D+1000) would start at +90deg. The smooth curve is drawn. For example (D+1)/(D+1000) will have center frequencies at 1 and 1000 rad/sec. Each of these in the numerator will shift the starting phase angle up by 90deg. There are three roots for the transfer function. meaning that for a center frequency of 100.page 321 Figure 264 An approximate gain plot example (continued) The process for constructing phase plots is similar to that of gain plots. None of these are zero. Figure 265 The method for Bode graph straight line gain approximation The previous example started in Figure 262 is continued in Figure 266 to develop a phase plot using the approximate technique. otherwise the phase should start at 0degrees. 1. The transfer function is put into root form. . Curves begin to shift one decade before the center frequency. 2. starting one decade before 1rad/sec and ending one decade later. the shift would start at 10 and end at 1000. If there are any lone ’D’ terms on the top or bottom. b) The phase at 0rad/sec is determined by looking for any individual D terms. The phase shift occur over two decades. This should have already been done for the gain plot. Each term in the numerator will cause a positive shift of 90 degrees. they will each shift the initial value by 90 degrees. ) D+1 +90 +45 0 -45 -90 0. Again. the concept of an rubber band will smooth the curve.1 1 10 100 1000 freq. .page 322 10 ( D + 1 ) G ( D ) = --------------------------------------------( D + 10 ) ( D + 100 ) Step 1: Draw lines for each of the terms in the transfer function Phase angle (deg. A smooth line approximation is drawn using the straight line as a guide.(rad/sec) 1 -----------------D + 100 4 1 --------------D + 10 Figure 266 An approximate phase plot example The straight line segments for the phase plot are added in Figure 267 to produce a straight line approximation of the final plot. The peak will occur at the damped frequency. This can be handled by determining the damping coefficient and natural frequency as shown in Figure 268.707 to 0 where the peak will be infinite.(rad/sec) Figure 267 An approximate phase plot example (continued) The previous example used a transfer function with real roots. In a second-order system with double real roots (overdamped) the curve can be drawn with two overlapping straight line approximations. If the roots for the transfer function are complex (underdamped the corner frequencies will become peaked.1 1 10 100 1000 freq.1 1 10 100 1000 freq. .) +90 +45 0 -45 -90 0. The peaking effect will become more pronounced as the damping coefficient goes from 0.) +90 +45 0 -45 -90 Phase angle (deg.(rad/sec) 0.page 323 Phase angle (deg. 1 =0. This can be seen mathematically because the roots of the transfer function become complex.page 324 Gain Mn Resonant Peak =0. In addition these curves provide an understanding of the system that makes design easier. a designer will often describe a system with a Bode plot.5 ξ = 0.707 -40dB/decade ωd freq A ------------------------------------------------------2 2 D + ( 2ξω n )D + ( ω n ) ωd = 1 – ξ ωn 2 dB = A Note: If ζ is less than 1 the roots become complex. and the Bode plots get a peak. For example. Figure 268 Resonant peaks The approximate techniques do decrease the accuracy of the final solution. and then convert this to a desired transfer function. but they can be calculated quickly. . D+3 ----------------------------------------------------2 D + 10000D + 10000 Figure 269 Drill problem: Draw the straight line approximation .page 325 Draw the straight line approximation for the transfer function. x(t) displacement A 2π2π 2π x ( t ) = A sin --------.0005 5 t (ms) frequency 1 freq.3A sin -----------.01 0.t + 0.01A sin --------------.page 326 10. instead of time.005 0. 2 Figure 270 A vibration signal as a function of time A signal spectrum displays signal magnitude as a function of frequency.3 SIGNAL SPECTRUMS If a vibration signal is measured and displayed it might look like Figure 270. The three frequency components are clearly identifiable spikes. When this is considered in greater detail it can be described with the given function. The height of the peaks indicates the relative signal magnitude. .t 0. along with a significant amount of ’noise’. The time based signal in Figure 270 is shown in the spectrum in Figure 271. The overall sinusoidal shape is visible. To determine the function other tools are needed to determine the frequencies. and magnitudes of the frequency components. 3 freq.t + 0. 5 PRACTICE PROBLEMS 1. ( D + 1 ) ( D + 1000 ) --------------------------------------------2 ( D + 100 ) AND 5 -----2 D . • A signal spectrum shows the relative strengths of components at different frequencies.01 =100Hz Figure 271 1 -----------0.005 =200Hz The spectrum for the signal in Figure 270 1 --------------0.4 SUMMARY • Bode plots show gain and phase angle as a function of frequency. 10.0005 =2000Hz 10.) 1--------0. Draw a Bode Plot for both of the transfer functions below. • Bode plots can be constructed by calculating point or with straight line approximations.page 327 Amplitude A log(freq.) (Hz or rads. Given the transfer function below.3). b) determine the steady-state output if the input is x(t) = 20 sin(9t+0. y(D ) ) ------------------------------------------------.page 328 (ans. 0dB -20dB -40dB/dec 90deg -45deg -180deg 2.= ( D + 10 ) ( D + 5 2 x(D ) (D + 5) a) draw the straight line approximation of the bode and phase shift plots. . = ( D + 10 ) ---------------------------------------------------------2 x(D ) (D + 5) (D + 5) 6dB 0dB 0. ------------- = 50 + 81 – 45j = 1.031 19.8 90 0.= ( 1.= x – 0.page 329 (ans.3312rad 1.= 2.91j ) = 26.= ---------------.813j = 26.49° x y ( t ) = 20 ( 1.8 1. y(D ) ) ----------.91j y ---------------------------.236 – 0.031 ) Aside: This can also be done entirely with phasors in cartesian notation 9j + 10 5 – 9j y ) . ------------- = ------------------------------.236 y .031 ) .1 + 5.1 + 5.11 sin ( 9t – 0.236 – 0.425 2 2 1.= ( D + 10 ) ( D + 5 .425j ------------------------------------------------- 9j + 5 5 – 9j x (D + 5) 25 + 81 x = 20 ( cos ( 0. but I have calculated them 9j + 10 5 – 9j 50 + 81 – 45j y ) .= 1.= ---------------.1 sin ( 9t – 0.3 + ( – 0.1 ∠– 0.425 ∠ atan --------------.307 ∠– 0. = 1.3312 ) ) y ( t ) = 26.6 -90 x ( t ) = 20 cos ( 9t + 0.236 – 0.6 1.3rad ) + j sin ( 0.236 + 0.425j ------------------- 9j + 5 5 – 9j x (D + 5) 25 + 81 y .1 – 0.307 ) sin ( 9t + 0.= ( D + 10 .33dB ∠– 9.3 ) Aside: the numbers should be obtained from the graphs.1 + 5.91j y ( t ) = 26.3rad ) ) = 19.= ( D + 10 .425j ) ( 19. = ----------------------------------2 x D + 5D + 100 .= ( D + 10 . 1 -----------D+1 1 --------------2 D +1 1 -------------------2 (D + 1) 1 ----------------------------2 D + 2D + 2 4.= ---------------. F D + 1000 G = -.45 ∠0.31 ∠– 0.page 330 (ans.733 – 1. cont’d Aside: This can also be done entirely with phasors in polar notation 9j + 10 13.331 20 ∠0.31 ( 20 ) ∠( – 0.45 y ) .331 ------------------------------------------------- 9j + 5 10. = 13.064 x = 20 ∠0.3 y = 1.31 ∠– 0.031 ) 3.= 1. Use the straightline approximation techniques to draw the Bode plot for the transfer function below.2 ∠– 0.3 ) = 26.733 = -----------.3 y ----------------. draw the root locus plots. For the transfer functions below.064 = 1.30 x (D + 5) 10.331 + 0.30 ∠1.∠0.2 sin ( 9t – 0.031 y ( t ) = 26. and draw an approximate time response for each. b) Solve the differential equation numerically. c) Draw a Bode plot for the system using either approximate or exact techniques on semi-log graph paper . 6. with initial conditions. b) Apply the Fourier transform to the transfer function to find magnitude and phase as functions of frequency. y'' + y' + 7y = F y( 0) = 1 F ( t ) = 10 y' ( 0 ) = 0 t>0 a) Write the equation in state variable form.d) Use the Bode plot to find the response to. e) Find x(t). Roughly sketch the bode plots. K1 = 500 N/m K2 = 1000 N/m M = 10kg x F b) What is the steady-state response for an applied force F(t) = 10cos(t + 1) N ? c) Give the transfer function if ‘x’ is the input. F ( t ) = 10 sin ( 100t ) e) Put the differential equation in state variable form and use a calculator to find .page 331 5. d) Draw the bode plots. dF ( t ) = 10 sin ( 100t ) 5x + ---- x = F dt a) Write the transfer function for the differential equation if the input is F. You are given the following differential equation for a spring damper pair. 7. The applied force ‘F’ is the input to the system. d) Find the frequency response (gain and phase) for the transfer function using the Fourier transform. c) Solve the differential equation using calculus techniques. a) find the transfer function. given F(t) = 10N for t >= 0 seconds. The following differential equation is supplied. and the output is the displacement ‘x’. 008 0. .004 0.0 0.010 f) Give the expected ‘x’ response of this first-order system to a step function input for force F = 1N for t > 0 if the system starts at rest. F = 10 sin ( 100t ) t x 0. Hint: Use the canonical form.002 0.page 332 values in time for the given input.006 0. 01 π phase = – 90° = – -.521 ) . = ----. 2 8Hz Verified by calculations.page 333 (ans. = – 14dB 5 + 0 5corner freq.∠– atan --- 5 5+D 5 + jω F 2 2 2 2 ω 5 +ω 5 + ω ∠ atan -- 5 gain(dB) -14dB 1 initial gain = 20 log ----------.8Hz d) 100 f = -------.08Hz 0.521 ) = 0. a) b) x 1 -.0999 sin ( 100t – 1.= -----------.= -------------------------.= ----------------------------------------------.= -------------.00999 ∠– 1.521 5 10 ∠0 2 2 5 + 100 x = ( 10 ∠0 ) ( 0.∠– atan -------- = 0.00999 ∠– 1.= 16Hz 2π From the Bode plot. 1 100 x ------------.= --------------------.= -----------F 5+D 1 ω x 1 1 1 ∠0 -.8Hz 2π -20dB/dec c) phase(deg) 0° – 45° – 90° 0.= 0. gain = – 40dB = 0.521 x ( t ) = 0.01 ) sin 100t – -.rad 2 π x ( t ) = 10 ( 0.0999 ∠–1. sheets can be cut and pasted together. as well at most large office supply stores. Also note that better semi-log paper can be purchased at technical bookstores.004 − 0.2 t 0.041 Xi 0 0.6 LOG SCALE GRAPH PAPER Please notice that there are a few sheets of 2 and 4 cycle log paper attached.5 i ⋅h 1 0. and if more cycles are required.002 0.010 10.98e-4 5.page 334 e) 0.999 0.0 x 0 9.006 0.– -------5 5 – 5t 0.008 g) 1 e x = -.015 0.2 0 0 0. make additional copies if required. .92e-3 0.099 0.026 0.186 0. page 335 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 . 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 page 336 . 11. If the real roots are negative then the terms will tend to decay to zero and be stable. Consider the roots of a second-order homogeneous differential equation. ROOT LOCUS ANALYSIS Topics: • Root-locus plots Objectives: • To be able to predict and control system stability. For example. and a time response is shown to the right.2 ROOT-LOCUS ANALYSIS In a engineered system we may typically have one or more design parameters. while positive roots will result in terms that grow exponentially and become unstable. or user settings. Notice that in these figures (negative real) roots on the left hand side of the complex plane cause the response to decrease while roots on the right hand side cause it to increase. Root-locus plots are used to plot the system roots over the range of a variable to determine if the system will become unstable. . Complex roots will result in a sinusoidal oscillation. These roots are shown on the complex planes on the left. Recall the general solution to a homogeneous differential equation. The rule is that any roots on the right hand side of the plane make a system unstable. If the roots are real the result will be e-to-the-t terms.page 336 11. as shown in Figure 272 to Figure 278.1 INTRODUCTION The system can also be checked for general stability when controller parameters are varied using root-locus plots. This is generally undesirable and possibly unsafe. Also note that the complex roots cause some amount of oscillation. or a high speed aircraft that fails due to resonant vibrations. think of a washing machine that vibrates so much that it ‘walks’ across a floor. 11. adjustments. It is important to determine if any of these will make the system unstable. page 337 R = – A. – B jw x(t) x0 -A -B sigma t Figure 272 Negative real roots make a system stable R = ± Aj jw A x(t) sigma -A t Figure 273 Complex roots make a system oscillate R = – A ± Bj jw B -A sigma -B t x(t) Figure 274 Negative real and complex roots cause decaying oscillation . A jw x(t) A.page 338 R = – A ± Bj jw B -A sigma -B t x(t) Figure 275 More negative real and complex roots cause a faster decaying oscillation R = – A.A sigma t Figure 277 Positive real roots cause exponential growth and are unstable .-A sigma t Figure 276 Overlapped roots are possible R = A. – A jw x(t) -A. For example. . and the spring value will be varied. recall that the denominator of a transfer function is the homogeneous equation. The range of values for the spring coefficient should be determined by practical and design limitations. By analyzing the function in the denominator of a transfer function the general system response can be found. The mass and damper values are fixed.page 339 R = A ± Bj jw B A sigma x(t) -B t Figure 278 Complex roots with positive real parts have growing oscillations and are unstable Next. In this example the transfer function is found and the roots of the equation are written with the quadratic equation. An example of root-locus analysis for a mass-spring-damper system is given in Figure 279. At this point there are three unspecified values that can be manipulated to change the roots. the spring coefficient should not be zero or negative. B = -------------------------------------2a C 0 2 2 Figure 279 A mass-spring-damper system equation The roots of the equation can then be plotted to provide a root locus diagram.= -----------------------------------F(D) Ks 2 Kd D + ----. In addition complex roots will indicate oscillation. C = 2 M 0 100 100 100 Kd 0 100 100 100 Ks 0 100 1000 10000 B 0 2 Ks Kd M Aside: ax + bx + c = ( x + A ) ( x + B ) – b ± b – 4ac A.D + ----M M Ks –Kd Kd -------.– 4 ----2 M M M -----------------------------------------B. .± -----.page 340 x( D) 1 -----------.= ----------------------------------------2 F(D) MD + K d D + K s Note: We want the form below A -------------------------------------(D + B)(D + C) 1---x(D) M -----------. These will show how the values of the roots change as the design parameter is varied. If any of these roots pass into the right hand plane we will know that the system is unstable. Keep in mind that gain values near zero put the control system close to the right hand plane. The root of the denominator is then calculated and plotted for a range of ’K’ values. so the system is stable and doesn’t oscillate. The variable gain ’K’ calls for determining controller stability over the range of values. and the system can go where it pleases. . In this case all of the roots are in the left side of the plane. It would be advisable to keep the system gain greater than zero to avoid this region. In real terms this will mean that the controller becomes unresponsive.page 341 Imaginary Real Figure 280 Drill problem: Plot the calculated roots on the axes above A feedback controller with a variable control function gain is shown in Figure 281. This analysis begins by developing a transfer function for the overall system. Also... root -0 -1 -2 -3 jω K→∞ K = 0 σ Note: This system will always be stable because all of the roots for all values of K are negative real. we use the characteristic equation of the denominator to find the roots as the value of K varies. we must develop a transfer function for the entire control system.= ------------1 + G ( D )H ( D ) D+K K 1 + --.= -------------------------. make the system more stable. Note: the value of gain ’K’ is normally found from 0 to +infinity. + K 1 K G ( D ) = --D H(D ) = 1 1 --D First. It is our responsibility to make sure that none of the possible K values will lead to instability.page 342 Note: This controller has adjustable gain. ( 1 ) D Next. K --. After this design is built we must anticipate that all values of K will be used. These can then be plotted on a complex plane. Figure 281 Root-locus analysis in controller design . D K G( D) G S ( D ) = -----------------------------------. D+K = 0 K 0 1 2 3 etc. and it will always have a damped response. larger values of K. K 1 + ----------------------------. ( 1 ) = 0 2 D + 3D + 2 D + 3D + 2 + K = 0 2 Note: For a negative feedback controller the denominator is. find values for the roots and plot the values. find the characteristic equation. and an equation for the roots.page 343 • Consider the example. K 0 1 2 3 roots jω σ Figure 282 Drill problem: Complete the root-locus analysis .5 ± ------------------2 2 Next. Given the system elements (assume a negative feedback controller). K H(D) = 1 G ( D ) = ----------------------------2 D + 3D + 2 First.= – 1. 1 + G ( D )H ( D ) 1 – 4K – 3 ± 9 – 4(2 + K) roots = ----------------------------------------------.. page 344 K(D + 5 ) G ( D )H ( D ) = --------------------------------------2 D ( D + 4D + 8 ) Figure 283 Drill problem: Draw a root locus plot 11.3 SUMMARY • Root-locus plots show the roots of a transfer function denominator to determine stability . 0 + 1 -------------------2 (D + 1) KdD .4 PRACTICE PROBLEMS 1. Draw the root locus diagram for the system below.page 345 11. + 3. specify all points and values. 464.000 0 +/. Any gains between -4 and -2 will result in oscillations.0 D + D ( K d + 2 ) + 4.2.page 346 (ans.000 -0.0 ------------------------------------2 ( D + 1 ) + Kd D 3.628.000.657 -0. 2.0 = 0 Kd -10 -6 -2 -1 0 1 2 5 10 100 1000 roots 7.732j -1.000j -0.039.1.0 + - 1 -------------------2 (D + 1) KdD + - 3. -11. -102.000.004.0 -0.5 +/.343.936j -1 +/. 2 2 2 2 2 2 Gains larger than -2 will result in a stable system. + - 3.1.0 ) D = -------------------------------------------------------------------------2 – K d – 2 ± K d + 4K d – 12 D = ---------------------------------------------------------------2 Critical points: (this is simple for a quadratic) The roots becomes positive when 0 > – K d – 2 ± K d + 4K d – 12 2 + K d > ± K d + 4K d – 12 16 > 0 0 > – Kd – 2 Kd > –2 The roots becomes complex when 0 > K d + 4K d – 12 – 4 ± 16 – 4 ( – 12 ) K d = ---------------------------------------------2 K d = – 6.323j -2. For each of the systems below. . 0.536 2.0 --------------------------------------------------2 D + D ( K d + 2 ) + 4. -1000 2 – K d – 2 ± ( K d + 2 ) – 4 ( 4.1. 2.372 -0. -6.5 +/. -2. c) Draw the poles on a real-complex plane. . convert the input to a transfer function. Plot the Gain and magnitude as a function of frequency. and use it to find the time response for ‘y’ by solving a differential equation. d) Apply the Fourier transform function and make it a function of frequency. Kd1 = 1 Ns/m Ks1 = 1 N/m Kd = 1 Ns/m M = 1 kg M = 1kg y F F Ks = 1 N/m y b) If the input force is a step function of magnitude 1N.page 347 a) write the differential equation and convert it to a transfer function. page 348 ans. (the same for both) a) b) y 1 -- = -------------------------2 F D +D+1 y = 1–e – 0.5t 1 – 0.5 ( 1 ) cos ( 0.75t ) + ----------------------- sin ( 0.75t ) 0.75 Note: a similar answer can be found with a single sin or cos 0.866 Re Im c) -0.5 -0.866 d) 1 y -- = -------------------------------2 4 F 1–ω +ω θ = angle ( 1 – ω , – ω ) 2 3. The block diagram below is for a motor position control system. The system has a proportional controller with a variable gain K. θd Vd + Ve Vs ω θa 2 K 100 -----------D+2 1 --D Va 2 a) Simplify the block diagram to a single transfer function. ans. 200K --------------------------------------2 D + 2D + 200K b) Draw the Root-Locus diagram for the system (as K varies). Use either the approximate or exact techniques. page 349 ans. – 2 ± 4 – 4 ( 200K ) roots = ----------------------------------------------- = – 1 ± 1 – 200K 2 Im K roots 0 0.001 0.005 0.1 1 5 10 0,-2 -0.1,-1.9 -1,-1 etc. K=0.005 Re -2 -1 c) Select a K value that will result in an overall damping coefficient of 1. State if the Root-Locus diagram shows that the system is stable for the chosen K. ans. D 2 + 2D + 200K = D 2 + 2ζω D + ω 2 n n ∴ω n = 1 ∴K = 0.005 From the root locus graph this value is critically stable. 4. Given the system transfer function below. θo 20K ---- = --------------------------------2 θd D + D + 20K a) Draw the root locus diagram and state what values of K are acceptable. b) Select a gain value for K that has either a damping factor of 0.707 or a natural frequency of 3 rad/sec. c) Given a gain of K=10 find the steady-state response to an input step of 1 rad. d) Given a gain of K=0.01 find the response of the system to an input step of 0.1rad. page 350 (ans. a) D + D + 20K = 0 – 1 ± 1 – 4 ( 20K ) D = -------------------------------------------2 K -10 -1 0 1/80 1 10 1000 roots 13.65, -14.65 4.000, -5.000 0.000, -1.000 -0.500, -0.500 -0.5 +/- 4.444j -0.5 +/- 14.13j -0.5 +/- 141.4j For complex roots 1 – 80K < 0 For negative real roots (stable) – 1 ± 1 – 80K ------------------------------------ < 0 2 ± 1 – 80K < 1 K>0 1K > ----80 2 b) Matching the second order forms, 2ω n ξ = 1 ω n = 20K 2 The gain can only be used for the natural frequency 20 20 K = ----- = ----- = 2.22 2 2 ωn 3 page 351 c) θo 20 ( 10 ) ---- = ---------------------------------------2 θd D + D + 20 ( 10 ) θ o'' + θd' + θ d 200 = 200θd Homogeneous: A + A + 200 = 0 – 1 ± 1 – 4 ( 200 ) A = ------------------------------------------2 θo ( t ) = C1 e Particular: θ = A 0 + 0 + A200 = 200 ( 1rad ) θ o ( t ) = 1rad Initial Conditions (assume at rest): θo ( t ) = C1 e – 0.5t – 0.5t 2 A = – 0.5 ± 14.1j sin ( 14.1t + C 2 ) A = 1rad sin ( 14.1t + C 2 ) + 1rad C 1 sin ( C 2 ) = – 1rad (1) cos ( 14.1t + C 2 ) θ o ( 0 ) = C 1 ( 1 ) sin ( 14.1 ( 0 ) + C 2 ) + 1rad = 0 θ' o ( t ) = – 0.5C 1 e – 0.5t sin ( 14.1t + C 2 ) – 14.1C 1 e – 0.5t 0 = – 0.5C 1 sin ( C 2 ) – 14.1C 1 cos ( C 2 ) 14.1 cos ( C 2 ) = – 0.5 sin ( C 2 ) 14.1 --------- = tan ( C 2 ) – 0.5 – 1rad– 1rad C 1 = ------------------ = ------------------------- = 1.000rad sin ( C 2 ) sin ( – 1.54 ) θo ( t ) = ( e – 0.5t C 2 = – 1.54 sin ( 14.1t – 1.54 ) + 1 ) ( rad ) page 352 d) θo 20 ( 0.01 ) ---- = -------------------------------------------2 θd D + D + 20 ( 0.01 ) θ o'' + θd' + θ d 0.2 = 0.2θd Homogeneous: A + A + 0.2 = 0 – 1 ± 1 – 4 ( 0.2 ) A = ----------------------------------------2 θo ( t ) = C1 e Particular: θ = A 0 + 0 + A0.2 = 0.2 ( 1rad ) θ o ( t ) = 1rad Initial Conditions (assume at rest): θo ( t ) = C1 e – 0.724t – 0.724t – 0.276t – 0.276t – 0.724t 2 A = – 0.7236068, – 0.2763932 – 0.276t + C2 e A = 1rad + C2e + 1rad + 1rad = 0 (1) ) θo ( 0 ) = C1 e + C2 e C 1 + C 2 = – 1rad θ' o ( t ) = – 0.724 ( C 1 e C 1 = – 0.381C 2 – 0.381C 2 + C 2 = – 1rad C 2 = – 1.616rad – 0.724t ) – 0.276 ( C 2 e – 0.276t C 1 = – 0.381 ( – 1.616rad ) = 0.616rad θ o ( t ) = ( 0.616 )e – 0.724t + ( – 1.616 )e – 0.276t + 1rad 5. A feedback control system is shown below. The system incorporates a PID controller. The page 353 closed loop transfer function is given. X + K K p + ----i + K d D D 4 3 -----------D+9 Y D ( 3K d ) + D ( 3K p ) + ( 3K i ) Y -- = ---------------------------------------------------------------------------------------------2 X D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) 2 a) Verify the close loop controller function given. b) Draw a root locus plot for the controller if Kp=1 and Ki=1. Identify any values of Kd that would leave the system unstable. c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1. d) Select controller values that will result in a natural frequency of 2 rad/sec and damping coefficient of 0.5. Verify that the controller will be stable. e) For the parameters found in the last step can the initial values be found? f) If the values of Kd=1 and Ki=Kp=0, find the response to a unit ramp input as a function of time. (ans. X + - Kp D + K i + Kd D -----------------------------------------D 4 2 3 -----------D+9 Y X + - 3K p D + 3K i + 3K d D ---------------------------------------------------D(D + 9) 4 2 Y X 3K p D + 3K i + 3K d D ------------------------------------------------------------------------------------------2 D ( D + 9 ) + 12K p D + 12K i + 12K d D 3K p D + 3K i + 3K d D ---------------------------------------------------------------------------------------------2 D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) 2 2 Y X Y page 354 b) D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) = 0 – 9 – 12K p ± ( 9 + 12K p ) – 4 ( 12K d + 1 )12K D = ------------------------------------------------------------------------------------------------------------------i 2 ( 12K d + 1 ) Kd -100 -10 -1 -0.1 0 1 10 100 Stable for, roots -0.092, 0.109 -0.241, 0.418 -0.46, 2.369 -0.57, 105.6 -0.588, -20.41 -0.808 +/- 0.52j -0.087 +/- 0.303j -0.0087 +/- 0.1j – 9 – 12K p ± ( 9 + 12K p ) – 4 ( 12K d + 1 )12K i < 0 ± ( 9 + 12K p ) – 4 ( 12K d + 1 )12K i < 9 + 12K p ( 9 + 12K p ) – 4 ( 12K d + 1 )12K i < ( 9 + 12K p ) – 4 ( 12K d + 1 )12K i < 0 –1 K d > ----12 Becomes complex at, 0 > ( 9 + 12K p ) – 4 ( 12K d + 1 )12K i 576K d K i > ( 9 + 12K p ) – 48K i ( 9 + 12K p ) – 48K i K d > ---------------------------------------------576K d K i 2 2 2 2 2 2 2 2 2 K d > 0.682 page 355 c) Kp = 1 Ki = 1 Kd = 1 2 3K p D + 3K i + 3K d D Y -- = ---------------------------------------------------------------------------------------------2 X D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) 2 2 3- D +D+1 Y 3D + 3D + 3 -- = ----------------------------------------- = ----- -------------------------------------------------- 2 13 2 X D + D1.615 + 0.923 D 13 + D21 + 12 3final gain = 20 log ----- = – 12.7 13 3initial gain = 20 log ----- = – 12.0 12 for the numerator, ωn = 1 = 1 2 1 ξ = --------- = 0.5 2ω n 1 – 0.5 = 0.866 1.615 ξ = ------------ = 0.840 2ω n 2 2 ωd = ωn 1 – ξ = for the denominator, ωn = 0.923 = 0.961 2 ω d = ω n 1 – ξ = 0.961 1 – 0.840 = 0.521 -12dB page 356 3K p D + 3K i + 3K d D Y -- = ---------------------------------------------------------------------------------------------2 X D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) ωn = 12K i --------------------- = 2 12K d + 1 12K i = 48K d + 4 24K d = 7 + 12K p 2 9 + 12K p 2ξω n = --------------------- = 20.5 ( 2 ) 12K d + 1 At this point there are two equations and two unknowns, one value must be selected to continue, therefore, K p = 10 24K d = 7 + 12K p = 7 + 12 ( 10 ) = 127 12K i = 48K d + 4 = 48 ( 5.292 ) + 4 = 258.0 Now to check for stability D ( 12 ( 5.292 ) + 1 ) + D ( 9 + 12 ( 10 ) ) + ( 12 ( 21.5 ) ) = 0 64.504D + 129D + 258 = 0 – 129 ± 129 – 4 ( 64.5 )258 D = -------------------------------------------------------------------- = – 1 ± 1.73j 2 ( 64.5 ) 2 2 2 K d = 5.292 K i = 21.5 page 357 e) Cannot be found without an assumed input and initial conditions f) Y 3 ( 0 )D + 3 ( 0 ) + 3 ( 1 )D -- = --------------------------------------------------------------------------------------------------2 X D ( 12 ( 1 ) + 1 ) + D ( 9 + 12 ( 0 ) ) + ( 12 ( 0 ) ) Y 3D -- = -------------------------2 X 13D + 9D Y ( 13D + 9D ) = X ( 3D ) Y''13 + Y'9 = X''3 9Y'' + Y' ----- = 0 13 It is a first order system, Y ( t ) = C1 e Y( 0) = 0 0 = C11 + C2 – t 913 Y' ( t ) = – ----- C e 13 1 9 ----9– ----- t 13 2 2 2 2 X = t X' = 1 X'' = 0 + C2 Y' ( 0 ) = 0 C1 = –C2 starts at rest/undeflected 90 = – ----- C 1 13 1 C1 = 0 C2 = 0 no response 6. Draw a root locus plot for the control system below and determine acceptable values of K, including critical points. X + 1 K 5 + --- + D D + 10 ----D 0.01 0.1 -------------------------------------2 D + 10D + 100 Y page 358 (ans. X + - 1 K 5 + --- + D D + - 0.1 -------------------------------------2 D + 10D + 100 Y 10 ----D 0.01 X + 0.01 X + 0.01 X K ( 0.5D + 0.1 + 0.1D ) ------------------------------------------------------------------------------------------------------------------------------------3 2 2 D + 10D + 100D + 1 + 0.01 ( K ( 0.5D + 0.1 + 0.1D ) ) K ( 0.5D + 0.1 + 0.1D ) ---------------------------------------------------------------------------------------------------------------------------------------------3 2 D + D ( 10 + 0.001K ) + D ( 100 + 0.005K ) + ( 1 + 0.001K ) 2 2 5D + 1 + D K ----------------------------- D 2 0.1 ---------------------------------------------------------------10 2 D + 10D + 100 + 0.1 ---- D Y K ( 0.5D + 0.1 + 0.1D ) ------------------------------------------------------3 2 D + 10D + 100D + 1 2 Y Y X Y page 359 Given the homogeneous equation for the system, D + D ( 10 + 0.001K ) + D ( 100 + 0.005K ) + ( 1 + 0.001K ) = 0 The roots can be found with a calculator, Mathcad, or equivalent. K roots notes -100,000 -1000 -10 0 10 1000 17165.12 100,000 94.3, -3.992, -0.263 0, -4.5+/-8.65j -0.0099, -4.99+/-8.66j -0.01, -4.995+/-8.657j -0.01, -5+/-8.66j -0.019, -5.49+/-8.64j -0.099, -13.52, -13.546 -0.0174, -104.3, -5.572 3 2 roots become negative roots become real page 360 12. NONLINEAR SYSTEMS Topics: • Objectives: • 12.1 INTRODUCTION • how they are different from linear - no transfer functions - new elements needed in block diagrams 12.2 SYSTEM DIAGRAMS 12.3 SUMMARY • page 361 12.4 PRACTICE PROBLEMS 1. page 362 13. ANALOG INPUTS AND OUTPUTS Topics: • Analog inputs and outputs • Sampling issues; aliasing, quantization error, resolution Objectives: • To understand the basics of conversion to and from analog values. 13.1 INTRODUCTION An analog value is continuous, not discrete, as shown in Figure 284. In the previous chapters, techniques were discussed for designing logical control systems that had inputs and outputs that could only be on or off. These systems are less common than the logical control systems, but they are very important. In this chapter we will examine analog inputs and outputs so that we may design continuous control systems in a later chapter. Voltage logical continuous t Figure 284 Logical and Continuous Values Typical analog inputs and outputs for PLCs are listed below. Actuators and sensors that can be used with analog inputs and outputs will be discussed in later chapters. Inputs: • oven temperature • fluid pressure • fluid flow rate so each sample has a start and stop time. 13. A/D converters can only acquire a limited number of samples per second. and the inverse of the sampling period is the sampling frequency (also called sampling rate).2 ANALOG INPUTS To input an analog voltage (into a computer) the continuous voltage value must be sampled and then converted to a numerical value by an A/D converter. Figure 285 shows a continuous voltage changing over time. The time between samples is called the sampling period T. The sampling frequency is specified when buying hardware.page 363 Outputs: • fluid valve position • motor position • motor velocity This chapter will focus on the general principles behind digital-to-analog (D/A) and analog-to-digital (A/D) conversion. Voltage is sampled during these time periods voltage time T = (Sampling Frequency)-1 Figure 285 Sampling an Analog Voltage Sampling time . The sampling time is often much smaller than the sampling period. The time required to acquire the sample is called the sampling time. There are three samples shown on the figure. but for a PLC a maximum sampling rate might be 20Hz. The process of sampling the data is not instantaneous. 16 bit converters are used for precision measurements. This data is noisier. but reasonable ranges are.page 364 A more realistic drawing of sampled data is shown in Figure 286. 0V to 5V 0V to 10V -5V to 5V -10V to 10V The number of bits of the A/D converter is the number of bits in the result word. . The data value sampled will be somewhere between the voltage at the start and end of the sample. Most A/D converters have 12 bits. and even between the start and end of the data sample there is a significant change in the voltage value. If the A/D converter is 8 bit then the result can read up to 256 different voltage levels. These are often specified when purchasing hardware. The maximum (Vmax) and minimum (Vmin) voltages are a function of the control hardware. equation 4 allows a conversion between the integer value from the A/ D converter. V ( t 2 ) = voltage at start.end of sample V ( t 1 ). These equations are summarized in Figure 287. and a voltage in the computer. Finally. Equation 2 gives the error that can be expected with an A/D converter given the range between the minimum and maximum voltages. and the resolution (this is commonly called the quantization error). V max = input voltage range of A/D co vre n etr N = number of bits in the A/D converter Figure 286 Parameters for an A/D Conversion The parameters defined in Figure 286 can be used to calculate values for A/D converters.page 365 V(t) V max V ( t2 ) V ( t1 ) V min t τ t1 t2 where. V ( t ) = the actual voltage over ti e m τ = sample interval for A/D converter t = time t 1. Equation 1 relates the number of bits of an A/D converter to the resolution. Equation 3 relates the voltage range and resolution to the voltage input to estimate the integer that the A/D converter will record. . end of sample V min. t 2 = time at start. ( V max – V min ) + Vmin R – 1 where. This gives a resolution of 1024.006V. When we convert this back to a voltage the result is4. where 0 is -10V and 1023 is +10V. If a voltage of 4. . Each bit halves the quantization error. R = resolution of A/D co vre n etr (3) (4) V I = the integer value representing the input voltage e V C = the voltage calculated from the integer valu V ERROR = the maximum quantization error Figure 287 A/D Converter Equations Consider a simple example.564V=+0. Because there are only 1024 steps there is a maximum error of ±9.564V is input into the PLC.page 366 R = 2 N (1) (2) V max – V min V ERROR = ---------------------------- 2R V in – V min V I = INT ---------------------------- ( R – 1 ) V max – V min VI V C = ----------. a 10 bit A/D converter can read voltages between 10V and 10V. This error can be reduced by selecting an A/D converter with more bits.570V-4.570V.8mV. The resulting quantization error is 4. the A/D converter converts the voltage to an integer value of 746. In the upper graph the waveform completes seven cycles. as shown in Figure 289. and 9 samples are taken.570V R Figure 288 Sample Calculation of A/DValues If the voltage being sampled is changing too fast we may get false readings. The bottom graph plots out the values read. ( V max – Vmin ) + V min = 4. R = 2 N = 1024 V max – V min V ERROR = ---------------------------- = 0. N = 10 V max = 10V V min = – 10V V in = 4.0098V 2R V in – V min V I = INT ---------------------------- R = 746 V max – V min VI V C = ---. The sampling frequency was too low.564V Calculate. so the signal read appears to be different that it actually is.page 367 Given. this is called aliasing. . For example. a short period of time passes before the final sample value is obtained. Shielded data cables are commonly used to reduce the noise levels. These may share the A/D converter using a technique called multiplexing. otherwise aliasing will occur.Most analog input cards allow multiple inputs. a momentary voltage spike might result in a higher than normal reading. The example in Figure 289 violated this principle. f AD > 2f signal where. In practice the sample frequency should be 4 or more times faster than the system frequency. If there are 4 channels . • Noise . f AD = sampling frequency f signal = maximum frequency of the input There are other practical details that should be considered when designing applications with analog inputs.page 368 Figure 289 Low Sampling Frequencies Cause Aliasing The Nyquist criterion specifies that sampling frequencies should be at least twice the frequency of the signal being measured.Since the sampling window for a signal is short. If this happens in real applications the process will appear to operate erratically. • Multiplexing .When the sample is requested. so the signal was aliased. • Delay . noise will have added effect on the signal read. Signal conditioners are used to amplify.page 369 using an A/D converter with a maximum sampling rate of 100Hz.Each double ended input has its own common. • Resistance . but also tends to reduce the number of inputs by half. so they affect circuits they are measuring. or filter signals coming from transducers. • Double Ended Inputs . before they are read by the A/D converter.Voltage inputs to a PLC can use a single common for multiple inputs. . This reduces problems with electrical noise. the maximum sampling rate per channel is 25Hz. • Single Ended Inputs . These tend to be more prone to noise. these types of inputs are called single ended inputs.A/D converters normally have high input impedance (resistance). • Signal Conditioners . The main concept behind this is the successive approximation logic. But. Vin above (+ve) or below (-ve) Ve Vin +Vref successive approximation logic 8 D to A converter + - clock reset Ve done -Vref 8 data out Quite often an A/D converter will multiplex between various inputs. These relationships are almost . Once the last bit has been set on/off and checked the conversion will be complete. The sample and hold circuits can be used before the multiplexer to collect data values at the same instant in time. analog outputs are subject to quantization errors.page 370 ASIDE: This device is an 8 bit A/D converter.3 ANALOG OUTPUTS Analog outputs are much simpler than analog inputs. Figure 291 gives a summary of the important relationships. If the value of Ve is larger the bit is turned off. Once the reset is toggled the converter will start by setting the most significant bit of the 8 bit number. The value of Ve is compared to Vin and a simple logic check determines which is larger. This will then be converted to a digital value. This will be converted to a voltage Ve that is a function of the +/-Vref values. The logic then repeats similar steps from the most to least significant bits. Figure 290 A Successive Approximation A/D Converter 13. To set an analog output an integer is converted to a voltage. and a done bit can be set to indicate a valid conversion value. As it switches the voltage will be sampled by a sample and hold circuit. and does not experience the timing problems with analog inputs. This process is very fast. .234V=0. ( V max – V min ) + V min (18. where 0 results in an output of 0V and 255 results in 10V. If we want to output a voltage of 6.8) R where. this would result in an output voltage of6. we would specify an output integer of 160.6) V max – V min V ERROR = ---------------------------- 2R V desired – V min VI = INT ----------------------------------- R Vmax – V min (18. We have a resolution of 256. R = resolution of A/D co vre n etr V ERROR = the maximum quantization error V I = the integer value representing the desired voltage V output = the voltage output using the integer value V desired = the desired output voltage Figure 291 Analog Output Relationships Assume we are using an 8 bit D/A converter that outputs values between 0V and 10V. R = 2 N (18.250V-6.5) (18.234V.250V. The quantization error will be 20mV.016V. The quantization error would be 6.7) VI V output = ---.page 371 identical to those of the A/D converter. . a current amplifier is needed. R = 2 N = 256 V max – V min V ERROR = ---------------------------- = 0. If the current limit is exceeded for 5V output. the voltage will decrease (so don’t exceed the rated voltage).page 372 Given. but for high current loads. such as motors.250V R The current output from a D/A converter is normally limited to a small value.234V Calculate. If the current limit is exceeded for long periods of time the D/A output may be damaged. typically less than 20mA. N = 8 V max = 10V V min = 0V V desired = 6. This is enough for instrumentation.020V 2R V in – V min V I = INT ---------------------------- R = 160 V max – V min VI V C = ---. ( V max – Vmin ) + V min = 6. This type of interface will be discussed later. + -------------.page 373 ASIDE: 5KΩ MSB bit 3 10KΩ V– V + + V ss bit 2 Computer bit 1 20KΩ + 0 Vo - 40KΩ LSB bit 0 80KΩ First we write the obvious. Shielding is normally used for.5V b3 + 0. and all analog signals.125V b1 + 0. .25 ( 5V ) + 0. it will induce a current flow.+ -------------. the effects of electrical noise will be negligible. Shielding will reduce the effects of the interference.625 ( 0V ) = 4.0625Vb 0 Consider an example where the binary output is 1110. These unwanted voltages result in erroneous readings from sensors.5 ( 5V ) + 0. ∴V o = 0.25V b2 + 0. The resistance in the circuits will convert this to a voltage. high speed counters or high speed circuitry. and signal to outputs.4 SHIELDING When a changing magnetic field cuts across a conductor.375V Figure 292 A Digital-To-Analog Converter 13.125 ( 5V ) + 0. sum the currents into the inverting input as a function of the output voltage and the input voltages from the computer.= ----------10KΩ 20KΩ 40KΩ 80KΩ 5KΩ ∴V o = 0. with 5V for on. Vb3 V b2 Vb1 V b0 Vo -------------. V + = 0 = V– Next. all logical signals in noisy environments. When shielding and grounding are done properly.+ -------------. As a result electrical equipment is normally housed in metal cases. but the shield is only connected on the amplifier end to the case. Shielding involves encasing conductors and electrical equipment with metal. The metal sheath may be a thin film. In this case the small loops reverse every twist. Shielded wires are connected at one end to "drain" the unwanted signals into the cases of the instruments. shielding and twisted pairs. Figure 293 shows a thermocouple connected with a thermocouple. Wires are normally put in cables with a metal sheath surrounding both wires. The wires are connected to the thermocouple as expected. The two wires are twisted at regular intervals. Both of the wires are covered with a metal foil. Two conductor shielded cable cross section Insulated wires Metal sheath Insulating cover Figure 293 Shielding for a Thermocouple A twisted pair is shown in Figure 294. The case is then connected to the shielding ground. so any induced currents are cancel out for every two twists. and final covering of insulation finishes the cable. 1" or less typical Figure 294 A Twisted Pair . The cross section of the wire contains two insulated conductors. shown here as three diagonal lines.page 374 There are two major approaches to reducing noise. effectively forming small loops. or a woven metal mesh. 6 PRACTICE PROBLEMS 1. and AC/DC wires from each other when possible.= 200 0. • Separate high current.1V 7 bits = 128 8 bits = 256 The minimum number of bits is 8. • Analog shielding should be used to improve the quality of electrical signals. What resolution of A/D converter is needed? (ans.05V. what will . b) 2. • D/A conversion is easier and faster and will convert a digital value to an analog value.5 SUMMARY • A/D conversion will convert a continuous value to an integer value. You need to read an analog voltage that has a range of -10V to 10V to a precision of +/-0.735V. 10V – ( –10V ) R = --------------------------------. We are given a 12 bit analog input with a range of -10V to 10V. • Use shielded cables and twisted pair wires. Analog inputs require: a) A Digital to Analog conversion at the PLC input interface module b) Analog to Digital conversion at the PLC input interface module c) No conversion is required d) None of the above (ans. • Choose a metal cabinet that will shield the control electronics.page 375 When designing shielding. 13. • Resolution limits the accuracy of A/D and D/A converters. • Use power line filters to eliminate noise from the power supply. • Use high frequency filters to eliminate high frequency noise. If we put in 2. 3. • Sampling too slowly will alias the real signal. • Use current oriented methods such as sourcing and sinking for logical I/O. the following design points will reduce the effects of electromagnetic interference. • Analog inputs are sensitive to noise. 13. • Avoid “noisy” equipment when possible. N = 12 R = 4096 V min = – 10V V in – V min V I = INT ---------------------------- R = 2608 V max – V min V max = 10V V in = 2. ( V max – Vmin ) + V min = 2.735V VI V C = ---.page 376 the integer value be after the A/D conversion? What is the error? What voltage can we calculate? (ans.734V R . acceleration . Moire fringes and accelerometers • Force measurement. Sensors are also called transducers. These are often amplifiers that boost currents and voltages to larger voltages. As a result the signals often require signal conditioners. pressure and flow • Temperature measurement. CONTINUOUS SENSORS Topics: • Continuous sensor issues.pressure or flow rates . A computer could measure the voltage. This transformation relies upon a manufactured device with limitations and imperfection. typically voltages or currents. RTDs. • To understand interfacing issues. etc.page 377 14.temperature .light intensity . encoders and tachometers • Linear measurement. and convert it to a temperature. potentiometers.1 INTRODUCTION Continuous sensors convert physical phenomena to measurable signals. . • Angular measurement. strain gages and piezoelectric • Liquid and fluid measurement. there will be an increase in output voltage proportional to a temperature rise. The basic physical phenomena typically measured with sensors include.stress. accuracy. potentiometers. 14. resolution. This is because they convert an input phenomena to an output in a different form.angular or linear position . As a result sensor limitations are often charac- . LVDTs. thermocouples and thermistors • Other sensors • Continuous signal inputs and wiring • Glossary Objectives: • To understand the common continuous sensor types. strain or force .sound Most of these sensors are based on subtle electrical properties of materials and devices. Consider a simple temperature measuring device. Sensors all have some limitations over factors such as temperature.This considers accuracy. resolution and repeatability or one device relative to another.g. there will be a small variation for that particular reading. ±3 standard deviations) this will be the repeatability. .2 INDUSTRIAL SENSORS This section describes sensors that will be of use for industrial measurements.. For example. If we take a statistical range for repeated readings (e. humidity. This is the smallest increment that the sensor can detect. For example.g. then the resolution of the device is 0. Precision . corrosives and pressures. if a sensor reads a force of 100N with a ±1% accuracy.Used for systems that step through readings. For example many sensors will work in relative humidities (RH) from 10% to 80%. voltage) to a calculated quantity (e. Repeatability . The sections have been divided by the phenomena to be measured. if a flow rate sensor has a repeatability of 0.Generally more precision costs more. In most sensors this is a desirable feature. This may require special equipment. Environmental .In a linear sensor the input phenomenon has a linear relationship with the output signal. then the force could be anywhere from 99N to 101N. Where possible details are provided.When manufactured or installed. Dynamic Response . readings for an actual flow of 100cfm should rarely be outside 99.The frequency range for regular operation of the sensor. this may also be incorporated into the accuracy value. Range . Resolution . and output.When a single sensor condition is made and repeated. and it outputs a number between 0 and 100. When the relationship is not linear.This is the maximum difference between the indicated and actual reading. Accuracy . Some sensors are very inexpensive. For example. Linearity ..page 378 terized with. a sensor for reading angular rotation may only rotate 200 degrees. our ears hear best between 10Hz and 16KHz.5cfm.Natural limits for the sensor. and need to be performed frequently. many sensors will need some calibration to determine or set the relationship between the input phenomena. Cost . For example. For example. Typically sensors will have an upper operation frequency. occasionally there will be lower frequency limits. but the signal conditioning equipment costs are significant.1 inches.g. dirt/oil. For example if a sensor measures up to 10 inches of linear displacements. a temperature reading sensor may need to be zeroed or adjusted so that the measured temperature matches the actual temperature. Calibration .5cfm. the conversion from the sensor output (e. force) becomes more complex.5cfm to 100.. 14. Potentiometers Potentiometers measure the angular position of a shaft using a variable resistor. V1 resistive film Vw V1 Vw V2 wiper V2 schematic physical Figure 295 A Potentiometer The potentiometer in Figure 296 is being used as a voltage divider. the voltage at the wiper interpolate the voltages at the ends of the resistor. A wiper can be moved along the surface of the resistive film. A potentiometer is shown in Figure 295. If a voltage is applied across the resistor. .page 379 14. The potentiometer is resistor. normally made with a thin film of resistive material.2. As the wiper rotates the output voltage will be proportional to the angle of rotation. As the wiper moves toward one end there will be a change in resistance proportional to the distance moved.1 .1 Angular Displacement 14.2.1. and they are calibrated by rotating them in their mounting brackets. The encoder shown here is a quadrature encode.2. normally in the range of 1% and they are subject to mechanical wear. and it will be discussed later. As the encoder shaft is rotated. then a problem has occurred.2 Encoders Encoders use rotating disks with optical windows. The range of rotation is normally limited to less than 360 degrees or multiples of 360 degrees. Light from emitters passes through the openings in the disk to detectors.page 380 V1 θ max θw V out θw V out = ( V 2 – V 1 ) ---------. If an output voltage from the potentiometer ever reaches either end of the range. Two examples of problems that might cause this are wires that fall off. . as shown in Figure 297. But. and don’t require special signal conditioners. and the wiper will jump from one end of the resistor to the other. or the potentiometer rotates in its mounting. and the machine can be shut down. Faults in potentiometers can be detected by designing the potentiometer to never reach the ends of the range of motion. Potentiometers measure absolute position. The encoder contains an optical disk with fine windows etched into it. and then tightening them in place. the light beams are broken. they have limited accuracy. + V 1 θ max V2 Figure 296 A Potentiometer as a Voltage Divider Potentiometers are popular because they are inexpensive. 14. Some potentiometers can rotate without limits. . the inner ring is the least significant digit. Logic circuits or software is used to determine the direction of rotation. The absolute encoder has two rings. Both rings detect position to a quarter of the disk. but otherwise the same. Figure 297 An Encoder Disk There are two fundamental types of encoders. and more emitters and detectors. and count pulses to determine the displacement. To add accuracy to the relative encoder we only need to add more windows to the existing two rings. with one ring rotated a few degrees ahead of the other. Encoder disks are shown in Figure 298. The output is normally a binary or grey code number. An incremental (or relative) encoder will output two pulses that can be used to determine displacement. absolute and incremental. the outer ring is the most significant digit of the encoder. An absolute encoder will measure the position of the shaft for a single rotation. Typical encoders will have from 2 to thousands of windows per ring. The relative encoder has two rings. The same shaft angle will always produce the same reading. The velocity can be determined by measuring the time between pulses.page 381 light emitters light detectors Shaft rotates Note: this type of encoder is commonly used in computer mice with a roller ball. To add accuracy to the absolute encoder more rings must be added to the disk. . the distance of rotation is determined by counting the pulses from one of the rings. The quadrature scheme. the position during a single rotation is measured directly. If the encoder can rotate both directions a second ring must be used to determine when to subtract pulses. The signals are set up so that one is out of phase with the other. using two rings.page 382 sensors read across a single radial line relative encoder (quadrature) absolute encoder Figure 298 Encoder Disks When using absolute encoders. When using a relative encoder. If the encoder only rotates in one direction then a simple count of pulses from one ring will determine the total distance. If the encoder rotates multiple times then the total number of rotations must be counted separately. input B either leads or lags A. Notice that for different directions of rotation. is shown in Figure 299. If B is the first to turn on the rotation is counterclockwise. If the positive edge of input A is used to trigger the clock. the first to change state determines direction.page 383 Quad input A clockwise rotation Quad Input B Note the change as direction is reversed total displacement can be determined by adding/subtracting pulse counts (direction determines add/subtract) Quad input A counterclockwise rotation Quad Input B Note: To determine direction we can do a simple check. Aside: A circuit (or program) can be built for this circuit using an up/down counter. . Newer PLCs will also allow two normal inputs to be used to decode encoder inputs. Figure 299 Quadrature Encoders Interfaces for encoders are commonly available for PLCs and as purchased units. If both are off or on. If A is the first input to turn on the encoder is rotating clockwise. Consider a point in the graphs above where both A and B are off. and input B is used to drive the up/down count. the counter will keep track of the encoder position. The generator is hooked to the rotating shaft.Tachometers Tachometers measure the velocity of a rotating shaft. are noticeable in that they normally move to some extreme position before use. current is induced. and the frequency calculated. When the time between the pulses is measured the period for one rotation can be found. This technique often requires some signal conditioning circuitry.2.3.Potentiometers . 14. When the magnetic moves past a stationary pick-up coil. 14. This normally involves moving an axis until it reaches a logical sensor that marks the end of the range. For each rotation of the shaft there is a pulse in the coil. This technique will introduce some drag into the system.1 . and other relative sensors. Both of these techniques are common. A common technique is to mount a magnet to a rotating shaft. The rotation of a shaft will induce a voltage proportional to the angular velocity.3 Linear Position 14. and inexpensive.2. as shown in Figure 300. rotating shaft pickup coil Vout Vout t magnet 1/f Figure 300 A Magnetic Tachometer Another common technique uses a simple permanent magnet DC generator (note: you can also use a small DC motor).1 . and is used where efficiency is not an issue.2. The end of range is then used as the zero position.2.page 384 Normally absolute and relative encoders require a calibration phase when a controller is turned on. Machines using encoders. so in the figure more current will be induced in the left hand coil. further from the center the relationship becomes nonlinear. These are capable of measuring linear displacement over long distances. V2 a Vout = V 1 + ( V 2 – V1 ) -. and the signal out is zero (0Vac). High frequency alternating current (AC) is applied to the center coil. This generates a magnetic field that induces a current in the two outside coils. The basic device is shown in Figure 302. 14. The magnitude of the signal out voltage on either line indicates the position of the core. It consists of outer coils with an inner moving magnetic core.2. . Figure 301 shows the output voltage when using the potentiometer as a voltage divider.3. but potentiometers are also available in linear/sliding form.Linear Variable Differential Transformers (LVDT) Linear Variable Differential Transformers (LVDTs) measure linear displacements over a limited range. The core will pull the magnetic field towards it. The outside coils are wound in opposite directions so that when the core is in the center the induced currents cancel. Near the center of motion the change in voltage is proportional to the displacement. L V out L a V1 Figure 301 Linear Potentiometer Linear/sliding potentiometers have the same general advantages and disadvantages of rotating potentiometers. But.2 .page 385 Rotational potentiometers were discussed before. The final capacitor should be large enough to smooth out the voltage ripple on the output. The two diodes convert the AC wave to a half wave DC wave. Typical applications for these devices include measuring dimensions on parts for quality . and have less friction. ∆V = output voltage K = constant for device ∆x = core displacement signal out AC input Figure 302 An LVDT Aside: The circuit below can be used to produce a voltage that is proportional to position.page 386 A rod drives the sliding core ∆x ∆V = K∆x where. Vac out Vac in LVDT Vdc out Figure 303 A Simple Signal Conditioner for an LVDT These devices are more accurate than linear potentiometers. The capacitor and resistor values can be selected to act as a low pass filter. as shown in Figure 304. Figure 304 The Moire Fringe Effect A device to measure the motion of the moire fringes is shown in Figure 305. or down. often in the thousands. 14. They are often used for pressure measurements with Bourdon tubes and bellows/ diaphragms.Moire Fringes High precision linear displacement measurements can be made with Moire Fringes. The spacing of the lines determines the accuracy of the position measurements. close enough. As the moving strip travels by a stationary strip the patterns will move up.3. This is then passed through the fringes to be detected by light sensors. . overlay the sheets and hold them up to the light. The stationary strip is offset at an angle so that the strips interfere to give irregular patterns. Both of the strips are transparent (or reflective). A light source is collimated by passing it through a narrow slit to make it one slit width. can act as a quadrature pair. Moving Stationary Note: you can recreate this effect with the strips below. and the same method used for quadrature encoders can be used to determine direction and distance of motion. At least two light sensors are needed to detect the bright and dark locations. with black lines at measured intervals. depending upon the speed and direction of motion. A major disadvantage of these sensors is the high cost. You will notice that shifting one sheet will cause the stripes to move up or down.3 . Photocopy the pattern twice.2. Two sensors.page 387 control. In this case the mass is cantilevered on the force sensor. typically used for measuring vibrations . A base and housing enclose the sensor.4 .page 388 on off on off Figure 305 Measuring Motion with Moire Fringes These are used in high precision applications over long distances. Base Mounting Stud Force Sensor Mass Housing Figure 306 A Cross Section of an Accelerometer Accelerometers are dynamic sensors.2. A small mounting stud (a threaded shaft) is used to mount the accelerometer. as shown in Figure 306. Typical applications include Coordinate Measuring Machines (CMMs). When the sensor accelerates. but the cost will be high. They can be purchased from a number of suppliers. often meters. the inertial resistance of the mass will cause the force sensor to deflect.3. 14.Accelerometers Accelerometers measure acceleration using a mass suspended on a force sensor. By measuring the deflection the acceleration can be determined. but some general application guidelines are. There is often a trade-off between a wide frequency range and device sensitivity (note: higher sensitivity requires a larger mass). Temperature variations will affect the accuracy of the sensors. Cables are fixed to the surface of the vibration source. The units for sensitivity is charge per m/s**2. -100to250°C operating range 1mV/g to 30V/g sensitivity operate well below one forth of the natural frequency The accelerometer is mounted on the vibration source as shown in Figure 308. and are fixed to the surface as often as possible to prevent noise from the cable striking the surface. Piezoelectric based accelerometers typically have parameters such as.page 389 between 10Hz to 10KHz.000 m/s**2: high shock designs can be used up to 1. for example a 1g shaker will hit a peak velocity of 9.004 Figure 307 Piezoelectric Accelerometer Sensitivities The force sensor is often a small piece of piezoelectric material (discussed later in this chapter). A smaller resonant frequency limits the maximum frequency for the reading. • Mass of the accelerometers should be less than a tenth of the measurement mass. Figure 307 shows the sensitivity of two accelerometers with different resonant frequencies.81 m/s**2. resonant freq. Each accelerometer is different. • The control vibrations should be less than 1/3 of the signal for the error to be less than 12%).5 pC/(m/s**2) . Background vibrations can be detected by attaching control electrodes to non-vibrating surfaces. close to the accelerometer. Standard accelerometers can be linear up to 100. The smaller frequency results in a smaller sensitivity. • These devices can be calibrated with shakers. (Hz) 22 KHz 180KHz sensitivity 4. . The accelerometer is electrically isolated from the vibration source so that the sensor may be grounded at the amplifier (to reduce electrical noise).000 m/s**2. The piezoelectic material can be used to measure the force in shear or compression.000. The sensor needs to be mounted on the equipment to be tested. or site for vibration measurement signal processor/ recorder control system Figure 309 Typical Connection for Accelerometers Accelerometers are commonly used for control systems that adjust speeds to reduce vibration and noise. The signal from accelerometers can be . The voltage can then be analyzed to determine the vibration frequencies. Computer Controlled Milling machines now use these sensors to actively eliminate chatter. Sensor preamp Source of vibrations. and detect tool failure.page 390 Sealant to prevent moisture hookup wire isolated stud accelerometer isolated wafer surface Figure 308 Mounting an Accelerometer Equipment normally used when doing vibration testing is shown in Figure 309. A pre-amplifier normally converts the charge generated by the accelerometer to a voltage. 1 . R = resistance of wire V.page 391 integrated to find velocity and acceleration.2. Figure 310 shows the basic properties of the undeformed wire. the resistance of the wire is a function of the resistivity.Strain Gages Strain gages measure strain in materials using the change in resistance of a wire. The wire is glued to the surface of a part. Currently accelerometers cost hundreds or thousands per channel. I = voltage and current L = length of wire w.= ρ -. and cross sectional area.4 Forces and Moments 14. Basically.2.4. But. 14. Their current use is for airbag deployment systems in automobiles. t = width and thickness A = cross sectional area of conducto r ρ = resistivity of material Figure 310 The Electrical Properties of a Wire . so that it undergoes the same strain as the part (at the mount point). advances in micromachining are already beginning to provide integrated circuit accelerometers at a low cost. length.= ρ ----A wt I where. w L V + I t L LV R = -. the cross sectional area will decrease. ν = F = E = σ. as predicted by Young’s modulus. If a force is applied as shown. w ( 1 – νε )t ( 1 – νε ) w't' (1 + ε) ∴∆R = R' – R = R --------------------------------------. But. The new length and cross sectional area can then be used to find a new resistance.– 1 ( 1 – νε ) ( 1 – νε ) where.= ----. the wire will become longer.page 392 After the wire in Figure 310 has been deformed it will take on the new dimensions and resistance shown in Figure 311.= ρ --------------------------------------------.= Eε A wt F∴ε = --------Ewt F L' L(1 + ε) R' = ρ ------. ε poissons ratio for the material applied force Youngs modulusforthematerial = stress and strain of material Figure 311 The Electrical and Mechanical Properties of the Deformed Wire . as predicted by Poison’s ratio. w’ L’ t’ F Fσ = -. As a result.) Rosette gages are less sensitive to direction. application of adhesives. In this circuit the variable resistor R2 would be tuned until Vo = 0V. (Note: the gages cannot read shear stress.page 393 Aside: Changes in strain gauge resistance are typically small (large values would require strains that would cause the gauges to plastically deform). . as shown in Figure 313. so the wire is actually wound in a uniaxial or rosette pattern. When using uniaxial gages the direction is important. Wheatstone bridges are used to amplify the small change. and soldering leads to the strain gages. These gauges are sold on thin films that are glued to the surface of a part. Then the resistance of the strain gage can be calculated using the given equation. V+ R2 R1 R strain = ----------R3 R1 when Vo = 0V R2 R4 + R3 R5 Vo Rstrain Figure 312 Measuring Strain with a Wheatstone Bridge A strain gage must be small for accurate readings. it must be placed in the direction of the normal stress. The process of mounting strain gages involves surface cleaning. and if a shear force is present the gage will measure the resulting normal force at 45 degrees. 4.Piezoelectric When a crystal undergoes strain it displaces a small amount of charge. In the narrow neck the strain is proportional to the load on the member. This is known as . or a known load applied. This often involves making a reading with no load. as shown in Figure 314.2 .page 394 stress direction uniaxial Figure 313 Wire Arrangements in Strain Gages rosette A design techniques using strain gages is to design a part with a narrowed neck to mount the strain gage on. These parts are often called load cells. when the distance between atoms in the crystal lattice changes some electrons are forced out or drawn in. so it may be used to measure force.2. This also changes the capacitance of the crystal. Gages require calibration before each use. An example application includes using strain gages to measure die forces during stamping to estimate when maintenance is needed. 14. mounted in narrow section to increase strain effect F F Figure 314 Using a Narrow to Increase Strain Strain gauges are inexpensive. In other words. and can be used to measure a wide range of stresses with accuracies under 1%. allowing them to be used as actuators. When using piezoelectric sensors charge amplifiers are needed to convert the small amount of charge to a larger voltage. when used for static measurements they tend to drift or slowly lose charge. and the signal value will change. F b + q a c F εab d---. The change in capacitance is proportional to the change in the thickness.6*10**10 N/m**2) Figure 315 The Piezoelectric Effect These crystals are used for force sensors.page 395 the Piezoelectric effect.F C = -------i = εg c dt where. Applying an electrical charge can induce strain. 8. 4. the strain in the material.06*10**-11 F/m) i = current generated F = force applie d g = constant for material (quartz typ. and a constant specific to the material. C = capacitance change a. c = geometry of material ε = dielectric constant (quartz typ. b. 50*10**-3 Vm/N) E = Youngs modulus (quartz typ. Figure 315 shows the relationships for a crystal undergoing a linear deformation. . but they are also used for applications such as microphones and pressure sensors. These sensors are best suited to dynamic measurements. The charge generated is a function of the force applied. such as audio speakers. The fluid flow rate will be proportional to the pressure difference before and at the neck of the valve.Venturi Valves When a flowing fluid or gas passes through a narrow pipe section (neck) the pressure drops.5 Liquids and Gases 14. will be elongated when the pressure increases. connected to the end of the tube. the greater the pressure difference before and after the neck. When the pressure inside is higher than the surrounding air pressure (14. The Bourdon tube uses a circular pressure tube.2.2.1 .Pressure Figure 316 shows different two mechanisms for pressure measurement. pressure increase position sensor pressure increase position sensor pressure pressure a) Bourdon Tube Figure 316 Pressure Transducers b) Baffle These sensors are very common and have typical accuracies of 0. This is known as a Venturi valve.5%. If there is no flow the pressure before and after the neck will be the same. The faster the fluid flow.5.) the tube will straighten.page 396 14.2. Figure 317 shows a Venturi valve being used to measure a fluid flow rate.2 .7psi approx. A position sensor. . 14.5. page 397 differential pressure transducer fluid flow Figure 317 A Venturi Valve . + ----------------. that relates the velocit and pressure before and after it is compressed. As the fluid approaches the point of maximum vibration it accelerates.+ gz = C = ----------. assume that the center line of the valve does not change. This will mean that the pressure before will always be higher than the pressure after. such as suction cups.+ -------------ρ 2 ρ 2 2 2 2 2 where.+ gz ρ 2 ρ 2 p before v before p after v after --------------. p ----. So. as shown below.3 . And.+ -------------. The . so the density does not change. Figure 318 The Pressure Relationship for a Venturi Valve Venturi valves allow pressures to be read without moving parts. They work well for both fluids and gases.+ ----------------. which makes them very reliable and durable. p before – p after v after v before = ρ -------------. causing them to vibrate.+ v . 14.Coriolis Flow Meter Fluid passes through thin tubes. the right hand side of the expression will be positive. It is also common to use Venturi valves to generate vacuums for actuators. 2 2 p before v before p after v after --------------.= ----------.– ----------------- 2 2 2 The flow velocity v in the valve will be larger than the velocity in the larger pipe section before.+ gz = C ρ 2 p = pressure ρ = density v = velocity g = gravitational constant z = height above a reference C = constant Consider the centerline of the fluid flow through the valve.2.page 398 Aside: Bernoulli’s equation can be used to relate the pressure drop in a venturi valve. Assume the fluid is incompressible. and the difference will be proportional to the velocity squared.5. This gives us a simpler equation. When leaving the point it decellerates. These devices typically have a large constriction on the flow. These flowmeters don’t oppose fluid flow. and the other in the opposite direction. The amount of bending is proportional to the velocity of the fluid flow.5 .page 399 result is a distributed force that causes a bending moment.5.5. In a transit time flow meter two sounds are used. but this also increases the flow resistance. The transmitter and receiver have a minimal impact on the fluid flow. then the detected frequency will be lowered. The difference in travel time for the sounds is used to determine the flow velocity. The result is that a potential (voltage) can be measured purpendicular to the direction of the flow and the magnetic field.6 . the greater the voltage.1%. These sensors tend be low cost and are popular for low accuracy applications. Measuring the frequency allows an estimate of the flow rate. The higher the flow rate. If the fluid is flowing in the same direction as the sound it will arrive sooner. As the fluid moves. A doppler flowmeter bounces a soundwave off particle in a flow. The frequency of the vortices will be proportional to the flow rate.2. and result is significant loses. 14.Ultrasonic Flow Meter A transmitter emits a high frequency sound at point on a tube.Vortex Flow Meter Fluid flowing past a large (typically flat) obstacle will shed vortices. 14.Magnetic Flow Meter A magnetic sensor applies a magnetic field perpendiculr to the flow of a conductive fluid.2. and therfore don’t result in pressure drops. one traveling forward. If the particle is moving away from the emitter and detector pair. and so they don’t result in pressure drops. The typical accuracy for these sensors is 0. the electrons in the fluid experience an electromotive force. .2. Some of the devices also use bent tubes to increase the sensistivity. The typical accuracy for a corriolis flowmeter is 0.5%. 14. If the sound is against the flow it will take longer to arrive. The signal must then pass through the fluid to a detector where it is picked up.4 . if it is moving towards them the frequency will be higher. and hence twisting of the pipe.5. plasma systems 14.e.e. Resistive Temperature Detectors (RTDs) normally use a wire or film of platinum. superconductors in MRI units low temperature measurement -60 to 0 deg C . copper or nickel-iron alloys. The diameter of the tube is small (typically less than 1/8") so that it doesn’t affect the flow. gas flow pitot tube connecting hose pressure sensor Figure 319 Pitot Tubes for Measuring Gas Flow Rates 14.g.g.g.6 Temperature Temperature measurements are very common with control systems.2.e.6. So. The temperature ranges are normally described with the following classifications.7 .g.Pitot Tubes Gas flow rates can be measured using Pitot tubes. nickel. freezer controls fine temperature measurements 0 to 100 deg C . The metals are . very low temperatures <-60 deg C . These are small tubes that project into a flow.2. metal refining/processing very high temperatures > 2000 deg C .Resistive Temperature Detectors (RTDs) When a metal wire is heated the resistance increases.1 .g.e.page 400 14.2. environmental controls high temperature measurements <3000 deg F .5.e. a temperature can be measured using the resistance of a wire. as shown in Figure 319. Seebeck.1562) Platinum Nickel -80 . The basic calculations for thermocouples are shown in Figure 321.300 (-112 .2 . The resistances of these alloys are shown in Figure 320.850 (-328 .260 (-328 . they can be expensive 14.572) -200 .) Thermocouples use a junction of dissimilar metals to generate a voltage proportional to temperature.) The current through the RTD should be kept to a minimum to prevent self heating. a voltage. The equation can also be rearranged to provide a temperature given a voltage. and when two different metals touch there is a small potential difference. A current must be passed through the RTD to measure the resistance. (Note: when designing assemblies. . This principle was discovered by T. But. The total resistance of an RTD might double over the temperature range.6. that will increase by 0.page 401 wound or wrapped over an insulator.J. This calculation provides the measured voltage using a reference temperature and a constant specific to the device.05%. Material Temperature Range C (F) Typical Resistance (ohms) 100 120 10 -200 . this will lead to corrosion.2. and covered for protection.Thermocouples Each metal has a natural potential level. These devices are more linear than thermocouples. (Note: a voltage divider can be used to convert the resistance to a voltage. dissimilar metals should not touch.500) Copper Figure 320 RTD Properties These devices have positive temperature coefficients that cause resistance to increase linearly with temperature.4 ohms/°C. A platinum RTD might have a resistance of 100 ohms at 0C. and can have accuracies of 0. 97 0 to 37.V out V out = α ( T – T ref ) V out ∴T = --------. Table 1: Thermocouple Types ANSI Type T J E K R S C Materials copper/constantan iron/constantan chromel/constantan chromel/aluminum platinum-13%rhodium/platinum platinum-10%rhodium/platinum tungsten-5%rhenium/tungsten-26%rhenium Temperature Range (°F) -200 to 400 0 to 870 -200 to 900 -200 to 1250 0 to 1450 0 to 1450 0 to 2760 Voltage Range (mV) -5.74 0 to 14. and signal conditioners are commonly available. and the normal temperature ranges.82 0 to 42.28 -8. most PLC vendors sell thermocouple input cards that will allow multiple inputs into the PLC.(typical) °C = current and reference temperatures Figure 321 Thermocouple Calculations The list in Table 1 shows different junction types. T ref µV 50 -----.97 to 50. Both thermocouples.82 to 68.63 0 to 16. For example.07 . α = constant (V/C) T.+ T ref α where. and relatively inexpensive.page 402 measuring device + .60 to 17.78 -5. 6.2. their resistance will decrease with an increase in temperature.3 . . with a constant for the device.page 403 mV 80 E 60 J 40 K C 20 T R S 0 0 500 1000 1500 2000 2500 ( °F ) Figure 322 Thermocouple Temperature Voltage Relationships (Approximate) The junction where the thermocouple is connected to the measurement instrument is normally cooled to reduce the thermocouple effects at those junctions.5%. When using a thermocouple for precision measurement. 14. The expression can be rearranged to calculate the temperature given the resistance. (Note: this is because the extra heat reduces electron mobility in the semiconductor.Thermistors Thermistors are non-linear devices. The basic calculation is shown in Figure 323. often metal oxide semiconductors The calculation uses a reference temperature and resistance. to predict the resistance at another temperature. a second thermocouple can be kept at a known temperature for reference.) The resistance can change by more than 1000 times. A series of thermocouples connected together in series produces a higher voltage and is called a thermopile. Readings can approach an accuracy of 0. +V R1 R3 R5 + R2 R4 Vout Figure 324 Thermistor Signal Conditioning Circuit . T T o βT o ∴T = -------------------------------Rt T o ln ----- + β Ro where. R t = resistances at reference and measured temps. R o. T o. T = reference and actual temperature s β = constant for device Figure 323 Thermistor Calculations Aside: The circuit below can be used to convert the resistance of the thermistor to a voltage using a Wheatstone bridge and an inverting amplifier.page 404 Rt = Ro e 1 1β -.– ---. page 405 Thermistors are small. These are normally used for high temperature applications. or for production lines where it is not possible to mount other sensors to the material.Other Sensors IC sensors are becoming more popular. The devices respond quickly to temperature changes. But. and they have a higher resistance. have a limited temperature/resistance range and can be self heating. or metallized surfaces. 14. and is also relatively slow (ms). and require some knowledge of interfacing methods for serial or parallel data. . Typical accuracies are 1%. The change in resistance is non-linear.4 . inexpensive devices that are often made as beads. they have limited temperature ranges.01%.7 Light 14.Light Dependant Resistors (LDR) Light dependant resistors (LDRs) change from high resistance (>Mohms) in bright light to low resistance (<Kohms) in the dark.2.1 .6. They output a digital reading and can have accuracies better than 0.2. Pyrometers are non-contact temperature measuring devices that use radiated heat. 14.2.7. so junction effects are not an issue. but the devices are not linear. This is often caused by electromagnetic fields on the factory floor inducing currents in exposed conductors. In these cases it may be necessary to buy or build signal conditioners. Some of the techniques for dealing with electrical noise include. V high These are common in low cost night lights. it must return along another path.3 INPUT ISSUES Signals from sensors are often not in a form that can be directly input to a controller. twisted pairs .the wires are twisted to reduce the noise induced by magnetic fields. When a signal is transmitted through a wire. shielding .shared or isolated reference voltages (commons). and circuitry to convert from current to voltage. single/double ended inputs . This section will discuss the electrical and electronic interfaces between sensors and controllers. but it may also include noise filters. Normally.page 406 Aside: an LDR can be used in a voltage divider to convert the change in resistance to a measurable voltage. If the wires have an area between them the magnetic flux enclosed in the loop can induce . V out V low Figure 325 A Light Level Detector Circuit 14.shielding is used to reduce the effects of electromagnetic interference. a signal conditioner is an amplifier. Analog signal are prone to electrical noise problems. . The least expensive method uses one shared common for all analog signals. Most analog output cards are double ended.page 407 current flow and voltages. when double ended inputs are used the number of available inputs is halved. This technique is common in signal wires and network cables. then the amount of noise induced is reduced. or reference voltage can be connected different ways. a few times per inch. A Shield is a metal sheath that surrounds the wires Analog voltage source + - Analog Input IN1 REF1 SHLD Figure 326 Cable Shielding When connecting analog voltage sources to a controller the common. as shown in Figure 326. this is called double ended. This sheath needs to be connected to the measuring device to allow induced currents to be passed to ground. Most analog input cards allow a choice between one or the other. as shown in Figure 327. If the wires are twisted. A shielded cable has a metal sheath. this is called single ended. This prevents electromagnetic waves to induce voltages in the signal wires. But. The more accurate method is to use separate commons for each signal. Adjustments are provided for gain and offset adjustments.page 408 device + #1 device + #1 - Ain 0 Ain 1 Ain 2 Ain 3 Ain 4 Ain 5 Ain 6 Ain 7 COM device + #1 device + #1 - Ain 0 Ain 0 Ain 1 Ain 1 Ain 2 Ain 2 Ain 3 Ain 3 Single ended . and include other circuitry for other factors such as temperature compensation. and well suited to simple design and construction projects. but fewer inputs are available. The amplifier is in an inverting configuration.with this arrangement the signal quality can be poorer. Figure 327 Single and Double Ended Inputs Signals from transducers are typically too small to be read by a normal analog input card. common. An example of a single ended signal amplifier is shown in Figure 328. the circuitry will be more complex. Amplifiers are used to increase the magnitude of these signals. so the output will have an opposite sign from the input. Double ended . . but more inputs are available.with this arrangement the signal quality can be better. Note: op-amps are used in this section to implement the amplifiers because they are inexpensive. When purchasing a commercial signal conditioner. Note that Rc converts a current to a voltage. V in + offset Ri Figure 328 A Single Ended Signal Amplifier A differential amplifier with a current input is shown in Figure 329. The voltage is then amplified to a larger voltage.page 409 +V Ro -V + Vout offset Rf Rg gain Vin Ri Rf + Rg V out = ---------------. R1 Iin Rc R2 + Rf Vout R3 R4 Figure 329 A Current Amplifier . If the resistor values are all made the same (and close to the value of R3) then the equation can be simplified. as shown in Figure 331. . + Vin + Vout + CMRR adjust Figure 330 A Differential Input to Single Ended Output Amplifier The Wheatstone bridge can be used to convert a resistance to a voltage output. The following amplifier amplifies the voltage difference. to create a high input impedance.page 410 The circuit in Figure 330 will convert a differential (double ended) signal to a single ended signal. The two input op-amps are used as unity gain followers. 4 SENSOR GLOSSARY Ammeter .Widely used industrial gage to measure pressure and vacuum.1. By measuring the displacement of the tip the pressure can be measured.1V out = V ( R 5 ) ----------------.1. Out- .page 411 +V R1 R3 R5 + R2 R4 Vout R2 1. ----.+ ----. Bourdon tube .laboratory-type instruments used to analyze chemical compounds and gases. the displacement of one side can be measured to determine pressure.transducer used to measure rotational speed. This often looks like a cylinder with a large radius (typ. 2R 3 Figure 331 A Resistance to Voltage Amplifier 14. Chromatographic instruments . It resembles a crescent moon. Inductance-coil pulse generator . When the pressure inside changes the moon shape will tend to straighten out. 2") but it is very thin (type 1/4").This is a flexible volumed that will expand or contract with a pressure change. It is normally part of a DMM Bellows .+ ----- – ----- R 1 + R 2 R 3 R 4 R 5 R 3 or if R = R 1 = R 2 = R 4 = R 5 R V out = V -------.A meter to indicate electrical current. It can be set up so that when pressure changes. meter to indicate electrical resistance Optical Pyrometer .Widely used to indicate torque. Ohmmeter . which can be converted into voltage. phototransistors. Linear-Variable-Differential transformer (LVDT) electromechanical transducer used to measure angular or linear displacement.device to measure temperature by sensing the thermal radiation emitted from the object. Output is pulse train. and other variables. photodiodes. including phototubes. Output is emf.widely used temperature transducer based on the Seebeck effect. Thermistor . in which a junction of two dissimilar metals emits emf related to temperature.page 412 put is pulse train. Radiation pyrometer .Also called a resistance thermometer. Potentiometer . and photoconductors. .liquid column gage used widely in industry to measure pressure. Operation of the transducer can be based on strain gages or other devices. Venturi Tube .5 SUMMARY • Selection of continuous sensors must include issues such as accuracy and resolution.A class of transducers used to measure pressure.device used to measure flow rates. except that it uses coils to generate magnetic fields. Typical output is pulse train.These use the interference of light waves 180 degrees out of phase to determine distances.instrument used to measure voltage Pressure Transducers . • Tachometers are usefule for measuring angular velocity. Typical output is voltage.Laboratory device used to measure flow. 14.Transducer used to measure vibration. Pitot Tube . Orifice Plate . Output is Voltage Manometer . Positive displacement Flowmeter . Thermocouple .this device is similar to an incremental encoder. Strain Gage . • Angular positions can be measured with potentiometers and encoders (more accurate). Piezoelectric Accelerometer . Interferometers . This is like a rotary transformer. an instrument used to measure temperature.Variety of transducers used to measure flow. force. Output is change in resistance due to strain.widely used flowmeter to indicate fluid flow rates Photometric Transducers .a class of transducers used to sense light. Turbine Flowmeter . Resolver .device to measure temperature of an object at high temperatures by sensing the brightness of an objects surface.transducer to measure flow rate. pressure. Typical sources of the monochromatic light required are lasers. Operation is based on change in resistance as a function of temperature. L. 14. E. smart machines. Delmar Publishers Inc. www. omron. moire fringes (high accuracy). • Flow rates can be measured with Venturi valves and pitot tubes. 360°/512seps. A Systems Approach to Programmable Controllers.) (ans. what voltage will be generated at 1200F? . LVDTs (limited range).com. • Pressure can be measured indirectly with bellows and Bourdon tubes. and thermistors. Theory and Implementation. Programmable Controllers.. If possible identify prices for the units. 14. banner. Industrial Text Co.page 413 • Linear positions can be measured with potentiometers (limited accuracy).com. 360°/4096 steps) 4.ab. What is the resolution of an absolute optical encoder that has six tracks? nine tracks? twelve tracks? (ans. F. temperature and displacement) 2. Sensors can be found at www.A.. Swainston.. Search the web for common sensor manufacturers for 5 different types of continuous sensors. If a thermocouple generates a voltage of 30mV at 800F and 40mV at 1000F. etc) 3. 1992. • Input signals can be single ended for more inputs or double ended for more accuracy. • Temperatures can be measured with RTDs.. Suggest a couple of methods for collecting data on the factory floor (ans. data bucket.6 REFERENCES Bryan. • Strain gauges and piezoelectric elements measure force. Sensor manufacturers include (hyde park. and Bryan. Name two types of inputs that would be analog input values (versus a digital value). 1988. allen bradley.omron.A.7 PRACTICE PROBLEMS 1. etc. (ans. • Accelerometers measure acceleration of masses. thermocouples. PLCs with analog inputs and network connections) 5. 360°/64steps. and the potentiometer reads 2.030 0. + 0V 300deg θw 2. A potentiometer is to be used to measure the position of a rotating robot link (as a voltage divider). = 5 ------------ count count deg 360 -------count rot R = -----------------.25T ref T ref = 200C V out = 0. The power supply connected across the potentiometer is 5. how many divisions are needed on the encoder? 0.1 ------------count θ input --------------.050V 6.765V.030 = α ( 800 – T ref ) 0.75T ref 50 = 0.= -------------------------α 0.= 50 ----θ output 1 deg deg θ input = 50 0. If the position of the geared down shaft needs to be positioned to 0.9deg 7.page 414 (ans.040 50µV α = -------------------------. + 0V 300deg θ w = 165. + V 1 = ( 5V – 0V ) ----------------.040 800 – T ref = 750 – 0.0 V.1 degrees. what voltage is required from the potentiometer? b) If the joint has been moved.040 = α ( 1000 – T ref ) 800 – T ref 1000 – T ref 1 --. a) b) (ans. what is the position of the potentiometer? θw 42degV out = ( V2 – V 1 ) ---------. The motor is driving a reducing gear box with a 50:1 ratio.1 ------------. a) To position the joint at 42 degrees. V out = α ( T – T ref ) 0.00005 ( 1200 – 200 ) = 0.= ------------1000 – 200 C (ans.7V θ max 300deg θw 2. and the total wiper travel is 300 degrees. deg θ output = 0.765V = ( 5V – 0V ) ----------------. A motor has an encoder mounted on it. The wiper arm is directly connected to the rotational joint so that a given rotation of the joint corresponds to an equal rotation of the wiper arm.= ----------------------.= 72 ------------rot deg ------------5 count . + 0V = 0.765V = ( 5V – 0V ) ----------------. 10. A potentiometer is connected to a PLC analog input card. The potentiometer can rotate 300 degrees.page 415 8. thus minizing the loses in resistor R. encoders cost more but have higher costs. What are the trade-offs between encoders and potentiometers? (ans. or other high impedance instrument can be used to measure this.accelerometers measure acceleration with a cantilevered mass on a piezoelectric element. DMM R V = Ks ω + - When the motor shaft is turned by another torque source a voltage is generated that is proportional to the angular velocity. strain gauge measures strain in a material using a stretching wire that increases resistance . What is the difference between a strain gauge and an accelerometer? How do they work? (ans. A dmm. 9. and the voltage supply for the potentiometer is +/-10V. (ans. Potentiometers have limited ranges of motion 11. Write a ladder logic program to read the voltage from the potentiometer and convert it to an angle in radians stored in F8:0. . This is the reverse emf. Use the model or equations for a permanent magnet DC motor to explain how it can be used as a tachometer. page 416 FS BTW Rack: 0 Group: 0 Module: 0 BT Array: BT9:0 Data File: N7:0 Length: 37 Continuous: no BT9:1/EN BTR Rack: 0 Group: 0 Module: 0 BT Array: BT9:1 Data File: N7:37 Length: 20 Continuous: no CPT Dest F8:0 Expression "20.10" CPT Dest F8:0 Expression "300.0 .0 * N7:41 / 4095.0 * (F8:0 + 10) / 20" RAD Source F8:0 Dest F8:1 BT9:0/EN BT9:1/DN . For example. CONTINUOUS ACTUATORS Topics: • Servo Motors. In general. when there is a choice.page 417 15. Most notably.1 INTRODUCTION Continuous actuators allow a system to position or adjust outputs over a wide range of values. Typical electric motors use at least one electromagnetic coil. These motors use the attraction and repulsion of magnetic fields to induce forces. called the rotor. Even in their simplest form. called the stator. These actuators also require sophisticated control techniques that will be discussed in later chapters. and sometimes permanent magnets to set up opposing fields. AC and DC • Stepper motors • Single axis motion control • Hydraulic actuators Objectives: • To understand the main differences between continuous actuators • Be able to select a continuous actuator • To be able to plan a motion for a single servo actuator 15. A control system is required when a motor is used for an application that requires . and hence motion. When a voltage is applied to these coils the result is a torque and rotation of an output shaft.2 ELECTRIC MOTORS An electric motor is composed of a rotating center. and a stationary outside. continuous actuators tend to be mechanically complex devices. a linear slide system might be composed of a motor with an electronic controller driving a mechanical slide with a ball screw. 15. There are a variety of motor configuration the yields motors suitable for different applications. as the voltages supplied to the motors will vary the speeds and torques that they will provide. it is better to use discrete actuators to reduce costs and complexity. The cost for such an actuators can easily be higher than for the control system itself. g.page 418 continuous position or velocity. Figure 333 shows a simplified model of a motor. which in turn drives the motor. PLC) desired position or velocity controller voltage/ current power amp amplified voltage/ current encoder motor Figure 332 A Typical Feedback Motor Controller 15. The controller with then generate an output. based on the system error. In any controlled system a command generator is required to specify a desired position.2.1 Brushed DC Motors In a DC motor there is normally a set of coils on the rotor that turn inside a stator populated with permanent magnets. The controller will compare the feedback from the encoder to the desired position or velocity to determine the system error.. The output is then passed through a power amplifier. When current is run through the wire loop it creates a magnetic field. The encoder is connected directly to the motor shaft to provide feedback of position. The magnetics provide a permanent magnetic field for the rotor to push against. A typical controller is shown in Figure 332. . command generator (e. as shown in Figure 334. and the induced magnetic field reverses to push against the permanent magnets. . The commutator is split so that every half revolution the polarity of the voltage on the rotor. In the figure the power is supplied to the rotor through graphite brushes rubbing against the commutator.page 419 I I magnetic field axis of rotation ω Figure 333 A Simplified Rotor The power is delivered to the rotor using a commutator and brushes. . the use of brushes increases resistance. In addition. and lowers the motors efficiency. These motors are losing popularity to brushless motors. The brushes are subject to wear. A feedback controller is used with these motors to provide motor positioning and velocity control. and the speed is proportional to the voltage.page 420 motor shaft brushes Top Front split commutator split commutator motor shaft brushes V+ power supply V- Figure 334 A Split Ring Commutator The direction of rotation will be determined by the polarity of the applied voltage. which increases maintenance costs. V max 0 50% duty cycle 50Veff = -------. When the voltage is on all the time the effective voltage delivered is the maximum voltage. the effective voltage is half the maximum voltage. The frequency of these waves is normally above 20KHz.V max 100 t Figure 335 Pulse Width Modulation (PWM) For Control .V max 100 t V max 0 20% duty cycle 20Veff = -------. This method is popular because it can produce a variable effective voltage efficiently. if the voltage is only on half the time.page 421 ASIDE: The controller to drive a servo motor normally uses a Pulse Width Modulated (PWM) signal.V max 100 t V max 0 0% duty cycle 0Veff = -------. So. The percentage of time that the signal is on is called the duty cycle. above the range of human hearing.V max 100 t V max 0 100% duty cycle 100 Veff = -------. As shown below the signal produces an effective voltage that is relative to the time that the signal is on. thus switching power to the motor. In this case the voltage polarity on the motor will always be the same direction. so the motor may only turn in one direction. V+ signal source com DC motor V+ V- power supply Figure 336 PWM Unidirectional Motor Control Circuit . The PWM signal switches the NPN transistor.page 422 ASIDE: A PWM signal can be used to drive a motor with the circuit shown below. Synchronous motor drives control the speed of the motors by synthesizing a variable frequency AC waveform.2.page 423 ASIDE: When a motor is to be controlled with PWM in two directions the H-bridge circuit (shown below) is a popular choice.2 AC Synchronous Motors A synchronous motor has the windings on the stator. but there is always some slip. When an AC voltage is applied to the stator coils an AC magnetic field is created. . as shown in Figure 338. the squirrel cage sets up an opposing magnetic field and the resulting torque causes the motor to turn. The squirrel cage is a cast aluminum core that when exposed to a changing magnetic field will set up an opposing field. This applies the positive voltage to the right side of the motor. It is possible to control the speed of the motor by controlling the frequency of the AC voltage. To reverse the direction the PWM signal is applied to the Vb inputs. +Vs Va Vb Vb Va -Vs Figure 337 PWM Bidirectional Motor Control Circuit 15. The motor is called synchronous because the rotor will turn at a frequency close to that of the applied voltage. or purchased as integrated circuits for smaller motors. In this arrangement the positive voltage is at the left side of the motor. These can be built with individual components. The rotor is normally a squirrel cage design. while the Vb inputs are held low. To turn the motor in one direction the PWM signal is applied to the Va inputs. while the Va inputs are held low. When the motor is used with a fixed frequency AC source the synchronous speed of the motor will be the frequency of AC voltage divided by the number of poles in the motor. but be rated for 3520 RPM. torque synchronous speed speed Figure 339 Torque Speed Curve for an Induction Motor . When a feedback controller is used the issue of slip becomes insignificant. The motor actually has the maximum torque below the synchronous speed. The torque speed curve for a typical induction motor is shown in Figure 339. For example a motor 2 pole motor might have a synchronous speed of (2*60*60/2) 3600 RPM.page 424 Controller Figure 338 Synchronous AC Motor Speed Control These drives should be used for applications that only require a single rotational direction. ) RPM = ideal motor speed in rotations per minute 15. f = power frequency (60Hz typ.. If the power supplied to the coils is an AC sinusoidal waveform. The changing waveforms are controller using position feedback from the motor to select switching times. A typical torque speed curve for a brushless motor is shown in Figure 340. etc. 4. 6. The applied voltage can also be trapezoidal. To continuously rotate these motors the current in the outer coils must alternate continuously. The speed of the motor is proportional to the frequency of the signal. Therefore there is no need to use brushes and a commutator to switch the polarity of the voltage on the coil.) p = number of poles (2. The lack of brushes means that these motors require less maintenance than the brushed DC motors.page 425 f120 RPM = ---------p where. torque speed .2.3 Brushless DC Motors Brushless motors use a permanent magnet on the rotor. the motor will behave like an AC motor. and user wire windings on the stator.. which will give a similar effect. when the motor is turned on we might apply the voltages as shown in line 1. then 1. They move one step at a time with a typical step size of 1. The unipolar uses center tapped windings and can use a single power supply. unipolar and bipolar. Reversing the sequence causes the motor to turn in the opposite direction. then 3. The bipolar motor is simpler but requires a positive and negative supply and more complex switching circuitry.4 Stepper Motors Stepper motors are designed for positioning. then 4. There are two basic types of stepper motors. Other motors are designed for step sizes of 2.2. The dynamics of the motor and load limit the maximum speed of switching. . When not turning the output voltages are held to keep the motor in position.8 degrees giving 200 steps per revolution. 1 a b 1a 1b a b 2a 2b unipolar 2 bipolar Figure 341 Unipolar and Bipolar Stepper Motor Windings The motors are turned by applying different voltages at the motor terminals. 2. For example.page 426 Figure 340 Torque Speed Curve for a Brushless DC Motor 15. The voltage change patterns for a unipolar motor are shown in Figure 342. 15 and 30 degrees.5. this is normally a few thousand steps per second. etc. 5. as shown in Figure 341. To rotate the motor we would then output the voltages on line 2. Stepper motors are relatively weak compared to other motor types. torque speed Figure 343 Stepper Motor Torque Speed Curve The motors are used with controllers that perform many of the basic control functions. 3. or it is accelerated too fast. At the minimum a translator controller will take care of switching the coil voltages.. When the motor slips it will move a number of degrees from the current position. 3. 2. eg.. Figure 342 Stepper Motor Control Sequence for a Unipolar Motor Stepper motors do not require feedback except when used in high reliability applications and when the dynamic conditions could lead to slip. 1. 2. 4. The slip cannot be detected without position feedback. . and then back to 1. In addition they have different static and dynamic holding torques. The torque speed curve for the motors is shown in Figure 343. 4.. A stepper motor slips when the holding torque is overcome. If a set of outputs is kept on constantly the motor will be held in position.page 427 1a controller 2a 1b 2b stepper motor Step 1 2 3 4 1a 1 0 0 1 2a 0 1 1 0 1b 1 1 0 0 2b 0 0 1 1 To turn the motor the phases are stepped through 1. 4.. These motors are also prone to resonant conditions because of the stepped motion control. To reverse the direction of the motor the sequence of steps can be reversed. . translators . The remainder of the provides the hydraulic power to drive the system. such as distance. The controller examines the position of the hydraulic system. Other types of controllers also provide finer step resolutions with a process known as microstepping. This controls the flow of fluid to the actuator. When used for continuous actuation they are mainly used with position feedback. and drivers a servo valve. more expensive. Newer. valve designs use a scheme like pulse . controller valve hydraulic power supply position sensor position hydraulic actuator sump Figure 344 Hydraulic Servo System The valve used in a hydraulic system is typically a solenoid controlled valve that is simply opened or closed.3 HYDRAULICS Hydraulic systems are used in applications requiring a large amount of force and slow speeds.the user indicates direction and number of steps to take microstepping . and convert them to individual steps.page 428 A more sophisticated indexing controller will accept motion parameters.the user indicates maximum velocity and acceleration and a distance to move indexer . This effectively divides the logical steps described in Figure 342 and converts them to sinusoidal steps.each step is subdivided into smaller steps to give more resolution 15. An example system is shown in Figure 344. A stepping motor is to be used to drive each of the three linear axes of a cartesian coordinate robot. Ball Screws .5 SUMMARY • AC motors work at higher speeds • DC motors work over a range of speeds • Motion control introduces velocity and acceleration limits to servo control • Hydraulics make positioning easy 15. These are normally used with slides to bear mechanical loads.4 OTHER SYSTEMS The continuous actuators discussed earlier in the chapter are the moroe common types. Velocities can also be controlled using fast acting valves.025” a) to achieve this control resolution how many step angles are required on the stepper motor? b) What is the corresponding step angle? c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3. The primary difference is that they have a limited travel and their cost is typically much higher than other linear actuators.rotation is converted to linear motion using balls screws.air controlled systems can be used for positioning with suitable feedback. or an SCR can be used to supply part of an AC waveform. These are low friction screws that drive nuts filled with ball bearings. 15. 15. Heaters .125”.a linear motor works on the same principles as a normal rotary motor.6 PRACTICE PROBLEMS 1.0”/sec.to control a heater with a continuous temperature a PWM scheme can be used to limit a DC voltage. It is desired that the control resolution of each of the axes be 0. Pneumatics . Linear Motors . . The motor output shaft will be connected to a screw thread with a screw pitch of 0.page 429 with modulation (PWM) which open/close the valve quickly to adjust the flow rate. For the purposes of completeness additional actuators are listed and described briefly below. For the stepper motor in the previous question. How many pulses are required to rotate the motor through three complete revolutions? If it is desired to rotate the motor at a speed of 25 rev/min. For each pulse received from the pulse train source the motor rotates through a distance of one step angle.025 --------rotR stepθ = -. a) step pulses = ( 3rot ) 5 --------. a pulse train is to be generated by a motion controller. 5 --------. and accuracy. rot b) c) rotdeg θ = 0.025 --------step 2.025 --------step Thus step 1 -----------------.page 430 (ans a) inP = 0. = 125 -----------.= 0.2 --------step in 0.2 --------.= 25 -------. For each pulse received from the pulse train source the motor rotates through a distance of one step angle.= 2. a) How many pulses are required to rotate the motor through three complete revolutions? b) If it is desired to rotate the motor at a speed of 25 rev/min.125 -----. = 15steps rot rotstep steps 1min steps step pulses --------------.= 125 ------------ -----------.= 72 --------step step in 3 ---steps s PPS = -----------------------. as discussed in class. The step angle of the motor is 10 degrees. a) What is the resolution of the stepper motor? b) Relate this value to the definitions of control resolution. The step angle of the motor is 10 degrees.= -------------------------. spatial resolution. a pulse train is to be generated by the robot controller. a) What is the resolution of the stepper motor? .2 --------step P in0.= 5 --------rot rot0. A stepping motor is to be used to actuate one joint of a robot arm in a light duty pick and place application. A stepper motor is to be used to actuate one joint of a robot arm in a light duty pick and place application. rot in R = 0. c) For the stepper motor.= 120 -----------s in 0. what pulse rate must be generated by the robot controller? (ans.125 -----.08 -------- min rot 60s min min s s b) 3. what pulse rate must be generated by the robot controller? 4. 125”.0”/sec. Explain the differences between stepper motors. and accuracy. variable frequency induction motors and DC motors using tables. 6. spatial resolution. (ans.page 431 b) Relate this value to the definitions of control resolution. It is desired that the control resolution of each of the axes be 0.025” a) To achieve this control resolution how many step angles are required on the stepper motor? b) What is the corresponding step angle? c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3. stepper motor vfd dc motor speed very low speeds limited speed range wide range torque low torque good at rated speed decreases at higher speeds . 5. A stepping motor is to be used to drive each of the three linear axes of a cartesian coordinate robot. The motor output shaft will be connected to a screw thread with a screw pitch of 0. as discussed in class. ramp inputs and other simple inputs to determine the system response. maximum acceleration and maximum velocity. A simple motion control system is used to generate setpoints over time.1 INTRODUCTION A system with a feedback controller will attempt to drive the system to a state described by the desired input. An example of a motion control system is shown in Figure 345.page 432 16. MOTION CONTROL Topics: • Motion controllers • Motion profiles. trapezoidal and smooth • Gain schedulers Objectives: • To understand single and multi axis motion control systems. In practical applications this setpoint needs to be generated automatically. The setpoint scheduler will then use a realtime clock to output these setpoints to the motor drive. and times they should be output. In earlier chapters we simply chose step inputs. . 16. such as a velocity. The motion profile is then used to generate a set of setpoints. The motion controller will accept commands or other inputs to generate a motion profile using parameters such as distance to move. ) For position control we want a motion that has a velocity of zero at the start and end of the motion. (Note: in motion controllers it is more common to used encoder pulses. .2 0.6 0.page 433 motion controller motion commands Motor Setpoint Generator Setpoint Scheduler Servo Drive setpoint schedule motion profile ω 0..1 0... Figure 345 A motion controller The combination of a motion controller. instead of degrees.4 . When there is more than one drive and actuator the system is said to have multiple axes. and accelerates and decelerates smoothly..2 0.3 0.4 0. for positions velocities.0 0..2 MOTION PROFILES A simple example of a motion profile for a point-to-point motion is shown in Figure 346. Complex motion control systems such as computer controlled milling machines (CNC) and robots have 3 to 6 axes which must be moved in coordination. 16..4 0. In this example the motion starts at 20 deg and ends at 100 deg.4 t 0 0. drive and actuator is called an axis. etc.. setpoint 0.4 .2 0.8 t (s) 0 0. ω ( deg ) ω max α max 0 0 where. The top level of the trapezoid is the maximum velocity. t dec = the acceleration and deceleration time s t max = the times at the maximum veloci y t t total = the total motion time Figure 347 An example of a velocity profile . This profile gives a continuous acceleration. t acc t max t dec t total – α max t (s) ω max = the maximum velocity α max = the maximum acceleration t acc. The slope of the initial and final ramp are the maximum acceleration and deceleration.page 434 θ ( deg ) 100 20 t (s) Figure 346 An example of a desired motion (position) A trapezoidal velocity profile is shown in Figure 347. The area under the curve is the total distance moved. but there will be a jerk (third order derivative) at the four sharp corners. Some controllers allow the user to use the acceleration and deceleration times instead of the maximum acceleration and deceleration. and the velocity profile becomes a triangle.– ---------ω max 2 2 (1) (2) (3) (4) Note: if the time calculated in equation 4 is negative then the axis never reaches maximum velocity. The system moves for 7.page 435 The basic relationships for these variables are shown in Figure 348. The equations can be used to find the acceleration and deceleration times. The resulting velocity profile will be a triangle.5 seconds at the maximum velocity. These equations can also be used to find the time at the maximum velocity.+ t max + ------.t dec ω max = ω max ------. Figure 348 Velocity profile basic relationships For the example in Figure 349 the move starts at 100deg and ends at 20 deg. 2 2 2 2 t dec θ . If this time is negative it indicates that the axis will not reach the maximum velocity. The acceleration and decelerations are completed in half a second. ω max t acc = t dec = ----------α max t total = t acc + t max + t dec t acc t dec 1 1 θ = -.– ---------. . and the acceleration and deceleration times must be decreased.t acc t max = ----------.t acc ω max + t max ω max + -. In place of this the acceleration and deceleration times can be calculated by using the basic acceleration position relationship.5s Figure 349 Velocity profile example The motion example in Figure 350 is so short the axis never reaches the maximum velocity.= 7.5s 0.– ---------.= --------------. The result in this example is a motion that accelerates for 0. This is made obvious by the negative time at maximum velocity.5s t max = ----------.– ---------.5s = 8.– --------.5s + 7. t acc = t dec deg 10 -------ω max s = ----------.= 0.5s α max deg 20 -------2 s θ = θ end – θ start = 20deg – 100deg = – 80deg t dec θ .5s + 0.page 436 Given. θ start = 100deg deg ω max = 10 -------s θ end = 20deg deg α max = 20 -------2 s The times can be calculated as.316s and then decelerates for the same time.– --------.t acc 80deg 0.5s ω max 2 2 deg 2 2 10 -------s t total = t acc + t max + t dec = 0. .= --------------. = αmax 2deg --------------.α max t 2 acc 2 2 t acc = θ ----------.= --------------.5s 0. the setpoints for motion can be calculated with the equations in Figure 351.= -.3 s ω max 2 2 deg 2 2 10 -------s The time was negative so the acceleration and deceleration times become.= 0.– ---------.= deg 20 -------2 s 0.– --------.5s α max deg 20 -------2 s θ = θ end – θ start = 22deg – 20deg = 2deg t dec θ . 1 θ -.316s 2 t max = 0s Figure 350 Velocity profile example without reaching maximum velocity Given the parameters calculated for the motion.= --------------. . deg 10 -------ω max s t acc = t dec = ----------.1s = 0.– --------.– ---------.t acc 2deg 0.= – 0.5s t max = ----------.page 437 Given. θ start = 20deg deg ω max = 10 -------s θ end = 22deg deg α max = 20 -------2 s The times can be calculated as. α max ( t – t max – t acc ) + θ start 2 2 t acc + t max + t dec ≤ t θ ( t ) = θ end Figure 351 Generating points given motion parameters A subroutine that implements these is shown in Figure 352. which will then be used elsewhere to guide the mechanism. .page 438 Assuming the motion starts at 0s. 0s ≤ t < t acc 1 2 θ ( t ) = -. In this subroutine the time is looped with fixed time steps.α max t + θ start 2 t acc ≤ t < t acc + t max 1 2 θ ( t ) = -. The position setpoint values are put into the setpoint array.α max t acc + ω max t max + -.α max t acc + ω max ( t – t acc ) + θ start 2 t acc + t max ≤ t < t acc + t max + t dec 1 1 2 2 θ ( t ) = -. t_total. double acc_max.5*acc_max*(t-t_2)*(t-t_2) + theta_start. double theta_start. t += t_step){ if( t < t_1){ setpoint[*count] = 0. } Figure 352 Subroutine for calculating motion setpoints In some cases the jerk should be minimized. } *count++. *count = 0. This can be achieved by replacing the ulceration ramps with a smooth polynomial. } setpoint[*count] = theta_end. double setpoint[]. In this case two quadratic polynomials will be used for the acceleration.page 439 void generate_setpoint_table(double t_acc. for(t = 0. double theta_end. t_1. double vel_max.0. } else { setpoint[*count] = theta_end. . *count++. } else if ( (t >= t_1) && (t < t_2)){ setpoint[*count] = 0. int *count){ double t. and another two for the deceleration. t <= t_total. t_2 = t_acc + t_max. double t_step. t_2.5*acc_max*t_acc*t_acc + vel_max*(t_max) + 0.5*acc_max*t_acc*t_acc + vel_max*(t .5*acc_max*t*t + theta_start. } else if ( (t >= t_2) && (t < t_total)){ setpoint[*count] = 0. as shown in Figure 353. t_total = t_acc + t_max + t_acc. t_1 = t_acc. double t_max.t_1) + theta_start. page 440 ω ( deg ) ω max α max 0 0 where. t dec = the acceleration and deceleration times t max = the times at the maximum veloci y t t total = the total motion time Figure 353 A smooth velocity profile An example of calculating the polynomial coefficients is given in Figure 354. t acc t max ω ( t ) = At + Bt + C 2 – α max t (s) t dec t total ω max = the maximum velocity α max = the maximum acceleration t acc. The curve found is for the first half of the acceleration. . It can then be used for the three other required curves. θ start θ end ω max α max The constraints for the polynomial are.= ----------------------.≤ t < t acc 2 Figure 354 A smooth velocity profile example .ω ------.( t acc – t ) 4ω max α max 2 2 ω ( t ) = ω max – -------------. α max The equation for the first segment is.ω ( 0 ) = 0 ---. 0 = A0 + B0 + C 0 = 2A0 + B ω max = At acc 2 2 ∴C = 0 ∴B = 0 ω max A = ----------2 t acc α max A = ----------2t acc 2ω max t acc = -------------αmax 2 α max = 2At acc ω max α max A = ----------.= ----------2 2t acc t acc α max α max α max A = ----------.( t – 2t acc t + t acc ) 4ω max 2 2 2 t acc 0 ≤ t < ------2 The equation for the second segment can be found using the first segment. = α max dt dt 2 These can be used to calculate the polynomial coefficients. = ---------- 2 2 dd.page 441 Given.= -------------2t acc 2ω max 4ω max 2 -------------.t acc ---.t 4ω max α max 2 ω ( t ) = ω max – -------------. t acc ω max ω( 0) = 0 ω ------. t acc ------. α max 2 ω ( t ) = -------------. 1 Slew Motion When the individual axis of a machine are not coordinated this is known as slew motion. ------. 80. t acc ------2 2 2 2 θ acc α max 3 = ----------------.– ----------------. but finish at separate times. Consider the example in Figure 356. θ acc = ∫0 t acc ------2 t acc α max α max -------------.– ------.------.acc = ----------------. is.t 12ω max 2 3 2 0 α max t 3 2 2 .3.– t acc t + t acc t 4ω max 3 2 t acc acc α max t acc αmax t acc 3 t acc t 3 .+ ω max t – -------------.+ ------. 12ω max 8 4ω max 3 2 4ω max 24 4 2 θ acc θ acc αmax 3 α max 3 7α max 3 ω max t acc = ----------------. A three axis motion is required from the starting angles of (40. ( θ – 2θ acc ) t max = -------------------------ω max Figure 355 A smooth velocity profile example (cont’d) 16.t 2 dt + ∫ ω max – -------------. the area under the curves.t acc 96ω max 12ω max 96ω max 2 – 14αmax 3 ω max t acc = -------------------. We could extend the motion of the slower joints so that the motion of each joint would begin and end together. The maximum absolute acceler- . and must end at (120.( t 2 – 2t acc t + t 2 ) dt acc tacc 4ω max 4ω max ------.page 442 The distance covered during acceleration.– t acc + t acc – ω max ------.t acc – ----------------. 0.3 MULTI AXIS MOTION In a machine with multiple axes the motions of individual axes must often be coordinated. 0)deg.t acc + -------------------. A simple example would be a robot that needed to move two joints to reach a new position. ------.. --. -40)deg. Each of the axes will start moving at the same time.t acc + -------------------96ω max 2 2 2 2 2 2 3 t acc ------2 2 3 3 α max t acc t acc 3 so the time required at the maximum velocity is.+ ω max t acc – -------------.+ -------------. 16. 4s. The fastest motion is complete in 1. and the maximum velocities are (20.13s. 100. These are done in vector format for simplicity.page 443 ations and decelerations are (50. while the longest motion takes 4. 50) degrees/sec. All of the joints reach the maximum acceleration. Joint angle (degrees) 180 90 time(sec) θ3 -90 Joint velocity (degrees/sec) ω max – α max θ2 θ1 t acc t max t dec Figure 356 Multi-axis slew motion The calculations for the motion parameters are shown in Figure 357. 40. 150) degrees/sec/sec. . = ( 4. 20 40 50 ω max t max = ( 3. 0. t total = t acc + t max + t dec = ( 4. 8.50t acc = t dec = ----------./deccel.46668 )sec.4 ( 20 ) 0. 0 – 80. 2 2 2 2 The next step is to examine the moves specified.1 . --------..4. ω max 20 40.page 444 The area under the velocity curve is the distance (angle in this case) travelled. θ move – 2θ acc 80 – 2 ( 4 . and increase times. ---------------------. -------------------------------. The slew motion example can be extended to be slew motion where all joints finish their motion at 4.= ----------------.3. 2.6. 0. 0 – ( – 40 ) ) = ( 80.4 ( 40 ) 0. – 80. 0.1..4s. This can be done for each joint by finding a multiplying factor to reduce accelerations and velocities. ----------------. 1. 40 )deg. . and deceleration and the time during acceleration.80 – 2 ( 8 ) 40 – 2 ( 8.4. 50 100 150 αmax t acc ω max.333 ( 50 ) θ acc. ----------------------. = θ dec. -------- = ( 0. First we can determine the distance covered during acceleration.13 )s Figure 357 Calculated times for the slew motion 16.= ---------------------. and deceleration. This is essential in devices such as CNC milling machines. as shown in Figure 358.333 )sec.4. 1. 0.4.333 ) ) t max = ---------------------------------. Remove the angles covered during accel.Interpolated Motion In interpolated motion the faster joints are slowed so that they finish in coordination with the slowest. θ move = θ end – θ start = ( 120 – 40.. 8. = --------------------------.= -----.33 )deg.6.. If this did not occur a straight line cut in the x-y plane would actually be two straight lines.vel. and find the travel time at maximum velocity.. 55 0. 1. 10.2 Motion Scheduling After the setpoint schedule has been developed.73.13s ) F = ------------------------------------------. .page 445 The longest time is 4.3.25.55 ( 100 ).6. A diagram of a scheduler is shown in Figure 359. = ( 0.80 ) 1 0. 0. it is executed by the setpoint scheduler. 2. velocities and times..4s.55 0.6 1. 0.. 0. --------. 0.4.. The servo drive is implemented with an algorithm such a PID control.0. 0.28 ) 1 0.14 ) 0. 1. 0.26 ) 4. The setpoint scheduler will use a clock to determine when an output setpoint should be updated. and this is used to calculate adjustment factors. 2.= ( 1.55. 30. The frequency of the interrupt clock should be smaller than or equal to the time steps used to calculate the setpoints. 13 ) α max = ( 1 ( 50 ). -----------. -----------.6.4s These can be used to calculate new maximum accelerations.26 2 2 2 Figure 358 Interpolated motion 16.26 ( 150 ) ) = ( 50. When enough time has elapsed the routine will move to the next value in the setpoint table.55 ( 40 ).4s.26 3. 22. = ( 3. ω max = ( 1 ( 20 ).467 t max = -----.0. 0. --------. ( 4.4.26 ( 50 ) ) = ( 20.333 t acc = -----.91. In this system the setpoint scheduler is an interrupt driven subroutine that compares the system clock to the total motion time.. 1.4.4 0. This then leads to a situation where the axis is always chasing the target value. as shown in Figure 360. This leads to small errors.page 446 Time based interrupt routine Setpoint table Choose new point from trajectory table Servo motor routine runs for each axis Read θ desired θ desired Interrupt Clock Compute error Output actuator signal Return Figure 359 A setpoint scheduler The output from the scheduler updates every time step. . • Trapezoidal and smooth motion profiles were presented. • Values from the setpoints can then be output by a scheduler to drive an axis.page 447 speed actual position trajectory table time trajectory table time step position required actual time Figure 360 Errors in path following 16. a) Develop a motion profile for a joint that moves from -100 degrees to 100 degrees with a maximum velocity of 20 deg/s and a maximum acceleration of 100deg/s/s. .4 SUMMARY • Axis limits can be used to calculate motion profiles.5 seconds for the entire motion. • Motion profiles can be used to generate setpoint tables. b) Develop a setpoint table that has values for positions every 0. 16.5 PRACTICE PROBLEMS 1. 5 1.5s + 20 -------.= 0.= -----------------.0 7.5 10.0 9.0 10. Find a smooth path for a robot joint that will turn from θ= 75° to θ = -35° in 10 seconds.5s ) = – 92deg + 10deg s 2.0 4.5s = – 92deg deg θ 1.0 3.0 deg 200deg – 20 -------.100 -------.5 11.5 2.5 9.page 448 (ans.2s ) – 100deg 2 2 s s θ0. deg 20 -------ω max s t acc = t dec = ----------.5 3.0 8.5s – 0.5 7.8s + 0.0 2.0 6.2s ∆θ – ω max t acc s = --------------------------------.0 5.5 6.0s = θ 0.5 5.5 8.0.5 4.8s ω max deg 20 -------s = t acc + t max + t dec = 0. deg deg ω max = 20 -------α max = 100 -------2 s s The motion times can be calculated.0 0.2s angle (deg) -100 -92 -82 -72 -62 -52 -42 -32 -22 -12 -2 8 18 28 38 48 58 68 78 88 98 100 100 1 deg deg 2 θ 0.0 1.( 0.2s ) + 20 -------.( 0.2s = 10.2s α max deg 100 -------2 s ∆θ = 100 – ( – 100 ) = 200° t max t total t (s) 0. Given. Do this .2s + 9.5s = -.( 0.= 9.= -------------------------------------------------. Joints 1. Each of the joints has a maximum velocity of 20 deg/s. and a maximum acceleration of 30 deg/s/s. Develop a smooth velocity profile for moving a cutting tool that starts at 1000 inches and moves to -1000 inches.0 seconds along the path for a total motion time of 10 seconds.page 449 by developing an equation then calculating points every 1. . 2 and 3 move to 40 deg. 100deg and -50deg respectively. a) slew motion b) interpolated motion 4. Develop the motion profiles assuming. Assuming all of the joints start at an angle of 0 degrees. Paths are to be planned for a three axis motion controller. 3. The maximum velocity is 100 in/s and the maximum acceleration is 50in/s/s. ELECTROMECHANICAL SYSTEMS Topics: Objectives: 17. The fields can allow energy storage.2 MATHEMATICAL PROPERTIES • Magnetic fields have direction. .page 450 17. 17. As a result we must pay special attention to directions. or transmit forces.1 Induction • Magnetic fields pass through space.2. • 17. and vector calculations.1 INTRODUCTION • Magnetic fields and forces are extremely useful. page 451 • resistivity of materials decreases with temperature • Flux density. For an infinitely long straight conductor Wb B = Flux density ------.or Tesla 2 m I = Current in the conductor (A ) r = radial distance from the conductor • Flux and flux density. . Φ = Flux density ( Wb ) A = Cross section are a • Permeability. IB = -------2πr where. B Φ = -A where. .page 452 B µ = --H –7 H µ 0 = 4π10 --m µ = µr µ0 where. m µ 0 = permeability of free space µ r = relative permeability of a material µ = permeability of a material • Permeability is approximately linear for smaller electric fields. but with larger magnetic fields the materials saturate and the value of B reaches a maximum value.5 linear saturation H 4000 Figure 361 Saturation for a mild steel (approximately) • When a material is used out of the saturation region the permeabilities may be written as reluctances. B 1. A H = Magnetic field intensity --. Φ dt where. For a coil e = the potential voltage across the coil N = the number of turns inthecoil • The basic property of induction is that it will (in the presence of a magnetic field) convert a changing current flowing in a conductor to a force or convert a force to a current flow from a change in the current or the path. de = N ---.page 453 LR = -----µA where. . R = reluctance of a magnetic path L = length of a magnetic path A = cross section area of a magnetic path • Faraday’s law. page 454 F = ( I × B )L F = ( L × B )I B NOTE: As with all cross products we can use the right hand rule here. I. L F where. L = conductor length F = force (N) The FBD/schematic equivalent is. I M F Figure 362 The current and force relationship • We will also experience an induced current caused by a conductor moving in a magnetic field. This is also called emf (Electro-Motive Force) . By applying voltage the wires push back against the magnetic field.3 EXAMPLE SYSTEMS • These systems are very common.page 455 e m = ( v × B )L where. . e m = electromotive force (V) φ = magnetic flux (Wb . The simplest motor has a square conductor loop rotating in a magnetic field. take for example a DC motor.webers) v = velocity of conducto r The FBD/schematic equivalent v e + - B v e M Figure 363 Electromagnetically induced voltage • Hysteresis 17. page 456 y x z 2 4 b 3 a axis of rotation ω B 1 5 I I Figure 364 A motor winding in a magnetic field . e m1 = e m5 = 0V Figure 365 Calculation of the motor torque . Therefore they both have an emf (voltage) of 0V.to -2 2 de m3 = ( V × B )dL – rω sin ( ωt ) rω cos ( ωt ) 0 0 B = –B 0 V3 = e m3 = ∫–b-2 b -2 – rω sin ( ωt ) 0 rω cos ( ωt ) × – B dr 0 0 0 dr 0 Brω sin ( ωt ) b -2 e m3 = ∫–b-2 2 b -2 e m3 r = B ---.page 457 For wire 3.ω sin ( ωt ) 2 b – -2 b b 2 = Bω sin ( ωt ) -- – – -- = 0 2 2 For wires 1 and 5.– -. r cos ( ωt ) P 3 = r sin ( ωt ) b b . By symmetry. the two wires together will act like wire 3. ω cos ( ωt ) 2 e m2 = ∫0 a b dl = aB -. or a given voltage will cause the loop to rotate (motor).ω cos ( ωt ) 2 2 0toa 0 de m2 = ( V × B )dL a 0 B = –B 0 e m2 = ∫0 b – -. If we didn’t do this the loop the torque on the loop would reverse for half the motion.sin ( ωt ) -.ω sin ( ωt ) 2 0 × – B dl b -. e m = e m1 + e m2 + e m3 + e m4 + e m5 b b e m = 0 + aB -. but not rotate fully.cos ( ωt ) – -. To make the torque push consistently in the same direction we need to reverse the . as the loop is rotated a voltage will be generated (a generator).ω cos ( ωt ) + 0 2 2 e m = aBbω cos ( ωt ) Figure 366 Calculation of the motor torque (continued) • As can be seen in the previous equation. b b -.ω sin ( ωt ) 2 2 P2 = b V2 = b -.ω cos ( ωt ) 2 0 0 0 0 b B -. • In this arrangement we have to change the polarity on the coil every 180 deg of rotation.cos ( ωt ) 2 e m4 = e m2 For the total loop.ω cos ( ωt ) + 0 + aB -. The result would be that the motor would swing back and forth.page 458 For wire 2 (and 4 by symmetry). It is basically a split ring with brushes. The device that does this is called a commutator. • Consider a motor that is braked with a constant friction load of Tf. F w = ( I × B )L = IBa b T w = 2 F × -- = Fb = IBab 2 ∑M = T w – T f = Jα IBab – T f = Jα Figure 367 Calculation of the motor torque (continued) • We still need to relate the voltage and current on the motor. But a change in voltage will also change the current in the windings. say in torque/force will change the velocity and hence the voltage.page 459 applied voltage for half the cycle. and hence the force. To add this into the equation we only need to multiply by the number of loops in the winding. e m = NaBbω cos ( ωt ) • As with most devices the motor is coupled. etc. This means that one change. e m = aBbω cos ( ωt ) • Real motors also have more than a single winding (loop of wire). . The equivalent circuit for a motor shows the related components. L A = equivalent resistance and inductance of windings d= e A – I A R A – L A ---. e A = voltage and current applied to the armature (motor supply ) R A. IBab – T f = Jα Figure 368 Calculation of the motor torque (continued) • Practice problem. I A.I A – e m = 0 dt ∑V we can now add in the other equations. de A – I A RA – L A ---. .page 460 IA RA + LA em eA + - where.I A – NaBbω cos ( ωt ) = 0 dt and recall the previous equation. .page 461 Write the transfer function relating the displacement ’x’ to the current ’I’ a N M Ks S Kd R x I Figure 369 Drill problem: Electromotive force • Consider a motor with a separately excited magnetic field (instead of a permanent magnet there is a coil that needs a voltage to create a magnetic field). The model is similar to the previous motor models. but the second coil makes the model highly nonlinear. 4 SUMMARY • 17. .5 PRACTICE PROBLEMS 1.page 462 17. More correctly we should consider atmospheric pressure (gauge pressure).1 SUMMARY • Fluids are a popular method for transmitting power (hydraulics). FLUID SYSTEMS Topics: Objectives: 18. • Fluids observe some basic laws. The pressure may be expressed as an absolute value.2 MATHEMATICAL PROPERTIES • Fluids do work when we have a differential pressure on a surface. by applying a pressure at one point. 18.page 463 18. w = flow rate p = pressure . Basically. we can induce flow through a pipe/value/orifice. • When we deal with fluids we approximate them as incompressible. w = flow rate through the pipe ∆p = pressure difference across valve/pipe K = a constant specific to the pipe/valve/orifice NOTE: In this case the relationship between pressure drop and flow are non-linear. Of similar interest is the resistance of a value. We can do a non-linear analysis (e.2. We have two choices if we want to analyze this system.g. Valves usually restrict flow by reducing an area for fluid to flow through. integration) 2. • A simple form of valve is a sliding plunger. This is only good for operation near the chosen valve position. 1. As the flow rate changes significantly the accuracy of the equation will decrease. In reality. w ∆p ≈ R ( w – w ) ∆ ( ∆p ) R ≈ --------------∆w w R = 2 ----2 K w ∆p ∆ ( ∆p ) ∆w Figure 370 Fluid flow resistance • Resistance may also result from valves. every fluid flow experiences some resistance. The valve below is called a two way . We can approximate the equation with a linear equation.1 Resistance • If fluid flows freely.page 464 18. w = K ∆p where. we say it is without resistance. Even a simple pipe has resistance. . and causes it to actuate. Fluid in to cylinder Fluid out NOTE: For this type of valve the fluid in is typically under pressure. The fluid out is typically not under pressure. or some other force to return it and force the fluid out.page 465 valve because it will allow fluid to flow in or out. When used this way a cylinder needs a spring. When the valve slide is up the pressure is applied to the cylinder. and just returns fluid to a reservoir tank. Figure 371 Fluid servo valve • Four way valve allow fluid force to be applied in both directions of a cylinder motion. Other factors also affect the pressure. but at the bottom the mass of the fluid above creates a hydrostatic pressure. or whether or not the top of the tank is open. .2.2 Capacitance • Fluids are often stored in reservoirs or tanks. In a tank we have little pressure near the top. such as the shape of the tank.page 466 to reservoir fluid in fluid in to reservoir advance no motion retract Figure 372 Fluid flow control valves 18. • To calculate the pressure we need to integrate over the height of the fluid. page 467 A Fp h F p + Fg Fg Fp + Fg F p + Fg Fg P = ----A F g = ρV = ρgAh ρgAh P = ------------- = ρgh A Figure 373 Pressures on fluid elements • Consider a tank as a capacitor. As fluid is added the height of the fluid rises, and the hydrostatic pressure increases. Hence we can pump fluid into a tank to store energy, and letting fluid out recovers the energy. A very common application of this principle is a municipal water tower. Water is pumped into these tanks. As consumers draw water through the system these tanks provide pressure to the system. When designing these tanks we should be careful to keep the cross section constant (e.g. a cylinder). If the cross section varies then the fluid pressure will not drop at a linear rate and you won’t be able to use linear analysis techniques (i.e., Laplace and State Space). • The mathematical equations for a constant cross section tank are, AC = ----ρg dw = C ---- p dt page 468 18.2.3 Power Sources • As with most systems we need power sources. In hydraulics these are pumps that will provide pressure and/or flow to the system. • One type of pump uses a piston. Fluid In Normally closed inlet valve Fluid Out piston Normally Closed Valve In this common form of piston pump, the piston rod is drawn back creating suction that holds the valve closed, and pulls fluid into the chamber. When the cylinder is full of fluid the piston motion is reversed, creating a pressure, and forcing the inlet vale closed, and the outlet valve open, and the fluid is pumped out. The fluid volume can be controlled by using the cylinder size, and piston strokes Figure 374 A piston driven hydraulic pump • A geared hydraulic pump is pictured below. Other types use vanes and pistons. page 469 a geared hydraulic pump Figure 375 A gear driven hydraulic pump • Vane based pumps can be used to create fluid flow. As the pump rotates the vanes move to keep a good seal with the outer pump wall. The displacement on the advance and return sides are unequal (aided by the sliding vanes). The relative displacement across the pump determines the fluid flow. Fluid in As the center core of the pump rotates, the vanes will slide in and out. Fluid is trapped between vanes. On the inlet side the volume enclosed by the vanes expands, drawing fluid in. On the outlet side the volume between vanes decreases, forcing fluid out. Fluid out page 470 Figure 376 A vaned hydraulic pump • As with the resistance of valves, these are not linear devices. It is essential that we linearize the devices. To do this we look at the pressure flow curves. (Note: most motors and engines have this problem) ∆p ∆p ∆ ( ∆p ) K = --------------∆w 1 w ≈ --- ( ∆p – ∆p ) K ∆ ( ∆p ) w ∆w Figure 377 Linearizing a hydraulic valve ????? 18.3 EXAMPLE SYSTEMS • We can model a simple hydraulic system using the elements from before. Consider the example below, pump valve tank Figure 378 A hydraulic system example page 471 For the pump the relationship is shown in the graph, and it will operate at the point marked. ∆p w For the valve the relationship is given below w ∆p The pipes are all equal length and have the relationships shown below. w ∆p Figure 379 A hydraulic system example (continued) page 472 18.4 SUMMARY • 18.5 PRACTICE PROBLEMS 1. page 473 19. THERMAL SYSTEMS Topics: Objectives: 19.1 INTRODUCTION • Energy can be stored and transferred in materials in a number of forms. Thermal energy (heat) is stored and transmitted through all forms of matter. 19.2 MATHEMATICAL PROPERTIES 19.2.1 Resistance • A universal property of energy is that it constantly strives for equilibrium. This means that a concentration of energy will tend to dissipate. When material separates regions of different temperatures it will conduct heat energy at a rate proportional to the difference. Materials have a measurable conductivity or resistance (note: this is different than electrical conductivity and resistance.) page 474 1 q = -- ( θj – θ i ) R where, 1 dθ dq - ----- = -- ----- R dl dl q = heat flow rate from j to i (J/s or watts ) R = thermal resistance θ = temperature d R = ------Aα d = length of thermal conductor A = cross section area of thermal conductor α = thermal conductivity (W/mK) Figure 380 Thermal resistance • When dealing with thermal resistance there are many parallels to electrical resistance. The flow of heat (current) is proportional to the thermal difference (voltage). If we have thermal systems in parallel or series they add as normal resistors do. R1 R2 R1 R2 11- 1----- = ----- + ----RT R1 R2 RT = R1 + R2 Figure 381 Parallel and series thermal resistance page 475 19.2.2 Capacitance • Heat energy is absorbed at different rates in different materials - this rate is referred to as thermal capacitance. And as long as the material has no major changes in structure (i.e., gas-solid or phase transition) this number is relatively constant. 1 ∆θ = --- ( qin – q out ) C where, C = thermal capacitance C = Mσ where, 1 dq dθ - ----- = --- ----C dt dt M = mass of thermal body σ = specific heat of material in mass Figure 382 Thermal capacitance • One consideration when dealing with heating capacitance is that the heat will not instantly disperse throughout the mass. When we want to increase the rate of heat absorption we can use a mixer (with a gas or fluid). A mixer is shown in the figure below. This mixer is just a rotating propeller that will cause the liquid to circulate. Figure 383 A mixer to prevent uneven temperature distribution in thermal storage page 476 19.2.3 Sources • If we plan to design a thermal system we will need some sort of heat source. One popular heating source is an electrical heating element. • heating coils are normally made out of some high resistance metal/alloy such as nichrome (nickel and chrome) or tungsten. • If we run a current through the wire the resistance will generate heat. As these metals get hotter the resistance rises, hence the temperature is self regulating. If we control the voltage and current we can control the amount of heat delivered by the coil. I resistance + V temp P = IV where, P = power generated as heat I = current into coil V = voltage across coil Figure 384 Electrical heating elements 19.3 EXAMPLE SYSTEMS • We know that as we heat materials at one point, they do not instantly heat at all points, there is some delay (consider a spoon in a hot bowl of soup). This delay is a function of heat capacitance (yes there is a parallel to the electrical description). page 477 • Consider an insulated sealed chamber with a resistive barrier between sides, and a heating element in one side. qi θ 1, C 1 R θ 2, C 2 Given q 0 = heat flow into the left chamber from the heating element θ 1, C 1 = initial temperature and heat capacitance of left sid e θ 2, C 2 = initial temperature and heat capacitance of right sie d Next, q1 = heat flow through the center barrier 1 q 1 = -- ( θ 1 – θ 2 ) R d1---- θ 1 = ----- ( q 0 – q 1 ) dt C1 11 sθ 1 = ----- q 0 – -- ( θ 1 – θ 2 ) C1 R Rq o – sRC 1 θ 1 = θ 1 – θ 2 θ 1 ( 1 + sRC 1 ) = θ2 + Rq o θ2 + Rq o θ 1 = --------------------1 + sRC 1 d1---- θ 2 = ----- ( q 1 ) dt C2 1sθ2 = --------- ( θ 1 – θ 2 ) RC 2 θ1 = θ 2 + sRC 2 θ 2 Figure 385 A two chamber thermal system page 478 θ 2 + Rq o θ 1 = --------------------- = θ 2 + sRC 2 θ 2 1 + sRC 1 θ 2 + Rq o ------------------------------ = 1 + sRC 1 θ 2 + sRC 2 θ 2 Rq o ------- θ2 1 - ----------------------------------------- + - = 1 + sRC 1 1 + sRC 2 1 + sRC 2 Rq o 2 2 1 + -------- = 1 + s ( RC 1 + RC 2 ) + s R C 1 C 2 θ2 Rqo -------- = s ( RC 1 + RC 2 ) + s 2 R 2 C 1 C 2 θ2 qo ---- = s ( C1 + C 2 ) + s 2 RC 1 C 2 θ2 qo ---------------- RC 1 C 2 A B θ2 = -------------------------------------- = -- + --------------------------s C 1 + C2 C 1 + C 2 2 s + -----------------s ------------------ + s RC 1 C 2 RC 1 C 2 qo qo ---------------- --------------- RC C RC 1 C 2 qo 1 2 -------------------------------------- s = -------------------------------------- = -----------------A = lim C 1 + C 2 C1 + C2 s → 0 C 1 + C 2 2 ------------------ + ( 0 ) s ------------------ + s RC 1 C 2 RC 1 C 2 qo qo ---------------- ---------------- RC 1 C 2 RC 1 C 2 – qo -------------------------------------- s + C 1 + C 2 = --------------------------- = ----------------------------------B = lim RC 1 C 2 C 1 + C 2 C1 + C2 C 1 + C 2 C 1 + C 2 2 s → – ------------------ s ------------------ + s – -----------------RC 1 C 2 RC C RC 1 C 2 1 2 qo –qo ----------------------------------C1 + C2 C1 + C2 θ 2 = ------------------ + --------------------------s C 1 + C2 s + -----------------RC 1 C 2 Figure 386 A two chamber thermal system (continued) page 479 qo 1 –1 –1 - –1 1 L ( θ 2 ) = ------------------ L -- – L --------------------------C 1 + C2 s C1 + C2 s + -----------------RC 1 C 2 – ------------------ t qo RC 1 C 2 θ 2 ( t ) = ------------------ 1 – e C1 + C 2 C1 + C 2 Figure 387 A two chamber thermal system (continued) 19.4 SUMMARY • 19.5 PRACTICE PROBLEMS 1. page 480 20. LAPLACE TRANSFER FUNCTIONS Topics: Objectives: 20.1 INTRODUCTION • We can model systems as a ratio between output and input. This allows powerful mathematical manipulation. 20.2 THE LAPLACE TRANSFORM • The Laplace transform allows us to reverse time. And, as you recall from before the inverse of time is frequency. Because we are normally concerned with response, the Laplace transform is much more useful in system analysis. • The basic Laplace transform equations is shown below, F(s) = where, ∫0 f ( t )e ∞ – st dt f ( t ) = the function in terms of time t F ( s ) = the function in terms of the Laplace s page 481 Figure 388 The Laplace transform • Consider the examples below, ASIDE: - Recall that, F(s) = - so for f(t) = 5, F(s) = ∫0 f ( t )e ∫0 ∞ – st ∞ – st dt = L [ f ( t ) ] 5e 5 –st dt = – -- e s ∞ 0 5 –s∞ 5e 5 = – -- e – – ------------ = -s s s – s0 - for the derivatives of a function g(t)=df(t)/dt, ∞ d– st G ( s ) = L [ g ( t ) ] = L ---- f ( t ) = ∫ (d/dt)f ( t )e dt dt 0 we can use integration by parts to go backwards, ∫a b u dv = uv a – ∫ v du b a b therefore, du = df ( t ) u = f(t) ∴∫ f ( t ) ( – s )e 0 ∞ 0 ∞ – st ∫0 (d/dt)f ( t )e v = e – st ∞ – st dt dv = – se dt = f ( t )e – st ∞ 0 – st dt ∞ 0 – st – ∫ (d/dt)f ( t )e – f ( t )e – 0s dt – st ∴∫ (d/dt)f ( t )e – st dt = [ f ( t )e – ∞s ] + s ∫ f ( t )e 0 ∞ dt d∴L ---- f ( t ) = – f ( 0 ) + sL [ f ( t ) ] dt Figure 389 Some example Laplace transforms 2.a a – df ( s --------------) ds n d f(s) ( – 1 ) -------------n ds ∞ n f ( at ).f -. a > 0 e – at t L[ f( t )] f(t) f(s – a) 1 s -.page 482 20.1 A Few Transforms • The basic properties Laplace Transforms for are given below.– … – d f ( 0 ) ------------------n dt dt – n – ∫0 f ( t ) dt f ( t – a )u ( t – a ). TIME DOMAIN f(t ) Kf ( t ) f1 ( t ) + f2 ( t ) –f3 ( t ) + … df ( t ) ----------dt d f(t ) ------------2 dt d f(t ) ------------n dt n 2 FREQUENCY DOMAIN f(s ) KL [ f ( t ) ] f 1 ( s ) + f 2 ( s ) –f 3 ( s ) + … sL [ f ( t ) ] – f ( 0 ) ) df ( 0 2 – s L [ f ( t ) ] – sf ( 0 ) – ----------------dt s L[f(t ) ] – s L[f(t )] ---------------s e – as n n–1 – – f(0 ) – s – n – 2 df ( 0 ) ----------------. a > 0 tf ( t ) t f(t) f(t) ------t n ∫ f ( u ) du s Figure 390 Laplace transform tables . These are mainly used for converting to and from time ’t’ to the Laplace ’s’.n>0 e – at n s n! ----------s exponential decay n+1 3 1---------s+a ω ----------------2 2 s +ω s ----------------2 2 s +ω 1 -----------------2 (s + a) 2! -----------------3 (s + a) sin ( ωt ) cos ( ωt ) te – at t e 2 – at Figure 391 Laplace transform tables (continued) .page 483 • A set of useful functional Laplace transforms are given below. TIME DOMAIN FREQUENCY DOMAIN δ(t) A t t 2 unit impulse step ramp 1 A -s 1 ---s 2 ---2 t . .2 Impulse Response (or Why Laplace Transforms Work) • Consider a system model.page 484 TIME DOMAIN e e – at FREQUENCY DOMAIN ω ------------------------------2 2 (s + a) + ω s+a ------------------------------(s + a) + ω 2 2 sin ( ωt ) cos ( ωt ) sin ( ωt ) – at e – at ω ------------------------------2 2 (s + a) + ω Bs + C ------------------------------2 2 (s + a) + ω A ----------------------.+ A ------------------------------------s + α – βj s + α + βj A -----------------------------. That model can be said to have an input (forcing function) and an output (resulting response function).2.A 2 2 ( s + α – βj ) ( s + α + βj ) – bt complex conjugate complex conjugate e – at C – aB B cos ωt + ---------------- sin ωt ω – αt 2Ae cos ( βt + θ ) cos ( βt + θ ) – at 2t A e – αt ( c – a )e – ( c – b )e --------------------------------------------------------b–a e –e ----------------------b–a – at – bt s+c -------------------------------( s + a)(s + b) 1 -------------------------------( s + a)(s + b) Figure 392 Laplace transform tables (continued) 20.+ ------------------------------------. F(t) ∆t → 0 An impulse t Figure 394 An impulse as a brief duration pulse • If we put an impulse into a system the output will be an impulse response. F ( t ) = force (forcing function or input) x ( t ) = displacement (resulting/output function) x(t) --------. As the time becomes small we call it an impulse function. .page 485 dF ( t ) = ---- x ( t ) dt where.= g ( t ) F(t) where. g ( t ) = a function that is the ratio of input and output 2 Figure 393 A transfer function example • If we look at an input signal (force here) we can break it into very small segments in time. . This operation is called convolution. But.page 486 F(t) x( t) ∫ g ( t )F ( t ) dt t t Figure 395 Response of the system to a single pulse • If we add all of the impulse responses together we will get a total system response. the Laplace transform for the convolution integral turns it into a simple multiplication. F( t) t x(t) sum of responses ∫ g ( t – τ )F ( τ ) dτ 0 t impulse responses The convolution integral t t c(t) = ∫ g ( t – τ )r ( τ ) dτ 0 Figure 396 A set of pulses for a system gives summed responses to give the output • The convolution integral can be difficult to deal with because of the time shift. others are not (consider a worm gear).= Ms + K d s + K s x( t) x(s ) 2 2 x F ASIDE: An important concept that is ubiquitous yet largely unrecognized is the use of functional design. We look at parts of systems as self contained modules that use inputs to produce outputs. and there is some change in ‘F’. For the example above ‘F’ over ‘x’ implies that we are changing the input ‘x’.3 MODELING MECHANICAL SYSTEMS • Before doing any sort of analysis of a vibrating system. an output is the resulting change in a system. Some systems (such a mechanisms) are reversible.= M -----. a system model must be developed.page 487 t c(t) = ∫ g ( t – τ )r ( τ ) dτ 0 C ( s ) = G ( s )R ( s ) Figure 397 The convolution integral 20. An input is typically something we can change. Kd M Ks d x dx F = M ------.= ---------.+ K s 2 dt x(t ) dt F(t) F( s) 2 L --------. The obvious traditional approach is with differential equations. Figure 398 A mass-spring-damper example .+ K s x 2 dt dt d dF( t) --------. We know this could easily be reversed mathematically and practically.+ K d ---.+ K d ----. Device Resistor Time domain V ( t ) = RI ( t ) 1 V ( t ) = --. inductors and resistors. 20.∫ I ( t ) dt C dV ( t ) = L ---. except that it includes time variant features also. When shown with differentials it is obvious that the ratio is not simple. Also keep in mind that if we were given a force applied to the system it would become the input (action force) and the output would be the displacement (resulting motion).I ( t ) dt Frequency domain V ( s ) = RI ( s ) 1 I(s) V ( s ) = --- ------- C s V ( s ) = LsI ( s ) Impedance Z = R 1Z = ----sC Z = Ls Capacitor Inductor Note: Impedance is like resistance. To do this all we need to do is flip the numerators and denominators in the transfer function.page 488 ANOTHER ASIDE: Keep in mind that the mathematical expression ‘F/x’ is a ratio between input (displacement action) and output (reaction force). . the switch is closed at t=0sec. V = ZI Figure 399 Impedances of electrical components • For the circuit below.4 MODELING ELECTRICAL SYSTEMS • Consider the basic equations for capacitors. and is a function of time. = ----------------------------------------. This makes it much easier to solve complex convolution problems.page 489 L t=0sec 50VDC + R + Vo - C Treat the circuit as a voltage divider. 1 ---------------- 50V R 1 50V ------------------- sC + -.5 USING LAPLACE TRANSFORMS • The differential equation is in the time domain. Without this method. 1 + sCR R R V o = ---------------------------------. . sC + R Figure 400 A circuit example 20.= 50V --------------------------------------------- 2 2 R s R LC + sLR + R sLR + ------------------- 1 ---------------- 1 + sCR sL + 1 -. By doing a Laplace transform we can move the system into the frequency domain. very complex integrals would be required. • Inputs must in the time domain must also be converted to the frequency domain. but using Laplace transforms this becomes a simple substitution. We can find the initial. and the system differential equation. Apply a constant force of A. (*Note: a force applied instantly is impossible) F(t) = 0 for t < 0 = A for t >= 0 Perform Laplace transform using tables A F ( s ) = L [ F ( t ) ] = -s Figure 401 An input function • Normally at this point we would have the input to the system.= Ms + K d s + K s = --------x( s) x(s) A ∴x ( s ) = -------------------------------------------2 ( Ms + K d s + Ks )s Assume some values such as. Ns K d = 3000 ----m N K s = 2000 --m M = 1000kg A = 1000N 1 ∴x ( s ) = -------------------------------2 ( s + 3s + 2 )s Figure 402 A transfer function multiplied by the input function • At this point we have ‘x’ as a function of ‘s’ (later we will see ‘s’ is equivalent to frequency).g.. The convolution integral would be used to find the time response.page 490 e. A - s F(s) 2 ---------. starting at time t=0 sec. and final values (steady state) of ‘x’ using the final . = --. followed by Inverse Laplace transforms of the simpler parts. x ( t → ∞ ) = lim [ sx ( s ) ] s→0 Final value theorem 1 1s 1 1 ∴x ( t → ∞ ) = lim --------------------------------. .= ------------------------------------------.= 0 2 2 ∞ s → ∞ ( s + 3s + 2 )s ( ( ∞ ) + 3( ∞) + 2 ) Figure 403 Final and initial values theorems • All that is needed to get the time domain function is an inverse Laplace transform.= -2 2 2 2 s → 0 ( s + 3s + 2 )s s → 0 s + 3s + 2 (0 ) + 3(0) + 2 x ( t → 0 ) = lim [ sx ( s ) ] s→∞ Initial value theorem 1(s) 1 1 ∴x ( t → 0 ) = lim --------------------------------.= lim ------------------------. This is quite often done by using partial fraction expansion of the equations.= -----------------------------------.page 491 value theorem. = ----------------------------------. (A sample table is given later) .= ( s + 1 ) -.+ ( s + 1 ) ---------. 1 BC----------------------------------.= lim ( s + 1 ) -s s → – 1 ( s + 2 )s s → –1 1 lim -----------------.5 – 1 .5x ( s ) = --------------------------------. A simple proof for finding ‘B’ above is given in this box.+ ----------( s + 1 ) ( s + 2 )s s s+1 s+2 1 A B C ( s + 1 ) ----------------------------------.= ( s + 1 ) -.= -.= A + ---------.+ ---------2 s s+1 s+2 ( s + 3s + 2 )s Figure 404 Partial fractions to reduce an output function C+ lim B + lim ( s + 1 ) ---------s+2 s → –1 s → –1 • The terms from the partial fraction expansion are put through an inverse Laplace transform using a lookup table.+ ---------2 ( s + 1 ) ( s + 2 )s s s+1 s+2 ( s + 3s + 2 )s 1 A = lim s ----------------------------------- ( s + 1 ) ( s + 2 )s s→0 1 = -2 = –1 1 = -2 1 B = lim ( s + 1 ) ----------------------------------- ( s + 1 ) ( s + 2 )s s → –1 1 C = lim ( s + 2 ) ----------------------------------- ( s + 1 ) ( s + 2 )s s → –2 Aside: the short cut above can reduce time for simple partial fraction expansions.= -----.= lim B = B s → – 1 ( s + 2 )s s → –1 1 0.+ B + ( s + 1 ) ---------s s+2 ( s + 2 )s 1 A lim -----------------.+ ---------.0.page 492 1 A BC1 x ( s ) = --------------------------------.+ ---------.+ ( s + 1 ) ---------( s + 1 ) ( s + 2 )s s s+1 s+2 A C1 -----------------. --------------.5 – e + 0.5 0.2 0.0 t Partial fractions to reduce an output function (continued) • Note that the damper is relatively larger than the spring.0 Figure 406 x(t) 0.5 ] + [ ( – 1 )e ] + [ ( 0.+ – 1 .12671 0.05434 0.0 1000.00000 0. t (sec.+ 0.00453 0.6 0. • What if the damping approaches 0? .15162 0.5s s+1 s+2 0.03359 0.e.1 0.0 10.0 100.5 –1 0. down is positive) 0.page 493 x( t) = L [x(s )] = L x( t) = L –1 –1 –1 0.5-----.9 1.50000 0.3 0.49995 0.5 )e x ( t ) = 0.01643 0.5 ---------.) 0.17608 0.5e –t – 2t ] Actual response of the system in time Figure 405 Partial fractions to reduce an output function (continued) • Some numbers can be calculated to verify this.07741 0.5 keep in mind this is the drop (i.0 0.10179 0.19979 0.7 0. therefore no “oscillation”.+ L –1 ---------s s+1 s+2 –t – 2t x ( t ) = [ 0..50000 x(t) 0.8 0.+ L – 1 ---------.4 0. 1 Solving Partial Fractions • The following is a flowchart that shows the general method for doing inverse Laplace transforms.page 494 x(t) t Figure 407 a system with no damping tends to oscillate 20.5. . NOTE: This does not apply for transfer functions.page 495 Start with a function of ’s’. . yes is the function in the transform tables? no can the function be simplified? no simplify the function yes Use partial fractions to break the function into smaller parts Match the function(s) to the form in the table and convert to a time function Done Figure 408 The methodology for doing inverse transforms • The next is a flowchart for partial fraction expansions. . If there are higher order roots (repeated terms) then derivatives will be required to find solutions use algebra technique Done Figure 409 The methodology for solving partial fractions • The partial fraction expansion for.page 496 start with a function that has a polynomial numerator and denominator is the order of the numerator >= denominator? yes use long division to reduce the order of the numerator no Find roots of the denominator and break the equation into partial fraction form with unknown values OR use limits technique. 2 1 B = lim ---.1 = lim ---.= 1 s+1 s→0 d.page 497 A B 1 Cx ( s ) = -------------------.s -------------------. 2 s → 0 ds s (s + 1) Figure 410 A partial fraction example • Consider the example below where the order of the numerator is larger than the denominator. s → 0 ds s + 1 = lim [ – ( s + 1 ) ] = – 1 s→0 –2 d.+ -. ---------. .+ ---------2 2 s s+1 s (s + 1) s 1 C = lim ( s + 1 ) -------------------. 2 s → –1 s (s + 1) 1 2 A = lim s -------------------. 2 s→0 s (s + 1) = 1 1= lim ---------.= ---. + -----------------. 5 F ( s ) = ----------------------3 2 s (s + 1) 5 A -C D E ----------------------. 5s + 3 s +4 2 3 2 5s + 3s + 8s + 6 3 5s + 20s 3s – 12s + 6 2 3s + 12 2 3 2 – 12s – 6 This can now be used to write a new function that has a reduced portion that can be solved with partial fractions. – 12s – 6 x ( s ) = 5s + 3 + --------------------2 s +4 solve – 12s – 6 A B --------------------.+ B + -----------------.page 498 5s + 3s + 8s + 6 x ( s ) = ------------------------------------------2 s +4 This cannot be solved using partial fractions because the numerator is 3rd order and the denominator is only 2nd order.+ --------------3 2 2 s ( s + 1 )3 ( s + 1 )2 ( s + 1 ) s s (s + 1) Figure 412 Partial fractions with repeated roots . Therefore long division can be used to reduce the order of the equation.= ---. as shown below.+ -----------2 s + 2j s – 2j s +4 Figure 411 Partial fractions when the numerator is larger than the denominator • When the order of the denominator terms is greater than 1 it requires an expanded partial fraction form.= -----------. But. 5 A -C D E ----------------------.+ -------. because of the repeated roots we will need to differentiate to find the repeated roots.+ -----------------. .= --.+ -----------------.page 499 • We can solve the previous problem using the algebra technique.+ -----------------.+ --------------3 2 2 s ( s + 1 )3 ( s + 1 )2 ( s + 1 ) s s (s + 1) A ( s + 1 ) + Bs ( s + 1 ) + Cs + Ds ( s + 1 ) + Es ( s + 1 ) = ----------------------------------------------------------------------------------------------------------------------------------------3 2 s (s + 1) 4 3 2 3 3 2 2 2 2 s ( B + E ) + s ( A + 3B + D + 2E ) + s ( 3A + 3B + C + D + E ) + s ( 3A + B ) + ( A ) = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------3 2 s (s + 1) 0 1 3 3 1 1 3 3 1 0 0 0 1 0 0 0 1 1 0 0 1 2 1 0 0 A 0 B 0 C = 0 D 0 E 5 A 0 1 B 1 3 C = 3 3 D 3 1 E 1 0 0 0 1 0 0 0 1 1 0 0 1 2 1 0 0 –1 0 5 0 – 15 0 = 5 0 10 5 15 5 5.+ B + -----------------.– 15 5 10 15 ----------------------.+ --------------3 2 3 2 (s + 1) 2 s s (s + 1) (s + 1) s (s + 1) Figure 413 Solving partial fractions with algebra • This problem can also be solved using the limits technique.= ---. A B C D E - 3 .3 2 2 s ( s + 1 )3 ( s + 1 ) 2 ( s + 1 ) s s (s + 1) 5 5 . ( s + 1 ) = lim ---.--.+ -----------------.+ – 15 + -----------------.= --.+ --------------.+ -----------------.= lim ---.+ -----------------.2 A = lim ----------------------- s = lim -----------------.= lim ---.---.= --.= --.d5 1.+ -.B ( s + 1 ) 2 lim --.-------5 10 15 ----------------------. ----------------------- ( s + 1 ) = lim ---.lim ( s + 1 ) ----------------------.+ -----------------.+ --------------3 2 2 s ( s + 1 )3 ( s + 1 )2 ( s + 1 ) s → –1 s s (s + 1) 5 .= 15 3 2! ds 2 2! ds s 2 2! s 4 s → –1 s → –1 s → –1 s (s + 1) 5 5. 5 A B C D E ----------------------.+ -. ----------------------.2 1.2 d5 B = lim ---.d.------------.+ -----------------.+ -----------------. s → –1 s 2 ( s + 1 ) 3 s 2 s ( s + 1 ) 3 ( s + 1 ) 2 ( s + 1 ) 5.2 5 1.d.+ B + -----------------.= ---------------------.= --. ----------------------.= – 15 s → 0 ( s + 1 )4 Figure 414 Solving partial fractions with limits • We can prove the technique for the derivatives of the functions.+ --------------.A B C D E .+ -.---. ------------------ 3 ds 2 ds ( s + 1 ) 3 s→0 s→0 s (s + 1) 5 5 3 C = lim ----------------------- ( s + 1 ) = lim ---.A ( s + 1 ) .– 2 ( 5 ) 3 D = lim ---.---.---. s = lim ---.d.= 5 3 2 s → –1 s → –1 s 2 s (s + 1) 1.+ --------------.= 5 3 2 s → 0 ( s + 1 )3 s→0 s (s + 1) d5 .+ -----------------.+ -----------------.51.+ --------------3 2 3 2 (s + 1) 2 s s (s + 1) (s + 1) s (s + 1) 5( –3 ) = lim -----------------.= 10 3 2 3 2 s → – 1 1! ds s → – 1 1! ds s s → – 1 1! s s (s + 1) 5 1.---.lim ----------------------.+ C + D ( s + 1 ) + E ( s + 1 ) 2 2 s s → –1 s s 3 3 .3 2 2 s ( s + 1 )3 ( s + 1 )2 ( s + 1 ) s s (s + 1) 5 .30 3 E = lim ---.page 500 5 A -C D E ----------------------.----.+ ---------------------.= --. + C + D ( s + 1 ) + E ( s + 1 )2 ---------------------.= D = 3 ( –1 ) ( s + 1 )3 3 ( s + 1 ) 2 2 ( s + 1 )3 3 ( s + 1 ) 2 A – --------------------.+ B ( – 1 + 1 ) . but these will drop out anyway). then evaluate 3 3 d. + B – -----------------. --.+ --------------------.= A ( 0 ) .= ---------------------. 5 A ( s + 1 ) B(s + 1) 2 lim ---.2 5 ---- ---.= A ( … ) + B ( … ) + D + 2E ( s + 1 ) dt 3 s → –1 s s → –1 –3 ( –2 ( 5 ) ) lim ------------------------.+ B ( 0 ) .------------2 2 –1 ( –1 ) ( –1 ) 3 3 3 3 C = 5 For D.page 501 For C. differentiate twice.+ ---------------------.– 2 ( 5 ) lim ---- ------------.= A ( … ) + B ( … ) + 2E 4 s –3 ( –2 ( 5 ) ) ------------------------. then evaluate (the terms for A and B will be ignored to save space.= A ( 0 ) + B ( 0 ) + 2E 4 ( –1 ) E = 15 Figure 415 A proof of the need for differentiation for repeated roots .---------------------lim 2 s s → – 1 dt s 2 s d. evaluate now.+ C + D ( – 1 + 1 ) + E ( – 1 + 1 )2 --------------------------. 3 3 d. + D + 2E ( s + 1 ) 3 2 2 s s s s 10 For E.--------------------------2 2 –1 ( –1 ) ( –1 ) 5 -----------.+ B ( s + 1 ) .= A ( – 1 + 1 ) . differentiate once.= A ( s + 1 ) .+ C + D ( s + 1 ) + E ( s + 1 ) 2 s s → – 1 dt s 2 s –2 ( 5 ) lim ------------.= 3 s → –1 s –2 ( 5 ) ------------. 5 -----------.+ --------------------.+ C + D ( 0 ) + E ( 0 ) 2 ------------. 5.– -----------.5.page 502 20. .+ -----------2 2 2 2 s s s s Figure 416 Switching on and off function parts –s – 3s – 4s 20. The contrast is the first order system that tends to move towards new equilibrium points without any sort of resonance or vibration. This vibration will often decay naturally.– --------.2 Input Functions • An example of a complex time function is. f(t) 5 t seconds 0 1 3 4 f ( t ) = 5tu ( t ) – 5 ( t – 1 )u ( t – 1 ) – 5 ( t – 3 )u ( t – 3 ) + 5 ( t – 4 )u ( t – 4 ) 5 5e 5e .5e f ( s ) = --.3 Examples • These systems tend to vibrate simply. .= -------------------------------F(s) Ks 2 Kd s + ----.s + ----M M 2 2 Figure 417 A mass-spring-damper example • To continue the example with numerical values.= K d s + K s + Ms x x1 ∴---------.= ------------------------------------2 F(s) Ms + K d s + K s 1---xM ∴---------.+ Ks x = –M -------2 dt dt ∴– F ( s ) + K d sx + K s x + Ms x = 0 F(s) 2 ∴---------.page 503 • F(t) ** Assume gravity is negligible M x Kd Ks +y d x dx ∑ Fy = – F ( t ) + Kd ----. = ---------------------------------------------2 2 ( – 12j ) ( 36 – 3j + 2 ) ( s – 6j ) ( s + 36 ) ( s + 0. F ( t ) = 5 cos ( 6t )N 5s ∴F ( s ) = --------------2 2 s +6 This means. C.+ … s + 6j s – 6j Do inverse Laplace transform x ( t ) = 2 0.00516j 0.00516j 36 + 456j 36 – 456j – 432j – 36 – 24j 209.39j N K s = 2 --m Ns K d = 0. 1 - x(s) 5s - ----------------------------.+ --------------------------------s + 6j s – 6j s – 0.5 + 1.= 0. D same way 0.5 ----m Figure 418 A mass-spring-damper example (continued) A = lim s → – 6j ( s + 6j ) ( 5s ) – 30j --------------------------------------------------------------------------.00516 cos 0.00516 e 2 2 – 0t 0.+ --------------------------------. 232 --Continue on to find B.5 – 1.0654 .0654 + 0.5s + 2 ) 30j .= --------------x(s ) = F( s) 2 2 F ( s ) 2 s + 6 s + 0.0654 – 0.+ ------------------------------------------.5s + 2 ) A B C D ∴x ( s ) = -----------.0654 + 0.0654 + 0.5s + 2 5s ∴x ( s ) = --------------------------------------------------------2 2 ( s + 36 ) ( s + 0. M = 1kg Assuming an input of.39j s – 0. + … 0.+ -----------.00516t + atan – -----------------.× ---------------------.36 – 456j – 30j 13680 + 1080j ∴A = ---------------------------------------.page 504 Assuming component values of.= ---------------------------------. 1 ---------.00516j ∴x ( s ) = ------------------------------------------.= ---------------------. page 505 Figure 419 A mass-spring-damper example (continued) • Consider the circuit below. . 2 3 3 3s . ---------------- R 3s RC 3s = ------------------------------------------.page 506 t=0 V s = 3 cos t + - C R + Vo - As normal we relate the source voltage to the output voltage. ( s + 1 ) ( 1 + RsC ) ( s + 1 ) s + ------- sC RC A B C . Figure 420 A circuit example .= ----------------------------------------V o = ------------2 2 1- 12 s + 1 R + ----. Z R + Z C 3s V s ( s ) = ------------2 s +1 ZR = R 1Z C = ----sC Next. we may combine the equations.V o = -.+ --A = lim [ ] = s→ 2 Finally we do the inverse transform to get the function back into the time domain. and find a partial fraction equivalent. The we find the values for the various terms in the frequency domain.. ZR V o = Vs -----------------.+ -. System Model (differential equations) Laplace Transform Transfer Function Some input disturbance in terms of time Input described with Laplace Equation We can figure out from plots Experiments Root-Locus for stability Substitute Output Function (Laplace form) Bode and Phase Plots .page 507 20.6 A MAP OF TECHNIQUES FOR LAPLACE ANALYSIS • The following map is to be used to organize the various topics covered in the course.Exact plot Fourier Transform Output Function (Laplace terms) Partial Fraction Inverse Laplace Equations for gain and phase at different frequencies Approximate equations for steady state vibrations Steady state frequency response Time based response equation Figure 421 A map of Laplace analysis techniques .Straight line . Find a constant value that relates a change in the input to a change in the output. We need to develop an equation that approximates the local operating point. 3.7 NON-LINEAR ELEMENTS • If our models include a device that is non linear we will need to linearize the model before we can proceed. • A non-linear system can be approximated with a linear equation using the following method. In this case the relationship between pressure drop and flow are non-linear. 1. Pick an operating point or range for the component. q ∆p ≈ R ( q – q ) ∆ ( ∆p ) R ≈ --------------∆q q R = 2 ----2 K q ∆p ∆ ( ∆p ) ∆q Figure 422 Linearizing non-linear elements 20.8 SUMMARY • .page 508 20. 4. Develop a linear equation. 2. Use the linear equation in the analysis (Laplace or other) • Consider the example below. a) b) c) d) e) f) g) h) i) j) k) l) m) n) o) p) q) r) L[5] L[ e – 3t s) ] ] ] t) u) v) w) x) y) z) aa) L [ 4 sin ( 2t ) ].2 – 3t L ---. for 0 < t < pi L[u( t – 1) – u(t – 2)] L[e L[e – 2t L [ 5e – 3t u( t – 2) ] u( t – 1) ] L [ 5te L [ 5t ] – 3t –( t – 3 ) – 3t L [ 5e + u(t – 1) – u(t – 2)] t–3 L [ 4t ] L [ cos ( 5t ) ] L [ cos ( 5t + 1 ) ] L [ 5e L [ 5e – 3t – 3t 2 L [ cos ( 7t + 2 ) + e L[ 3( t – 1) + e 3 ] –( t + 1 ) – 5t ] L [ 3t ( t – 1 ) + e L [ 6e – 2. Convert the following functions from time to laplace functions.page 509 20.2t + 3 ) ] L [ sin ( 5t ) ] L [ sinh ( 3t ) ] L [ t sin ( 2t ) ] d.7t ] cos ( 5t ) ] cos ( 5t + 1 ) ] cos ( 9.9 PRACTICE PROBLEMS 1.sin ( 6t ) dt d 3 ---- t 2 L dt L 2 ∫0 x t 2 –x e dx ∫0 y dy t .t e dt L dL ---. 5s 2 –1 –1 –1 L [5(1 – e L –1 –1 )] 4 + 3j 4 – 3j --------------------.+ ------------4 2 s s +9 –1 L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 s+2 -------------------------------( s + 3)( s + 4) 6 ------------------------2 s + 5s + 6 6 ---------------------------------4s + 20s + 24 6 ------------s +6 2 – 4.= – 0.----------------.e ---.page 510 ans. a) b) c) d) e) f) g) h) i) j) L L L L L L L L –1 1---------s+1 5---------s+1 6--2 s 6--s 3 k) l) m) n) o) p) q) r) s) t) L –1 66 --.+ ---------.– e s+3 s s cos ( 2 ) s – sin ( 2 ) 7 e ------------------------------------------.37 + --------------------------------------------.e 2 2 s–1 s–1 s + 49 s + 49 3 -.– 3 + ---------2 s s+1 s –1 –3 –3 –s – 2s 2.+ ---------------------s + 1 – 2j s + 1 + 2j .-----. Convert the following functions below from the laplace to time domains.+ e . w) x) y) 5 .416s – 6. page 511 ans. Convert the following functions below from the laplace to time domains using partial fractions. a) e –t 3. a) b) c) d) e) f) g) h) i) j) L L L L L L L L L L –1 s+2 -------------------------------( s + 3)( s + 4) 6 ------------------------2 s + 5s + 6 6 ---------------------------------4s + 20s + 24 6 ------------s +6 6 ---------------s + 5s 2 9s + 6s + 3 ---------------------------------------s + 5s + 4s + 6 3 2 s + 9s + 6s + 3 ---------------------------------------s + 5s + 4s + 6 9s + 4-----------------(s + 3) 9s + 4 ----------------------3 3 3 2 3 2 2 2 2 k) l) m) n) o) p) q) r) s) t) L L –1 –1 –1 s + 3s + 5 ------------------------2 6s + 6 2 s + 2s + 3 ------------------------s + 2s + 1 2 2 –1 L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] L [ ] –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 –1 s (s + 3) 2 s + 2s + 1 ------------------------s + 3s + 2 2 3 . Convert the following differential equations to transfer functions.834 cos ( t + 0.+ 0. a) b) c) d) e) 5x'' + 6x' + 2x = 5F y' + 8y = 3x y' – y + 5x = 0 f) g) h) i) j) .page 512 ans. j) δ(t) – e – 2t δ(t) k) --------.927 ) 6 l) δ ( t ) + 2te –t 4. m x(s) ---------. 4Y( s) G ( s ) = ---------. .page 513 5. Transfer Function a) b) c) d) e) f) s+2 . Given the transfer function.= F(s) Input F ( t ) = 5N x ( t ) = 5m F(t) = x(t) = F(t) = x(t) = 6.= ---------X ( t ) = 20 When t >= 0 s+2 X(s) V3.m x(s) ---------.= F(s) x(s) ---------.F ( s ) dt V2. Given a mass supported by a spring and damper. Given the following input functions and transfer functions. a) b) c) d) e) f) t L f -- a = aF ( as ) g) h) i) j) k) l) 1 s . --. G(s). (s + 3)(s + 4) n F(s) s+2 . a) find the transfer function x/F (as a Laplace function of time). (s + 3)(s + 4) n F(s) x(s) ---------.= F(s) x(s) ---------. Prove the following relationships. determine the time response output Y(t) to a step input X(t).= F(s) x(s) ---------. find the response in time.= -------------------------------.F -- a a L[ e – at f(t )] = F(s + a) t→∞ lim f ( t ) = lim sF ( s ) s→0 t→∞ lim f ( t ) = lim sF ( s ) s→0 dL [ tf ( t ) ] = – ---.L [ f ( at ) ] = -. and gravity pulls it downward.= -------------------------------. find the displacement of the supported mass over time if it is released from neutral at t=0sec. --. y(s) --------. V5. and the output is the displacement ‘x’. d) do the inverse Laplace transform to find the position as a function of time for Ks = 10N/m. Kd = 5Ns/m. The applied force ‘F’ is the input to the system.+ ------------. a) There is viscous damping between the block and the ground. b) determine the steady state output if the input is x(s) = 20 cos(9t+. c) find the position as a function of ‘s’. K1 = 500 N/m K2 = 1000 N/m M = 10kg x F b) What is the steady state response for an applied force F(t) = 10cos(t + 1) N ? c) Give the transfer function if ‘x’ is the input. A force is applied . V4. given F(t) = 10N for t >= 0 seconds. 5 12 3 3 Y ( s ) = -. e) Find x(t).= ( s + 10 ) ( s + 5 ) ----------------------------------2 x(s) (s + 5) a) draw the straight line approximation of the bode and phase shift plots. Given the transfer function below. M=10kg.3) V6. Develop differential equations and then transfer functions for the mechanical and electrical systems below.page 514 b) find the input function F.+ --------------------. a) find the transfer function. Convert the Laplace function below Y(s) to the time domain Y(t). d) Draw the bode plots.+ ---------------------s s 2 + 4 s + 2 – 3j s + 2 + 3j 1. Note: This should act as a high pass or low pass filter. c) Solve the differential equation using calculus techniques. and see what the magnitude of the output is. b) Convert the differential equation to the Laplace domain. a) Write the differential equations for the system pictured below. . Solve to find the time response to the given input using Laplace transforms. Divide the magnitude of the output sine wave by the input magnitude. x F M B b) R1 Vi + L C R2 - + Vo 2.page 515 to cause the mass the accelerate. 3. d) Find the frequency response (gain and phase) for the transfer function using the Fourier transform. with initial conditions. The general method is put in a voltage such as Vi=1sin(___t). c) Use mathcad to find the ratio between input and output voltages for a range of frequencies. The following differential equation is supplied. Roughly sketch the bode plots. b) Put the equations in state variable form. y'' + y' + 7y = F y( 0) = 1 F ( t ) = 10 y' ( 0 ) = 0 t>0 a) Write the equation in state variable form. including initial conditions. θ1 θ2 τ K s1 B1 J1 K s2 J2 B2 5. The height is measured with an ultrasonic proximity sensor. a) Vi is the input and Vo is the output. When the spring is undeflected y=0. and the output is the angle of the second mass. Develop a transfer function for the system below. the output . R2 R1 Vi C C=1uF R1=1K R2=1K 4. The mass is suspended by a spring and a damper.page 516 d) Plot a graph of gain against the frequency of the input. The input is the force ‘F’ and the output is the voltage ‘Vo’. Find the transfer functions for the systems below. When y = 0. C + Vi R1 L + Vo + R2 Vo - b) Here the input is a torque. = – 1.273j --------------------------------------. If y=20cm then Vo=2V and if y=-20cm then Vo=-2V.040 + 2.5 cos 2 + 2.= 2 s + 2 s + 4s + 40 y 0''' = 4 –1 (ans.273j + – 1.= s + 3 + 4j s + 3 – 4j 13 s + ---------.+ --------------------.+ ---------------------------.040 + 2.040 – 2.+ A ------------------------------------.5Kg Ks Kd M Ultrasonic Proximity Sensor F y 6.5j sin 2 = – 1. Neglect gravity. a) L [ 5e –4 t cos ( 3t + 2 ) ] = L [ 2 A e – αt cos ( βt + θ ) ] α = 4 A = 2. N K s = 10 --m sK d = 5N --m M = 0.5 β = 3 θ = 2 A = 2.page 517 Vo=0V. Do the following conversions as indicated. a) a) b) c) L [ 5e L[ e –4t cos ( 3t + 2 ) ] = – 2t + 5t ( u ( t – 2 ) – u ( t ) ) ] = where at t=0 y0 = 1 y 0' = 2 y 0'' = 3 3 d d- L ---- y + 2 ---- y + y = dt dt d) e) L L –1 1+j 1–j ---------------------.-------------------------------------s + α – βj s + α + βj s + 4 – 3j s + 4 + 3j complex conjugate .273j A ----------------------. 5e sin ( 6t ) dt .5L -----------------------------2 2 dt dt ( s + 2 ) + 36 ( s + 2 ) + 36 –1 d– 2t – 2t = ---.δ ( t ) + e + 0.+ 5L [ ( t – 2 )u ( t – 2 ) + 2u ( t – 2 ) ] – ---2 2 s+2 s+2 s s 15= ---------.+ -----------.page 518 (ans. c) d ---- y = s 3 y + 1s 2 + 2s 1 + 3s 0 dt d ---- y = s 1 y + s 0 1 dt d.+ 5L [ tu ( t – 2 ) ] – ---. d) L –1 1+j 1–j A ---------------------------------------------------------.+ 5e L [ t ] + 10e L [ 1 ] – ---2 s+2 s – 2s – 2s 1 .= ---------.3 d3 2 L ---- y + 2 ---- y + y = ( s y + 1s + 2s + 3 ) + ( sy + 1 ) + ( y ) dt dt = y ( s + s + 1 ) + ( s + 2s + 4 ) 3 2 3 (ans.141 – αt 2 2 complex conjugate A = –1 π θ = atan ----- = – - 1 4 – 3t α = 3 β = 4 = 2Ae cos ( βt + θ ) = 2.+ --------------.= L – 1 ----------------------.5e 10e 5 = ---------.+ --------------------.+ L ---------------------------2 2 s+2 s + 2 s + 4s + 40 s + 4s + 40 d3 d6 – 2t – 2t = ---. b) L[e – 2t + 5t ( u ( t – 2 ) – u ( t ) ) ] = L [ e – 2t ] + L [ 5tu ( t – 2 ) ] – L [ 5tu ( t ) ] 15 15 = ---------.= L [ s ] + L ---------.+ 5L [ ( t – 2 )u ( t – 2 ) ] + 10L [ u ( t – 2 ) ] – --2 s+2 s 15 – 2s – 2s = ---------.– ---2 2 s+2 s s s (ans.282e π cos 4t – -. e) L 13 13 s + ---------.+ ---------------------------.δ ( t ) + e + L -----------------------------.δ ( t ) + e + 0.+ A s + α + βj s + 3 + 4j s + 3 – 4j s + α – βj 1 + 1 = 1. 4 (ans.= ---. page 519 7. = ---- ( s + 1 ) ( s + 3 ) ( s + 4 ) –2 s → –2 s +4 13 C = lim ------------------------------------------------. a) s 3 + 4s 2 + 4s + 4 ---------------------------------------3 s + 4s s + 4s 3 1 3 2 s + 4s + 4s + 4 3 – ( s + 4s ) 4s + 4 2 2 4s + 4 A Bs + C s ( A + B ) + s ( C ) + ( 4A ) = 1 + ---------------.+ ---------.= 1 + -. = - ( s + 2 ) ( s + 3 ) ( s + 4 ) 6 s → –1 s +4 8B = lim ------------------------------------------------.+ ------------s s2 + 4 2 A = 1 C = 0 B = 3 = δ ( t ) + 1 + 3 cos ( 2t ) (ans. and convert them back to functions of time.+ ---------. Solve the following partial fractions by hand. = ---- ( s + 1 ) ( s + 2 ) ( s + 4 ) 2 s → –3 s +4 20 D = lim ------------------------------------------------.+ ---------4 3 2 s+1 s+2 s+3 s+4 s + 10s + 35s + 50s + 24 s +4 5 A = lim ------------------------------------------------.= 1 + ----------------------------------------------------------3 3 s s2 + 4 s + 4s s + 4s 1 3s = 1 + -. and to verify the solutions.e – 4e –2t + 13 e – 3t – 10 e – 4t --------6 2 3 2 2 2 2 2 . b) s +4 ABCD-----------------------------------------------------------------.= ---------. You may use your calculator to find roots of equations. a) s + 4s + 4s + 4 ---------------------------------------3 s + 4s s +4 -----------------------------------------------------------------4 3 2 s + 10s + 35s + 50s + 24 2 3 2 b) (ans. = ---- ( s + 1 ) ( s + 2 ) ( s + 3 ) –6 s → –4 5 –t -.+ --------------. K. J. John Wiley and Sons. and Frederick.10 REFERENCES Irwin.. second edition. C. 1979. E.D. Close. 1995. “Modeling and Analysis of Dynamic Systems.M.R.. Prentice Hall Publishers.. Industrial Noise and Vibration Control.page 520 20. . D. and Graf. Inc.. 1 INTRODUCTION 21. . and how it is enhanced by the addition of a control system.they become less sensitive to variation in component values .page 521 21. . • In general we use negative feedback systems because.they typically become more stable .2 CONTROL SYSTEMS • Control systems use some output state of a system and a desired state to make control decisions.it makes systems more immune to noise • Consider the system below. CONTROL SYSTEM ANALYSIS Topics: Objectives: 21. Figure 424 Rules for a feedback controller . keep θgas the same 4.g. θgas) OUTPUT (e. then increase/decrease θgas. and has been positive/negative for a while. If verror suddenly becomes bigger/smaller.page 522 Control variable INPUT (e.g. increase/decrease θgas 2. If verror is very big/small increase/decrease θgas 3. If verror is not zero.g. etc. If verror is near zero. 5. a car) vdesired + _ verror Driver or cruise control θgas car vactual The control system is in the box and could be a driver or a cruise control (this type is known as a feedback control system) Figure 423 An example of a feedback controller Human rules to control car (also like expert system/fuzzy logic): 1. velocity) SYSTEM (e. de u = K c e + K i ∫ edt + K d ----- dt Figure 425 The PID control equation • The figure below shows a basic PID controller in block diagram form.1 PID Control Systems • The basic equation for a PID controller is shown below. This function will try to compensate for error in a controlled system (the difference between desired and actual output values). proportional V + e Kp ( e ) integral Ki ( ∫ e ) derivative dK d ---.e dt + + + u PID Controller V +V amp -V motor - Figure 426 A block diagram of a feedback controller .2.page 523 • Some of the things we do naturally (like the rules above) can be done with mathematics 21. g. dt • The PID controller is the most common controller on the market. dv error θ gas = K c v error + K i ∫ v error dt + K d ---------------- dt Rules 2 & 3 (general difference) Rule 4 (Immediate error) Rule 1 (Long term error) Kc Ki Kd Relative weights of components This is a PID Controller Proportional Integral Derivative For a PI Controller θ gas = K c v error + K i ∫ v error dt For a P Controller θ gas = K c v error For a PD Controller dv error θ gas = K c v error + K d --------------.page 524 e. . → sx dt ∫ dt 1 = -s ∫ xdt x = s θ gas K L -----------.= K c + K i ∫ dt + K d ---- dt v error Then do a Laplace transform d---. dv error θ gas = K c v error + K i ∫ v error dt + K d ---------------- dt θ gas d-----------.= K c + ----i + K d s v error s The transfer function .page 525 21.→ s dt dx ----. We can rewrite the control equation as a ratio of output to input.2.2 Analysis of PID Controlled Systems With Laplace Transforms 1. We can also develop a transfer function for the car. This is not desirable. this is called ‘open loop control’.= 10 θ gas Transfer function for engine and transmission. • The two blocks above can be replaced with a single one. θgas 10-----Ms vactual .= M ---dt v v 1L -. but much simpler. • If θgas is specified directly.) 2 d x dv F = Ma = M ------. (Laplace transform would be the same as initial value.page 526 2. F = Aθ gas = 10θ gas F--------.= M ----2 dt dt dF -. We want to draw the system model for the car. θgas 10 F 1-----Ms vactual • The ‘system model’ is shown above.= -----F Ms Transfer function for acceleration of car mass 3. = K c + ---. we can select a control system. the difference is the ‘system error’ v error = v desired – v actual ‘set-point’ . knowing the error is verror. and we can control θgas (the control variable). For all the components we can now draw a ‘block diagram’ vdesired + - verror Ki K c + ---. but they are more commonly approximated by trial and error. If we have an objective speed.+ K d s v error s *The coefficients can be calculated using classical techniques. verror Controller θgas θ gas Ki L -----------.page 527 4.+ K d s s θgas 10 F 1-----Ms vactual • A ‘negative feedback loop that is the fundamental part of this ‘closed loop control system’ .desired system operating point 5. and an actual speed. Finally. 6. • Find an input in terms of the Laplace ‘s’ vdesired 100 step vdesired(t) = 100 for t >= 0 sec ramp vdesired(t) = 50t for t >= 0 sec t(sec) 0 Input type STEP Time function f ( t ) = Au ( t ) f ( t ) = Atu ( t ) f ( t ) = A sin ( ωt )u ( t ) f ( t ) = A ( u ( t ) – u ( t – t1 ) ) Laplace function A f ( s ) = -s A f ( s ) = ---2 s Aω f ( s ) = ----------------2 2 s +ω f( s) = 2 RAMP SINUSOID PULSE etc.2..page 528 21. .3 Finding The System Response To An Input • Even though the transfer function uses the Laplace ‘s’.... it is still a ratio of input to output.. lets use the input. Kd = 10000 Kc = 10000 Ki = 1000 M = 1000 v actual s 2 ( 10000 ) + s ( 10000 ) + 1000 100 = ----------------------------------------------------------------------.page 529 Therefore to continue the car example.+ K + s ( K ) + K s c i 10 d v actual To go further. lets assume the input below. -------- M s 2 ----. v desired ( t ) = 100 t ≥ 0 sec 100 v desired ( s ) = L [ v desired ( t ) ] = -------s Next. v desired v desired 2 s ( K d ) + s ( K c ) + K i 100 = -----------------------------------------------------------. v actual v actual = ---------------. and transfer function to find the output of the system. some numbers will be selected for the values. -------- s 2 ( 10100 ) + s ( 10000 ) + 1000 s . 1 ) 2 2 v actual Aside: We must find the roots of the equation.877 2 ( 1. and then find inverse Laplace transforms for each. s + s + 0.113. 2 s ( s ( 1.795 2 2 .+ --------------------s s + 0. but not in terms of time yet. ax + bx + c = 0 2 – b ± b – 4ac x = -------------------------------------2a 2 – 1 ± 1 – 4 ( 1. 1.01 ) + s + 0. --------------------------------------------------.113 )s + 0.1 ) ∴x = -----------------------------------------------------------.01 ) ( 0.01 s ( s + 0.01 ) 2 10 s + s + 0. To do this we break up the function into partial fractions.= – 0. – 0. recall the quadratic formula.+ --------------------.page 530 At this point we have the output function.1 = 10 ------------------------------------------------. before we can continue with the partial fraction expansion.877 A B C v actual = -.1 v actual = --------.114 s + 0. 877 + 0.9 0.9 2 2 10 0.113 2 lim 10 s + s + 0.113 s + 0.877 . ----------------------------------------------------------------- = – 1.01 s ( s + 0.01 ( 0.page 531 10 s + s + 0.113 ) ( s + 0.01 s ( s + 0.113 ) + 0.01 ( – 0.1 --------.16 v actual = --------.877 ) s + s + 0. ( s + 0.877 ) ∴A = 99.1 = --------.1 10 --------.113 ) 99.113 ) ( 0. ----------------------------------------------------------------- = 0. -------------------------------------------------------- ( s + 0.877 2 lim 10 . ------------------------------------ 1.877 ) 2 2 2 10 ( – 0.1 A = lim s --------.1 ∴C = --------.264 1.113 ) ( – 0. -------------------------------------------------------- s → 0 1. -------------------------------------------------------.01 ( – 0.877 ) 2 B = s → – 0.877 ) + 0.– --------------------s s + 0.1 ∴B = --------.877 ) 1.113 ) ( s + 0.113 ) + ( – 0.877 ) 2 2 2 C = s → – 0.01 s ( s + 0.113 ) 1.113 + 0.( – 0.264 1.16 1.+ --------------------.877 ) ( – 0.877 ) + ( – 0.113 ) ( s + 0. 16e – 0. f(t ) A f(s ) A -s A --2 s A ----------s+α Aω ---------------2 2 s +ω 2 At – αt Ae A sin ( ωt ) e – ξω n t sin ( ω n t 1 – ξ ) ωn 1 – ξ --------------------------------------2 2 s + 2ξω n s + ω n etc. 99.264e – 0.113t – 1.9 + 0.264 1.113 s + 0.16 v actual = --------. 2 for ( ξ < 1 ) To finish the problem.877t .9 0.+ --------------------.877 v actual = 99.– --------------------s s + 0. we simply convert each term of the partial fraction back to the time domain.page 532 Next we use a list of forward/inverse transforms to replace the terms in the partial fraction expansion. 1 + ατ 1 s 1 + τ 2 s 21. Type Transfer Function Proportional (P) Proportional-Integral (PI) Proportional-Derivative (PD) Proportional-Integral-Derivative (PID) Gc = K 1G c = K 1 + ---. τs G c = K ( 1 + τs ) 1 G c = K 1 + ---.4 Controller Transfer Functions • The table below is for typical control system types. • When designing a controller with variable parameters (typically variable gain). . To explore this further.page 533 21.3 ROOT-LOCUS PLOTS • Consider the basic transform tables. we need to determine if any of the adjustable gains will lead to an unstable system. -------------------. consider that the roots of the denominator directly impact the partial fraction expansion and the following inverse Laplace transfer. • Root locus plots allow us to determine instabilities (poles on the right hand side of the plane).+ τs τs 1 + ατs G c = K ------------------ 1 + τs 1 + τs G c = K ------------------ 1 + ατs α>1 α>1 α>1 τ1 > τ2 Lead Lag Lead-Lag 1 + τ 1 s 1 + ατ 2 s G c = K -------------------. overdamped systems (negative real roots) and oscillations (complex roots).2. A superficial examination will show that the denominator (bottom terms) are the main factor in determining the final form of the solution. page 534 • Note: this procedure can take some time to do. • Consider the example below. . but the results are very important when designing a control system. we must develop a transfer function for the entire control system.= ----------1 + G ( s )H ( s ) s+K K 1 + --- ( 1 ) s Next.= -------------------------. + K 1 K G ( s ) = --s H(s) = 1 1 -s First. So in general we do not need to find the transfer function for the whole system. K -- s KG(s) G S ( s ) = -------------------------------. the more stable the system becomes.page 535 Note: This controller has adjustable gain. the transfer function for the whole system was found. root jω K→∞ K = 0 σ Note: because all of the roots for all values of K are real negative this system will always be stable. Note: the value of gain ’K’ is normally found from 0 to +infinity. These can then be plotted on a complex plane. but then only the denominator was used to determine stability. we use the characteristic equation of the denominator to find the roots as the value of K varies. • Consider the previous example. The large the value of K. After this design is built we must anticipate that all values of K will be used. It is our responsibility to make sure that none of the possible K values will lead to instability. . s+K = 0 K 0 1 2 3 etc. and it will always tend to have a damped response.. K ( s + z0 ) ( s + z1 )… ( s + z m ) G ( s )H ( s ) = -----------------------------------------------------------------( s + p 0 ) ( s + p 1 )… ( s + p n ) • Consider the example. and it’s roots. The system response is a function of the denominator. The transfer function values will often be supplied in a pole zero form. G(s) G S ( s ) = -------------------------------1 + G ( s )H ( s ) Note: two assumptions that are not often clearly stated are that we are assuming that the control system is a negative feedback controller. and that when not given the feedback gain is 1. (especially in textbook problems) to be given only G(s) or G(s)H(s). . 1 + G ( s )H ( s ) = 0 It is typical.page 536 Consider the general form for a negative feedback system. K G ( s ) = ------------------------2 s + 3s + 2 H(s) = 1 First.3. This includes writing the poles and zeros of the . 1. ( 1 ) = 0 2 s + 3s + 2 s + 3s + 2 + K = 0 1 – 4K – 3 ± 9 – 4(2 + K) roots = ----------------------------------------------. find values for the roots and plot the values. K 1 + ------------------------. write the characteristic equation. and an equation for the roots. K 0 1 2 3 root 0 -1 -2 -3 jω σ 2 ******CALCULATE AND PUT IN NUMBERS 21.5 ± ------------------2 2 Next.page 537 Given the system elements (you should assume negative feedback)..1 Approximate Plotting Techniques • The basic procedure for creating root locus plots is.= – 1. find the characteristic equation. B = ( s + z 1 ) ( s + z 2 )… ( s + z m ) . draw the asymptotes on the graph.B = 0 ds ds 6. Points will be on a root locus line if they have an odd number of poles and zeros to the right. plot the root loci that lie on the real axis. n – m – 1 ] ( p1 + p2 + … + pn ) ( z 1 + z2 + … + z m ) σ = ------------------------------------------------------------------------------------------n–m 5. To do this substitute the fourier frequency for the laplace variable.= 0 ( jω + p 1 ) ( jω + p2 )… ( jω + p n ) • Consider the example in the previous section. Find the points where the loci lines intersect the imaginary axis. ( jω + z 1 ) ( jω + z 2 )… ( jω + z m ) 1 + K -------------------------------------------------------------------------.A B – A ---. Next. Draw these lines in. The resulting roots are the breakin/breakout points. determine the asymptotes for the loci that go to infinity using the formula below. The difference (n-m) will indicate how many root loci lines end at infinity (used later). ( s + z 1 ) ( s + z 2 )… ( s + z m ) 1 + G ( s )H ( s ) = 1 + K --------------------------------------------------------------. determine where the asymptotes intersect the real axis using the second formula.= 0 ( s + p 1 ) ( s + p 2 )… ( s + p n ) 2. to calculate these the following polynomial must be solved.page 538 equation. Breakaway points exist between two poles on the real axis. the breakaway and breakin points are found next. 4. ± 180° ( 2k + 1 ) β ( k ) = ----------------------------------n–m k ∈ [ 0. A = ( s + p 1 ) ( s + p 2 )… ( s + p n ) dd ---. 3. Finally. and solve for the frequencies. Breakin points exist between zeros. count the number of poles and zeros. Plot the asymptotic curves to pass through the imaginary axis at this point. = 0 2 asymptotes σ -2 -1 .page 539 Given the system elements (you should assume negative feedback).= 90° 2 180° ( 2 ( 1 ) + 1 ) β ( 1 ) = -----------------------------------. 1 ] jω 180° ( 2 ( 0 ) + 1 ) β ( 0 ) = -----------------------------------. ( 1 ) = 1 + K ------------------------------- 2 (s + 1)(s + 2) s + 3s + 2 Step 2: (find loci ending at infinity) m = 0 n–m = 2 Step 3: (plot roots) jω n = 2 (from the poles and zeros of the previous step) (loci end at infinity) σ -2 -1 Step 4: (find asymptotes angles and real axis intersection) 180° ( 2k + 1 ) β ( k ) = ------------------------------2 k ∈ I [ 0.= 270° 2 ( 0 )( – 1 – 2) σ = ---------------------------. K G ( s ) = ------------------------2 s + 3s + 2 H(s) = 1 Step 1: (put equation in standard form) K 1 1 + G ( s )H ( s ) = 1 + ------------------------. 5 2 Note: because the loci do not intersect the imaginary axis. so step 6 is not necessary. . Step 6: (find the imaginary intercepts) 1 + G ( s )H ( s ) = 0 1 1 + K ------------------------.A = 0 ds ds 1 ( 2s + 3 ) – ( s + 3s + 2 ) ( 0 ) = 0 2s + 3 = 0 s = – 1.= 0 2 s + 3s + 2 s + 3s + 2 + K = 0 ( jω ) + 3 ( jω ) + 2 + K = 0 – ω + 3jω + 2 + K = 0 ω + ω ( – 3j ) + ( – 2 – K ) = 0 3j ± ( – 3j ) – 4 ( – 2 – K ) 3j ± – 9 + 8 + 4K 3j ± 4K – 1 ω = -------------------------------------------------------------.B = 2s + 3 ds σ -2 -1. 2 2 2 2 2 • Plot the root locus diagram for the function below. This means that there will be no frequency that will intercept the imaginary axis. but we it will be done for illustrative purposes. we know the system will be stable.page 540 Step 5: (find the breakout points for the roots) A = 1 d---.A = 0 ds B = s + 3s + 2 d---.= ------------------------------2 2 2 In this case the frequency has an imaginary value.5 -1 2 jω ddA ---.= --------------------------------------------.B – B ---. page 541 K( s + 5 ) G ( s )H ( s ) = --------------------------------2 s ( s + 4s + 8 ) 21.4 DESIGN OF CONTINUOUS CONTROLLERS 21.5 SUMMARY • . ranges for breakout/breakin points.= ---------x( s) s+2 x( t) = 5 t ≥ 0 sec 8. Draw a detailed root locus diagram for the transfer function below. . K(s + 4)G ( s ) = ---------------------2 s (s + 1) 2 2 11. and the input ‘x(s)’. ans. The system has a proportional controller with a variable gain K. find the output ‘y(t)’ as a function of time.5 ) ( s + 2s + 2 ) G ( s ) = ----------------------------------------------------------3 s (s + 1)(s + 2) 10. θd Vd + Ve Vs ω θa 2 K 100 ---------s+2 1 -s Va 2 a) Simplify the block diagram to a single transfer function. Be careful to specify angles of departure. Given the transfer function below. 200K ----------------------------------2 s + 2s + 200K b) Draw the Root-Locus diagram for the system (as K varies).6 PRACTICE PROBLEMS 3. Use either the approximate or exact techniques.page 542 21. and gains and frequency at stability limits. Draw the root locus diagram for the transfer function below. K(s + 1)(s + 2) G ( s ) = ------------------------------------3 s 12. 2K ( s + 0. Draw the root locus diagram for the transfer function below. The block diagram below is for a motor position control system. y( s) 5--------. s + 2s + 200K = s + 2ζωn s + ω n 2 2 2 ∴ω n = 1 ∴K = 0. Given the system transfer function below. ( s + 1 ) ( s + 1000 ) ----------------------------------------2 ( s + 100 ) OR 5--2 s 15. The following questions ask you to find the system response to a . The input is ‘F’ and the output is ‘V’. The equation below describes a dynamic system.005 From the root locus graph this value is critically stable. 13. – 2 ± 4 – 4 ( 200K ) roots = ----------------------------------------------. c) Given a gain of K=10 find the steady state response to an input step of 1 rad.= – 1 ± 1 – 200K 2 Im K r o o K=0. b) Select a gain value for K that has either a damping factor of 0. State if the Root-Locus diagram shows that the system is stable for the chosen K.707 or a natural frequency of 3 rad/sec.page 543 ans. d) Given a gain of K=10 find the response of the system as 17. (ans. It has the initial values specified. Draw a Bode Plot for either one of the two transfer functions below.005 ts 0 0 -2 -1 Re 0 c) Select a K value that will result in an overall damping coefficient of 1. θo 20K ---.= ----------------------------2 θd s + s + 20K a) Draw the root locus diagram and state what values of K are acceptable. d) Select controller values that will result in a natural frequency of 2 rad/sec and damping coefficient of 0. find the response to a ramp input as a function of time. Sketch the result accurately below.+ K d s s+9 s 4 s ( 3K d ) + s ( 3K p ) + ( 3K i ) Y -. It uses a desired heigh ‘d’ provided by a user. f) If the values of Kd=1 and Ki=Kd=0.5. The following system is a feedback controller for an elevator. Y X + 3Ki ---------K p + ---. e) For the parameters found in the last step find the initial and final values. Identify any values of Kd that would leave the system unstable. 18. c) Put the equation is state variable form. V(0) = 1 V'' + 10V' + 20V = – 20F V' ( 0 ) = 2 a) Find the response using Laplace transforms. c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1. b) Draw a root locus plot for the controller if Kp=1 and Ki=1. The closed loop transfer function is given. The elevator and controller are described with transfer functions. The system incorporates a PID controller. and the actual height of the elevator ‘h’.page 544 unit step input using various techniques. and solve it using your calculator. all of these equations can be combined into a single system transfer . The difference between these two is called the error ‘e’. Verify that the controller will be stable.= -----------------------------------------------------------------------------------2 X s ( 4 + 3K d ) + s ( 36 + 3K p ) + ( 3K i ) 2 a) Verify the close loop controller function given. The PID controller will examine the value ‘e’ and then control the speed of the lift motor with a control voltage ‘c’. A feedback control system is shown below. b) Find the response using the homogenous and particular solutions. as shown below. 19. 2 s 10s + 10 h system transfer function -. e = d–h error PID controller h 10 -.10 h c -- .= K p + ----i + K d s = ------------------------s s e combine the transfer functions 2 2s + 1 + s . The system starts at rest on the ground floor. b) Write find the damping coefficient and natural frequency of the results in part a).= ( s + 1 ) .= 10 ( s + 1 ) ---------------------2 d–h s 10 ( s + 1 ) h = ---------------------. = ------------------------------2 10 ( s + 1 ) d s + 10s + 10 1 + ---------------------- 2 s a) Find the response of the final equation to a step input.-----------.= -----------2 c s +s elevator 2 K 2s + 1 + s c .= ------------------------------.-----------------.10 ----------------------2 2 e c = e = s s s(s + 1 ) s +s s h eliminate ‘e’ ----------. c) verify the solution using the initial and final value theorems.( d – h ) 2 s 10 ( s + 1 ) 10 ( s + 1 ) h 1 + ---------------------- = ---------------------- ( d ) 2 2 s s 10 ( s + 1 ) ---------------------.h .= 10 ( s + 1 ) -----------------. and the input (desired height) changes to 20 as a step input.------------------------. 2 .page 545 equation as shown. 873j θ = 4.+ -------------------------------.5 + 22.ω n 2 ωn ωn = 35 = 5.873 = – 5t cos ( 3. 20 = 0 s → ∞ s 2 + 10s + 10 s s → ∞ s2 10s + 10 .873j s + 5 + 3.20 A B C h = ------------------------------. ----.73 )e b) –5 = – ωn ζ 3.= 20 2 s 10 s→0 s + 10s + 10 .5 – 22. ω n = ω n – 25 2 ω n 5ζ = --------.page 546 (ans.5 – 22.= -.73 2 2 C = – 2. ----.6j. ----.+ -------------------------------s + 5 – 3.602 α = 5 β = 3. a) h 10s + 10 -.6 = 22.= 0.20 ( 10 )20 h ( ∞ ) = lim s ------------------------------.5 + 22. = 20 2 s → 0 s + 10s + 10 B = 200s + 200 ---------------------------------------- = – 2.873j s + 10s + 10 s 200s + 200 A = lim ------------------------------.= ---------------.= lim ------.845 35 c) 10s + 10 .6j s ( s + 5 + 3.873 h ( t ) = 20 + 2 ( 22.– 2.873t + 4.873j ) s → – 5 + 3.6j-------------------------------.20 10s h ( 0 ) = lim s ------------------------------.873j s + 5 + 3.= ------------------------------2 d s + 10s + 10 d ( t ) = 20u ( t ) 20 d ( s ) = ----s 10s + 10 .5 + 22.+ -------------------------------2 s s + 5 – 3.602 ) 5ζ = ----ωn 1 – ζ ωn = 2 25 1 – ----.916 25 2 2 15 = 1 – ----.6j h ( t ) = 20 + L –1 – 2.873j lim A = 2. You will also .edu’ and look for your account under ‘students’.Creating Web Pages • The general steps are: 1.gvsu. You will need to indicate the file name as ‘index. the destination as ‘ftp://claymore. The editor behaves much like Microsoft Word.edu/home/YOUR_NAME/public_html’.1 Lab 1 . Go to a laboratory (EC 616).Introduction to Resources and Tutorials • These tutorials prepare you to use computer and other resources throughout the semester. select ‘publish’. This account will have a prototype web page that you can edit. and then clicking on the chain link near the top of the screen. 22.1 Tutorial 1a . Jack. At this point add your name.1. or home computer and run ‘Netscape Communicator’. Make sure that the files will be saved in the ‘temp’ directory. You can change your email address by clicking on the email link. • Various labs will require pre. 22. Create a ‘temp’ directory on the computer. 5. and change your email address to your river account.edu’ from Prof. or under ‘file’ select ‘edit’ or ‘edit page’.engineer.engineer.Unless specified. .gvsu. and then ‘save’ the files.gvsu.html’. To upload the changes you have made to the website.engineer. This directory will be used to temporarily hold your web page files. 2.All written work is to be clear and accurate. 3. You will be asked if you want to save the page. You should be able to find a page that starts with ‘YOUR_NAME_GOES_HERE’. An editor will start on the screen. LABORATORY GUIDE • The laboratory work will help enforce the concepts presented in this and previous courses.or post-lab work. • General rules include: . 6.page 547 22. Get a computer account on ‘claymore. work is to be done individually. select ‘edit’ from the tool bar. In Netscape (with your home page showing). Go to ‘claymore. with some subtle differences. and create a simple file.Watch upper/lower case. and then click on the link button.To link to other files or web pages there will be a ‘link’ command. This will now be a link to the Grand Valley home page. put them in the ‘temp’ directory. 8. make sure it is not open in another application. highlight it. . . Anything over 100K makes modem downloading painfully slow. This is a major cause of web page problems. If you seem to be having trouble opening a file.mcd’. Use the mouse to select what you just typed.Avoid using excessive images. This is because Netscape does not reload pages every time to look at them. 11. Next we will add links to your home page. ‘jpg’ images can be compressed more than ‘gif’. . Publish the file. Someplace type the word ‘GVSU’. For the link name enter ‘http://www. but lines will become blurred. Use a file name that is all lower case such as ‘test. For your Mathcad file type something like ‘Mathcad file’. . First. Use Netscape. You should see a message that indicates files have been uploaded successfully. and apply the change. and ‘gif’ for line images. and then save it in the same folder/directory you saved. 7.Try to make your web pages small. There are two ways to update the screen before this time limit .gvsu. This link will connect to your Mathcad file.page 548 need to enter your user name and your password (DO NOT SAVE THE PASSWORD . and add a link to ‘test. and reused when you look at them. Test the page. not the editor. just put the name of the file in the ‘URL’ field. to see if the changes have occurred. 10. • Some tips are. It is best to keep to lower case for all file names. This will make all of the procedures simpler.When putting images on the web page use ‘jpg’ for photographic images. Anything over 10K will make it very slow downloading over modem.edu’. If you want to add a file that is in your ‘temp’ directory. Pages are often stored for up to 1 month on the PCs hard drive. . 9.click on the reload button. but first add the Mathcad file to the list of files at the bottom of the screen. . This will decrease download time and make browsers happier.any upper case letters cause problems in Windows 95. .mcd’ . and link them together. Your changes may not show up on the browser.SOMEBODY ELSE CAN GET ACCESS TO YOUR ACCOUNT). . run Mathcad.Windows will not allow multiple applications to open the same file at the same time. Get your home page back in the Netscape editor.As you add other files to your homepage. and as a tutorial for those with no experience. precise calculations. 3. The Internet is a huge collection of computers providing information and connection on an unprecedented scale. and then see how the system dynamics are effected. etc. • Procedure 1. In some cases students have not been exposed to one or more of these software packages in the past.this allows a more intuitive understanding of a dynamic system. Explain how the business is related to your co-op position. whereas Working Model allows faster results with reduced accuracy. (If needed) Go over the Working Model tutorial provided. (If needed) Get a computer account set up. Working Model 2D is a software package that allows us to set up systems of multiple rigid bodies. Repeat the problem solved in Mathcad with Working Model and add the file to your home page. and create a home page. To learn it initially will require a time investment. Mathcad and the Internet will be used in this course. 6. It has become a standard business tool. (If needed) Go over the Mathcad tutorial provided.page 549 22. 2. This session will be used as a refresher for those with little prior exposure. But. 5.2 Tutorial 1b . In comparison. • Post-lab: None . 4. moments. • Theory: Mathcad is a software package that allows us to do complex calculations both numerically and symbolically. Working Model also presents a visual simulation .1. and continues to evolve.Introduction to Mathcad. We can then apply forces. Use Mathcad to calculate the position of a ball that has been held then released just above the surface of the earth. Working Model 2D and The Internet • Objective: Working Model 2D. Mathcad will allow longer. Go to a search engine and find a website for a major business that is related to your co-op position and add a link to it on your home page. it will save a significant amount of time and reduce calculation errors. and add the file to your home page. when doing calculations later. but the ’state of the art’ must often be found in magazines.Introduction to Library Searches • Objective: To prepare students to use the libraries resources in typical research studies. etc. • Post-lab: . 3. we will often use sources over a decade old. Use the library resources to identify an application of systems modeling. 2. New technology has changed access to library materials. Lee Lebin.1. • Procedure 1. In particular internet tools allow the entire library catalog to be examined without visiting the library. print has been the major means of exchanging information. 22.page 550 • Submit: 1. There are also a number of resources that can be searched and retrieved over the internet. To deal with the extensive number of publications available in a library. printed books have a value for teaching the fundamentals. and what resources are available. • Theory: The essential purpose of engineering is to apply principles of the arts and sciences to solve real problems. A presentation will be made by Mr. but the essential principles and written works are valid for a number of decades or centuries. As a result. Libraries pool resources and share materials. the University Library Director. Until recently. A Working Model file linked to your home page.3 Presentation 1a . As a result. most will be less than five years old. To put this in simpler terms. Scientific principles tend to evolve over time. journals. we need to learn how to search for needed information. books can be excellent resources for this knowledge. The applications that make use of the basic principles tend to be more revolutionary. An explanation and a link to a company on your home page. Internet technology has also helped increase accessibility. A Mathcad file linked to your home page. 2. and libraries have been the traditional repositories of printed materials. when we look for scientific resources. When using engineering resources. and print the results on a strip chart. 22. square the values.page 551 1. This graphical programming approach allows systems to be designed by connecting the symbols with "wires" (i. Theory: To obtain the greatest computing power and flexibility we need to write computer programs. Write a Labview program that will count from 1 to 100. 2..e. Equipment: PC with LabVIEW software Procedure: 1. LabVIEW allows you to “write” programs using graphical symbols. But. traditional programming languages are not well suited to designing user interfaces and dealing with data flows. This will also be good review for those who have used LabVIEW in previous courses. • Submit: 1. lines).Computer Based Data Collection 22. A copy of the material referenced.2 Lab 2 .Tutorial for LabVIEW Programming Objective: To learn the basic use of LabVIEW. Go through the LabVIEW QuickStart Guide provided in the laboratory. Most computer programs are written with lines of program and compiled to execute.2. Marking: .1 Prelab 2a . Search for library resource. 16 bits 2 analog outputs . . A ribbon cable will be used to make electrical connection to the connector in the back of the computer. This graphical programming approach allows systems to be designed by connecting the symbols with "wires" (i. traditional programming languages are not well suited to designing user interfaces and dealing with data flows. But.page 552 1. lines). The VI created should be posted to the web. It will have a connector with pinouts like the one shown below.. 8 single ended or 4 double ended analog inputs .12 bits • The connector for the card can be found on the back of the computer.TTL 0.5VDC. • The computers we will use all have DAQ (Data AcQuisition) boards . 22. • The remainder of the labs will focus on using LabVIEW to write programs to allow a computer to interact with the environment outside the computer.Overview of Labview and the DAQ Cards • To obtain the greatest computing power and flexibility we need to write computer programs.2 Prelab 2b . • LabVIEW allows you to “write” programs using graphical symbols.2.National Instruments PCI-1200 DAQ cards. These cards have capabilities that include: 24 I/O bits .12 bits 3 counters .e. 20mA max. CLKBx NOTE: LABVIEW MANUALS ARE AVAILABLE ON-LINE.DGND Control handshaking . EXTCONV Counter inputs/outputs .2.ACHx Analog input ground . GATBx. PCx Digital input/output ground . AND CAN BE FOUND ON THE COURSE HOME PAGE . 22. PBx.PAx.EXTTRIG.3 Experiment 2 . EXTUPDATE.AGND Digital inputs and outputs .LEAVE THE PAPER MANUALS IN THE LAB.Introduction to LabVIEW and the DAQ Cards Objective: ACH0 ACH2 ACH4 ACH6 AISENSE/AIGND AGND DGND PA1 PA3 PA5 PA7 PB1 PB3 PB5 PB7 PC1 PC3 PC5 PC7 EXTUPDATE OUTB1 OUTB2 CLKB1 GATB2 +5V pin 1 Looking at the connector (on the back of the computer) 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 ACH1 ACH3 ACH5 ACH7 DAC0OUT DAC1OUT PA0 PA2 PA4 PA6 PB0 PB2 PB4 PB6 PC0 PC2 PC4 PC6 EXTTRIG EXTCONV GATB0 GATB1 OUTB2 CLKB2 DGND .DACxOUT Analog output ground .page 553 LEGEND: Analog inputs .AISENSE/AIGND Analog outputs .OUTBx. If we exceed the input voltages significantly. For digital I/O there are a total of 24 pin distributed across 3 ports (1 byte each). To read the data into a computer we write programs. The voltage levels for the inputs and outputs are important. but instead of typing instructions we draw function blocks and connect them. The first important piece of information is the board number. PC=2) and the channel from 0 to 7. We can read the data into the computer and then do calculations with it. There are also many inputs and outputs available on the card. and it is designated device ’1’. In this lab we will be using Labview to connect to a data acquisition (DAQ) board in the computer. But the analog inputs and outputs will vary from -5V to 5V. LabVIEW allows us to write programs for data collection.in other words we must pick whether a port will only be used for inputs or for outputs. In our case there is only one. but not mixed . For the digital outputs they will only ever be 0V or 5V. and make changes to the world outside with outputs. and use "canned" software to help with the task.page 554 Learn to use computers equipped for A/D and digital inputs. There can be multiple DAQ boards installed in the computer. Theory: The computer reads data at discrete points in time (like a strobe light). The functions are things like data reads and calculations. PB=1. Note is that we can make the ports inputs or outputs. the boards have built in protection and should be undamaged. Therefore when connecting inputs and output we must specify the port (PA=0. This will allow us to collect data from the world outside the computer. If we exceed these voltage limits by a few volts on the inputs. there must be ways to address or request information for a specific input or output (recall memory addresses in EGR226). For analog inputs there are 8 channels. and you will need to be aware of these. and as before. This is build into the board. How we connect them determines how the data (numbers) flow. When interfacing to the card using a program such as Labview. Equipment: PC with LabVIEW software and PCI-1200 DAQ card Interface cable PLC trainer boards Signal generator Digital multimeter Procedure: . For analog outputs there are two channels so we need to specify which one when using the output with 0 or 1. there is a potential to permanently damage the board. we must specify which one we plan to read from using 0 to 7. (Note: there is a pin diagram for the connector in the Labview tutorial section. Test the circuit using the ‘DAQ Configure’ utility. Record the observations seen on the screen.page 555 1. Record your observations. 3. Then run your Labview program. Go through the LabVIEW QuickStart Guide provided in the laboratory. This will also be good review for those who have used LabVIEW in previous courses. Use a stop watch to determine the average number of samples per second.) Start the signal generator with a low frequency sinusoidal wave. Enter the LabVIEW program schematically illustrated below and then run it. Use the ‘DAQ Configure’ software to test the circuitry and verify that your hardware is operational. etc. and see how this affects the data colection speed. Run additional programs such as browsers. You should be able to control the output voltage from the screen using the mouse. . Connect the multimeter as shown below. 2. spreadsheets. Enter the LabVIEW program (layout) schematically shown below and connect a signal generator to the analog input (ACH0). Front Panel Wiring Diagram 1 0 single analog in SGL waveform chart ACH0 + signal generator AIGND com 2b. run the ‘DAQ Configure’ utility. run the test panel window and ensure that the inputs and outputs are working correctly. To do this. Create the LabVIEW screen schematically illustrated below. double click on the ‘PCI-1200’. This should allow you to scan an input switch and set an output light.page 556 User Display Diagram DBL DBL 1 0 single analog out input knob output meter DAC0OUT + multimeter AGND com 4. Connect the digital input and output circuits to the DAQ card and use the test panel to test the circuits. When done. . quit the program and run your LabVIEW program. The programs (VIs) that use the DAQ card should be posted to the web. A laboratory report should be written. Discrete sensors will only switch on or off.Sensors and More Labview 22. Inductive Proximity Sensors . 2. normally voltage or current. Examples of these include. and posted to the web.use magnetic fields to detect presence of .3.Sensors Theory: Sensors allow us to convert physical phenomenon to measurable signals. including observations. 22. These tend to fall into one of two categories.page 557 Front Panel Diagram 1 1 toggle light/led 0 T/F single line write T/F 1 0 0 single line read +5V switch input PB0 2K LED output PA0 100K DGND DGND Marking: 1. discrete or continuous.1 Prelab 3 .3 Lab 3 . provides a voltage output proportional to distance Strain Gauges . Submit: . Enter the data into Mathcad and develop a graph for each of the sensors relating input and output.page 558 metals Capacitive Proximity Sensors . .their resistance changes as they are stretched Accelerometers . Procedure: 1. Potentiometers .use light to detect presence Contact Switches . Instructions will be provided at each station to clarify the setup.2 Experiment 3 . maximum/minimum resolutions and sensitivities.a mass on a spring will be made to oscillate. The stations might include.3. .Measurement of Sensor Properties Objective: To investigate popular industrial and laboratory sensors.output a voltage proportional to acceleration Thermocouples . Prepare a Mathcad sheet to relate sensor outputs to the physical phenomenon they are measuring. The mass will be observe by measuring position and acceleration.require physical contact Continuous sensors output values over a range.a signal generator with an oscilloscope to read voltages phenomenon observe should include sampling rates and clipping. Sensors will be set up in the laboratory at multiple stations. 22. 2. Prelab: 1.use capacitance to detect most objects Optical Proximity Sensors . You and your team should circulate to each station and collect results as needed.provide a resistance proportional to an angle or displacement Ultrasonic range sensors . Examples of these are.output small voltages proportional to temperature In both cases these sensors will have ranges of operation. 22. And. The rotational inertia J1 is the motor rotor.4 Lab 4 .Permanent Magnet DC Motors • Theory: DC motors will apply a torque between the rotor and stator that is related to the applied voltage or current.4. On the left hand side is the resistance of the motor and the ’back emf’ dependent voltage source. A full laboratory report with graphs and mathematical functions for each sensor. for a given voltage the ratio between steady-state torque and speed will be a straight line. and the second inertia is an attached disk.page 559 1. On the right hand side the inertia components are shown. When a voltage is applied the torque will cause the rotor to accelerate. We can develop equations for this model. . 22.1 Prelab 4a .Motors • This set of labs will examine devices that have multiple phenomenon occurring. For any voltage and load on the motor there will tend to be a final angular velocity due to friction and drag in the motor. This model must also include the rotational inertia of the rotor and any attached loads. T voltage/current increases ω The basic equivalent circuit model for the motor is shown below. = ------------------K R XXXXXXAdd friction to the model dJ M ---- ω dt V s – Kω ∴--------------------. . ∑M d= T = J M ---- ω dt d∴T = J M ---- ω dt The model can now be considered as a complete system. Vs – Vm I = ----------------R V s – Kω T ∴--. J M R dt J M R Looking at this relationship we see a basic first-order differential equation. And the torque (force) generated will be proportional to the current. ω Vm + - J1 J2 Because a motor is basically wires in a magnetic field. We can measure motor properties using some basic measurements. Integrate the differential equation to find an explicit function of speed as a function of time.= ------------------K R K2 K d- ∴ ---- ω + ω --------. consider the power in the motor. ∴V m = Kω P = V m I = Tω = KIω Consider the dynamics of the rotating masses by summing moments. T = KI T ∴I = --K Next.page 560 I Voltage Supply + Vs - R T. = V s --------. the electron flow (current) in the wire will push against the magnetic field. The current-voltage relationship for the left hand side of the equation can be written and manipulated to relate voltage and angular velocity. • Prelab: 1. 3. 2. D/A output (Vo) Computer amplifier (use an LM675 op-amp) motor A/D input (Vi) feedback signal tachometer (a small DC motor) Note: The motor being tested is the large motor. supplied voltage and steady-state speed and calculate the coefficients in the differential equation for the motor.national. With the motor disconnected from all other parts of the circuit. In this case we will refer to it as a tachometer.page 561 2. 22. An analog input will be used to measure the motor speed from the tachometer. 3. In the same Mathcad sheet add a calculation that will accept the motor resistance and calculate values for K and J. . Write a Labview program that will output an analog voltage to drive the motor amplifier.2 Experiment 4a . • Procedure 1. Get the data sheets for an LM675 from the web (www.4. Connect the motor amplifier.com). The small motor will be driven and act as a generator. Develop a Mathcad document that will accept values for time constant. motor and computer as shown in the figure below. 4.Modeling of a DC Motor • Objective: To investigate a permanent magnet DC motor with the intention of determining a descriptive equation. measure the resistance across the motor terminals. we need to specify a desired velocity (or position) by setting a value ’Vd’. 3.5 Lab 5 . 2 . Obtain velocity curves for the motor with different voltage step functions. 4. Determine the J for the rotor.5. The value of ’K’ will determine how the system responds. Find the time constant of the unloaded motor. All work and results. 22. Use the values of R. Compare this to the actual. Use the values of R. 2. For this form of control.1 Prelab 6a . • Submit: 1. 5. • Post-lab: 1. J and K to determine what the stalled torque should be in procedure step #6. J and K to compare theoretical to the actual motor response curves found in procedure step #5. 6. This difference is multiplied by a constant ’K’. dKK ---- ω + ω ----. This will give a voltage difference between the two values. Use a strobe light to find the relationship between the tachometer voltage and the angular speed.Basic Control Systems 22. Determine the values of K for the motor.Servomotor Proportional Control Systems Theory: DC servomotors typically have a first-order (velocity) response as found in the previous lab.page 562 4. The difference between the desired speed and actual speed is calculated (Vd-Vi). = V ----. Use a fish scale and a lever arm to determine the torque when the motor is stalled with an input voltage. and calculate J values for different load masses added. s JR dt JR We can develop a simple control technique for control of the velocity using the equation below. . The amplifier is constructed with an LM675 high current op-amp. The voltage from the tachometer is input into the computer to determine the speed. which in turn drives a small DC motor being used as a tachometer. multiply the difference by a gain constant. The amplifier drives the large DC motor. The analog output from the computer must be amplified (the computer can only output about 20mA maximum). Vo = Voltage to motor amplifier to control speed Vi = Voltage from tachometer to measure speed or position Vd = Desired motor speed voltage (user input) P = Controller gain The basic controller is set up as shown in the figure below. The power supply may need to be constructed using two power supplies connected together. A Labview program will subtract the tachometer voltage from the desired tachometer voltage.page 563 Vo = P ( Vd – Vi ) where. D/A output (Vo) Computer amplifier motor A/D input (Vi) feedback signal tachometer or potentiometer The system below shows the components in the laboratory. and output the result to drive the motor. We can use a Labview program to implement the basic control equation described above. Apply a step function input and record the response.page 564 V+ Computer with Labview analog output Amp COM Vanalog input power supply Prelab: 1. an inertial load. 22. ii) integration of differential equations. Procedure 1. Develop a Mathcad document that will model the velocity feedback controller given. measure the response curves of the motor to a step function. desired velocity.2 Experiment 5a . For several values of proportional gain ’P’. and a gain constant. 2. motor parameters.Servomotor Proportional Control Systems Objective: To investigate simple proportional servo motor control. Post-lab: . Test the controller model using a step function. 3. Construct the equipment described in the 2.5. This is to be solved two different ways i) with Runge-Kutta integration. Mechanical Components • Theory: Recall that for a rigid body we can sum forces. 2. If the body is static (not moving). it will oscillate. All work and results. We can find the value of the spring constant by stretching the spring and measuring the forces at different points or we can apply forces and measure the displacements.1 Prelab 6a . ∑ F = Ma ∑ M = Jα If we have a system that is comprised of a spring connected to a mass. If the system also has a damper. Recall that springs ideally follow Hooke’s law.6 Lab 6 . 22. it will tend to return to rest (static) as the damper dissipates energy. we use d’Alembert’s equations for linear motion and rotation. . Find and compare the time constants for experimental and theoretical results. Compare the theoretical and actual response curves on the same graphs.Basic System Components 22. Submit: 1.6.page 565 1. If there is motion/acceleration. these forces and moments are equal to zero. If the applied forces are static. But. Kd F F .= x 2 – ----Ks Ks 1 ----.= x 2 – ----Ks Ks Next. it is already under tension or compression.= --------------x1 – x0 x2 – x0 x1 – x0 x2 – x0 1 ----. consider the basic mass-spring combinations.= --------------Ks F1 F2 F1 F2 x 0 = x 1 – ----.page 566 F = K s ∆x ∆x = x – x 0 F = Ks ( x – x0 ) F1 F2 K s = --------------. and we cannot use the unloaded length as the undeflected length. Consider that when velocity is zero. recall that the resistance force of a damper is proportional to velocity. We can measure this using the approximate derivatives as before.= --------------.x dt x ( t + ∆T ) – x ( t ) F = K d -------------------------------------- ∆T F∆T K d = -------------------------------------∆x x ( t + ∆T ) – x ( t ) Now. Both of the devices used in this lab have a preloaded spring.( F 2 – F 1 ) = x 2 – x 1 Ks F2 – F1 K s = ----------------x2 – x1 OR F = Ks x ∆F = K s ∆x ∆F K s = -----∆x F2 – F1 K s = ----------------x2 – x1 x2 x1 x 0 (undeflected) Ks F F ∆x In many cases we will get springs and devices that are preloaded. This means that when the spring has no force applied and appears to be undeflected. As the speed increases. we can find the true undeflected length using the relationships from before. the force is zero. F1 F2 x 0 = x 1 – ----. so does the force. dF = K d ---. they will oscillate. d∑ Fy = – Fs – Fg = M ---- y dt d– K s y – Mg = M ---- y dt d. but if some unbalanced force is applied.page 567 the mass and spring will remain still.2 M ---- y + K s y = – Mg dt y Ks y h ( t ) = C 1 cos -----t + C 2 M yp ( t ) = A d ---- y ( t ) = 0 dt p d ---- y y ( t ) = 0 dt p M ( 0 ) + K s ( A ) = – Mg – Mg ∴A = ---------Ks 2 2 2 + Ks M Fg Ks – Mg y ( t ) = y h ( t ) + y p ( t ) = C 1 cos -----t + C 2 + --------- M Ks . Ks -----T = M Ks 1 ----.page 568 Assume we start the mass at rest at the equilibrium height. Ks – Mg y ( 0 ) = 0 = C 1 cos ----. cos -----t + --------- Ks M Ks The natural frequency is found by completing one time period. The analog voltage output (for distance) is the black wire.( 0 ) + C 2 M M ∴C 2 = 0 Ks Mg – Mg y ( t ) = ------. The sensor used is an Allen Bradley 873C Ultrasonic Proximity Sensor. The positive supply voltage is connected to the Brown wire.-Mf 2π = 1. and mass-spring-damper system (assume values). This sensor requires a 18-30 VDC supply to operate. A solid target will give the best reflection. The black wire and common can be connected to a computer with a DAQ card to read and record voltages. Set up a Mathcad sheet for the laboratory steps. Extend the theory by finding the response for a mass-spring. and the common is connected to the blue wire. It outputs an analog voltage that is proportional to distance. • Prelab: 1. Review the theory section. The sound from the sensor travels outwards in an 8 degree cone. It emits sound pulses at 200KHz and waits for the echo from an object that is 30 to 100cm from it.( 0 ) + C 2 + --------- M Ks Mg ∴C 1 = ------------------------K s cos ( C 2 ) Ks Ks y' ( 0 ) = 0 = C 1 ----.sin ----.K s ∴f = ----. 2. . 3. mass-damper.----2π M In the lab an ultrasonic sensor will be used to measure the distances to the components as they move. 5. • Submit: 1.2 Experiment 6a . All results and calculations posted to a web page as a laboratory report. In this arrangement the spring will be precompressed. see www.page 569 22. Use the spring-damper cylinder with an attached mass and measure the position of the mass as a function of time. Place the spring inside the damper and secure the damper. Connect the computer to the ultrasonic sensor (an Allen Bradley Bulletin 873C Ultrasonic Range Sensor. 4 and 6. Use a measurement with a third mass to verify.com). This will now be used as a combined spring damper. Make sure you know how much the spring has been compressed when the damper is in neutral position. damper and spring-damper responses. 6. If the spring is pretensioned determined the ’undeformed length’. Determine if the frequency of oscillation measured matches theory. Hint: count the cycles over a period of time. . or measure the relationship between the reading number and actual time for later calculation. Hang a mass from the spring and determine the frequency of oscillation. Use two masses to find the spring constant or stiffness of the spring. Use Working Model 2D to model the spring. Determine if the release height changes the frequency. Compare the Labview data to the theoretical data for steps 2.Mechanical Components • Objective: This lab will explore a simple translational system consisting of a spring mass and damper using instrumentation and Labview. • Post-lab: 1. Attach a mass to the damper only and use Labview to collect position as a function of time as the mass drops. In the program set a time step for the voltage readings.6. 7. 2. 3. • Procedure 1. Write a Labview program to read the voltage values and save them to a data file. 3. This can be used to find the damping coefficient. and calibrate the voltages to the position of the target (DO NOT FORGET TO DO THIS). 2. 4.ab. Compare the Labview data to the working model simulations. 7.page 570 22. consider the rotating mass on the end of a torsional rod. d. θ = J ---- θ ∑ L dt h2 d2 • Prelab: .2 T = – T = Jα = J ---- θ ∑ dt T = K∆θ = K ( θ – θ 0 ) We can calculate the torsional spring coefficient using the basic mechanics of materials JGθ T = ---------L Finally.2 T = – -------. the pendulum of a clock.Oscillating Systems • Theory: Suppose a large symmetric rotating mass has a rotational inertia J. d1 h1 θ J1 G d.Oscillating Systems • Many systems undergo periodic motion. 22. For example. and a twisting rod has a torsional spring coefficient K.1 Prelab 7a . Recall the basic torsional relationships.7 Lab 7 . . 2. Plot this on a graph and verify that it is linear before connecting it to the mass. The angular position of the mass will be measured with a potentiometer. Apply a static torque and measure the deflected position. Apply a torque to offset the mass. 3. . .accept geometry for a rectangular mass and calculate the polar moment of inertia. and release it so that it oscillates. • Procedure 1. 2. • Submit: 1.Oscillation of a Torsional Spring • Objective: To study torsional oscillation using Labview and computer data collection. 22. 2.7.use previous values to estimate the oscillations using Runge-Kutta. • Post-lab: 1.2 Experiment 7a .use the spring coefficient and polar moment of inertia to estimate the natural frequency. . 4. Calculate the equation for the natural frequency for a rotating mass with a torsional spring.accept material properties and a diameter of a round shaft and determine the spring coefficient. Estimate the natural frequency by counting cycles over a long period of time. Compare the theoretical and experimental values. Set up LabVIEW to measure the angular position of the large mass. Calibrate the potentiometer so that the relationship between and output voltage and angle is known.page 571 1. All work and observations.plot the function derived using the homogeneous and particular solutions. . Set up a Mathcad sheet that will . Post the laboratory report to a web page. Set up the apparatus and connect the potentiometer to the mass. as well a handle serial commonucations. Visit the Allen Bradley web site (www.com) and review the manuals for the Ultra5000 drives. These drives are programmed using C. 2. • Prelab: 1.Research • Theory: This lab explores the use of advanced servo control systems.8.8 Lab 8 . In particular look at the installation manuals and programming manuals. In particular Allen Bradley 5000 drives will be used. The drives can be interfaced to digital and analog IO.ab. review the principles of programming in C.Servo Control Systems 22.page 572 22. Please note that the programming guide for the Ultra5000 drive contains a brief review of C pro- . If necessary.1 Prelab 5a . INPUT3 should be used to stop the motor at any time. Select the correct motor type and then select ’New Rotary.’ and give it a unique name such as ’lab. Notice the motor parameters. 3. Verify that your program can be used to control the position of the slide using a potentiometer.ULTRA 5000 DRIVES AND MOTORS 1. Attach two proximity sensors a few inches from each end of the slide to limit the stage motion.Tutorial and programming • Objective: To be able to develop programs for an AB Ultra5000 servo control system.udb’ (Note: you should put this file on a floppy disk. or zip disk so that you may use it again later.9 TUTORIAL . install the Ultraware software...) Connect the ULTRA 5000 drive to the serial port.’. • Procedure 1. 2. Run the ’Ultraware’ software.8. When these switches are off the drive will be permitted to move in the given direction. and stop the program. A lab report including the fully commented C program for the drive.. Select ’Create new file.2 Experiment 5a . It will scan the available drives to . (If not installed. Ask the instructor to verify this program before continuing to the next stage. Run the ’Motor Configuration’ program and open the ’Motors’ file. Use the ’Move’ function of the drive to verify that the forward and reverse limit switches are on the proper ends.. set the drive to ’01’ on the front of the drive. Connect the servo drive to a linear slide. • Submit: 1. and then apply power. 2. 4. The drive will use forward and reverse limit switches on INPUT1 and INPUT2.). 3. Develop a program that will use a voltage input (AIN1) from a potentiometer to position the drive..page 573 gramming practices. 22. Close the program. version 1.1. Follow the tutorial for the ULTRA5000 drives.. 22. Under the ’5KDrive’ select ’Motor’ and then select the motor type. The motor should now be controlled. Then select ’Setup’ to update the motor parameters. . and then click ’Build’. 6.page 574 locate the drive. Use ’Setup’ to update the drive parameters. and the shaft hard to turn. 7. For the motor select ’Motion’ then ’Jog’. then ’Insert Source File’. Create a project with ’Insert’ then ’Project’. Turn the motor shaft by hand. Type in the following file.000 Velocity 20. Notice how the values at the bottom of the screen change. a ’5KDrive’ should appear under ’On-line drives’. Profile Distance 40. then close the window. Click on the ’Project’ that was created on the tree.000 9. it should turn easily. 5.000 Deceleration 20. click ’Start’ to cause the motion. When done. Close the window.000 8.000 Program Deceleration 100. In the window set the values below. Now select ’Motion’ then ’Move’ and set the values below. If there are any errors fix them before continuing to the next step. After this hold the shaft and hit ’Jog forward’ then ’Jog reverse’ then ’Stop’. Program Velocity 100. Notice the values and units. When done. For the ’Drive Type’ select the correct version indicated on the Ultra 5000 drive. Change the value in ’Profile Distance’ and click ’Start’ again. 4. Enable the motor with ’Commands’ ’Enabled’ on the tool bar.000 Acceleration 20. Right click on the ’%KDrive’ and select properties.000 Program Acceleration 100. When developing control applications it is important to structure the programs so that they are easier to write and debug. Enter the following program and observe the results.page 575 #include <motion. } 10.// Wait until the move is complete Sleep(1000).h> int main(void){ InitMotionLibrary(). It should behave the same as the previous program. Drag the new file ’Project. pause for 1 second. but it has more structure. 11. // Enable control of the motor MoveSetAcc(2000). return 1. // Start the motor control functions AxisEnable(). reverse. AxisDisable(). Hold the shaft of the motor and right click on the new file just dropped and click ’Run’. // Pause for 1 second MoveDistance(-10000). Sleep(1000). MoveSetDec(2000). // Release the motor drive control .// Move in the negative direction while(MoveInProgress()){}. then stop.// Move in the positive direction while(MoveInProgress()){}. The motor shaft should move forward. MoveDistance(10000).exe’ to the ’Programs’ under the ’5KDrive’. // Set the maximum accelerations and velocity MoveSetVel(1000). Sleep(1000).h> void setup(){ InitMotionLibrary(). MoveSetDec(2000).do not exceed the maximum voltage as this may damage the drive. jog(10000). MoveSetAcc(2000). shutdown(). The pin out for this connector is given below. } void shutdown(){ AxisDisable(). } int main(void){ setup(). CN1A. jog(-10000). return 1. .page 576 #include <motion. AxisEnable(). Wires can be connected by pushing a thin slot screwdriver into the slot to release the pressure clamp. while(MoveInProgress()){}. and then inserting the wire. Sleep(1000). } 12. MoveSetVel(1000). } void jog(int distance){ MoveDistance(distance). Digital inputs and outputs for the drive are located on the upper connector. The nominal voltages to activate an input are between 12V and 24V . Digital input 1 INPUT 2 .Digital output 2 OUTPUT 3 . Also connect a multimeter to OUTPUT1 to read the output voltage. .Digital input 10 INPUT 11 .Digital input 11 INPUT 12 .Digital input 13 INPUT 14 .V+ from external supply power for the IO INPUT 9 .page 577 Connector CN1A Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Function INPUT 1 .common from external IO power supply 13.Digital input 7 INPUT 8 .Digital output 3 OUTPUT 4 .Digital input 3 INPUT 4 .Digital output 4 SHIELD . Connect an external power supply to the digital IO and connect a proximity sensor to input 1.Digital input 5 INPUT 6 .Digital input 8 OUTPUT 1 ..Digital input 2 INPUT 3 .Digital output 5 OUTPUT 6 .Digital input 16 OUTPUT 5 .Relay output 8 OUTPUT 8.Digital input 9 INPUT 10 .Relay output 8 IOCOM .Digital input 6 INPUT 7 .Digital output 6 OUTPUT 7 . Verify that the sensor is connected properly using the Ultraware software.Digital output 7 OUTPUT 8+ .Digital input 14 INPUT 16 .Digital output 1 OUTPUT 2 .Digital input 12 INPUT 13 . as shown in the diagram below.Digital input 4 INPUT 5 .for shielded cable termination IOPWR .Digital input 15 INPUT 16 . . Enter the program below and determine what the program does.page 578 IOPWR V+ power supply IOCOM Ultra 5000 drive V- V+ (brown) V.(blue) INPUT1 out (black) sensor 14. } state_last = state_now. state_last = OFF.page 579 #include <motion.h> void setup(){ InitMotionLibrary(). AxisEnable(). } void shutdown(){ AxisDisable(). state_now).// set OUTPUT1 to the INPUT1 value } shutdown(). // get the state of INPUT1 if( (state_now == ON) && (state_last == OFF) ){ jog(1000). Connect a multimeter across AOUT1 and +5VCOM to read . Analog outputs (and connections for additional encoders) are available on connector CN1B. } int main(void){ int count = 0. } 15. MoveSetDec(2000). while(count < 10){ state_now = InputGetState(1). OutputSetState(1. return 1. MoveSetVel(1000). MoveSetAcc(2000). } void jog(int distance){ MoveDistance(distance). while(MoveInProgress()){}. Connect a variable power supply to act as an analog input across AIN1 and +5VCOM (WARNING: TURN THE POWER SUPPLY OFF AND SET THE VOLTAGE AT THE MINIMUM BEFORE TURNING THE SUPPLY BACK ON). state_now. count++. setup(). analog output 1 AOUT2 .page 580 an analog output voltage. Verify the connection using the Ultraware software.internal power supply AX+ Encoder input/output A+ AX.Encoder input/output BIX+ Encoder input/output I+ IX.Encoder input/output ABX+ Encoder input/output B+ BX.analog input 2 +5VCOM internal power supply common AOUT1 .analog output 2 SHIELD . Enter the program below and determine what it does. .Encoder input/output I+5VCOM internal power supply common AIN1 .analog input 1 AIN2 .termination point for shielded cables 16. Connector CN1B Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Function +5V . AxisEnable(). locate(new_location). MoveSetVel(1000).h> void setup(){ InitMotionLibrary(). MoveSetDec(2000).// Get the voltage in from AIN1 new_location = a_in * 1000.0). AnalogOutputSetVoltage(1. int new_location. } 17. while(MoveInProgress()){}. a_in/2. while(1 == 1){ // loop forever a_in = AnalogInputGetVoltage(1). return 1. // output half the input voltage } shutdown(). } void locate(int position){ MovePosition(position). } void shutdown(){ AxisDisable(). Communications????????????????????? . } int main(void){ float a_in. setup().page 581 #include <motion. MoveSetAcc(2000). This filter will pass frequencies near a central frequency determined by the resistor and capacitor values. By changing the values we can change the overall gain of the amplifier.Filtering of Audio Signals Theory: We can build simple filters using op-amps. and off the shelf components such as resistors and capacitors. The figure below shows a band pass filter.1 Prelab 9 .10 Lab 9 . C2 R2 R1 + C1 + + Vo R3 Vi - - gain (dB) freq . or the tuned frequency.10.Filters 22.page 582 22. or phon value. audio signals have frequencies that are between 10Hz and 16KHz as illustrated in the graph below. This graph shows perceived sound level.= – ----- ------------------------------------------------------------------------------------------ 2 R 1 Vi 1 + DC R + DC R + D C C R R 2 1 1 1 1 2 1 2 As dictated by the ear. DC 1 R 1 R 2 Vo 1. . we can follow the 100 phons curve (this would be like a loud concert or very noisy factory requiring ear protection).page 583 The equations for this filter can be derived with the node voltage method. and the final transfer function is shown below. with the units of ’phons’. For example. At much lower and higher frequencies there would have to be more sound pressure for us to perceive the same loudness. ----. If the sound were at 50Hz and 113 dB it would sound as loud as 100dB sound at 1KHz. page 584 120 110 100 Sound Pressure Level (dB) 90 80 70 60 50 40 30 20 10 0 50 100 200 500 120 110 100 90 80 70 60 50 40 30 20 10 Phons 1000 2000 freq (Hz. For this lab it is important to know how the ear works because you will be using your ear as one of the experimental devices today. Prelab: 1. You are best advised to use Mathcad to do this.) 5000 10000 20000 You may appreciate that these curves are similar to transfer functions. but they are non-linear.1uF. . Draw the Bode plot for the circuit given R1=R2=1000ohms and C1=C2=0. Derive the transfer function given in the theory section. 2. CD player. . A discussion of the sound levels you perceived. Procedure: 1. Connect a small speaker to the output of the amplifier. 3.10. Submit: 1. from a radio.page 585 22. Also record the relative volumes you notice.Filtering of Audio Signals Objective: To build and test a filter for an audio system. etc. 2. Bode plots for both theory and actual grain and phase angle. Apply a sinusoidal input from a variable frequency source.2 Experiment 9 . Record your observations about the sound. 2. Use an oscilloscope to compare the amplitudes and the phase difference. Set up the circuit shown in the theory section. Supply an audio signal. The motion is normally described with a velocity profile. .Stepper Motors Theory: Stepper motors move to positions. When rotating the motor it can be stepped in the clockwise (CW) or counterclockwise (CCW) direction. as indicated by pulses from the motion controller. The motors we will use in the lab have 400 steps per revolution. but don’t rotate continuously.Stepper Motors 22. although other resolutions are common. The motion controller commands the motor drive to move by sending it pulses. or run programs which generate the overall motion. a motion controller (indexer). with a total motion time.1 Prelab 10 . This can be given by defining the maximim acceleration/deceleration and maximum velocity. or stepped. The motor controller varies the period of the pulses. The equipment to be used in the lab is comprised of a stepper motor. The motor is connected to the drive unit which will power the coils and step in the positive or negative directions. An alternative way to define these limits is to provide an acceleration and deceleration time.page 586 22. steps. and a computer running terminal software for programming.11 Lab 10 . a drive unit. at the maximum velocity.8 degrees each). At the midpoint of motion the pulse period is the shortest. A full rotation of the motor is often divided into 200 steps (of 1.11. When motion is starting or ending a longer period corresponds to a slower angular velocity. To achieve continuous rotation the motor is moved. The motion controller will accept motion commands. continuosly in one direction. 2. Develop a program to accept an input to the motion controller and then move the . 22. In the textbook review the sections on stepper motors and motion control. Make sure you are familiar with the basic operation of a stepper motor and the structure of a velocity profile.page 587 motor angle (degrees) 180 90 time(sec) -90 motor velocity (degrees/sec) ω max θ1 αmax t acc t max t dec Figure 427 Prelab: Velocity curves for motor control 1.2 Experiment 9 . Follow the attached tutorial 2. Procedure: 1. Review the manuals for the stepper motor on the course home page on claymore.11.Stepper Motors Objective: To develop a stepper motor control program. Once connected the prompt 0> will appear on the screen. Check to make sure the communication parameters are set to 9600 baud. Submit: 1. The questions answered during the tutorial. Verify the components are connected together properly based on the diagram shown below. the power LEDs on the drive unit and indexer will turn on and the stepper motor will have holding torque (the shaft won’t turn freely). Blauch and H.12 TUTORIAL . There are three main components: stepper motor. Cycling power on the indexer will cause a reset ban- . If set up properly. 2. and no flow control/handshaking. The program developed (with comments). 2. Jack) 1. Identify each unit. Examine the manuals for the stepper motor and controller. Connect a serial cable from the indexer to the COM port on the back of the PC. personal computer with terminal software RS-232 serial cable cw/pls SC8800 motor controller (indexer) ccw/dir p/cw UMK 2112A drive d/ccw unit 2 phase stepper motor 10-24V power supply 115Vac Figure 428 The stepper motor control system components 3. no parity. Set it to go "Direct to Com 1". run HyperTerminal (located under Programs->Accessories>Communications) or any other terminal emulation program. drive unit. Obtain and examine the stepper motor equipment. On the PC. 1 stop bit. Note that the drive unit obtains power from an AC source (outlet) while the indexer receives power from a DC source (power supply). Once all of the connections have been verified.page 588 motor to different positions. and indexer. 22. The indexer communicates with the PC via text transfers across a serial port. 8 data bits. apply power to the system. If nothing appears.STEPPER MOTOR CONTROLLERS (by A. press enter several times. 6. etc. To see what the current velocity profile parameters are. VS0 V2000 T0. Type in the following series of commands. hold the shaft while the motion is in progress.xx> VS<xxxxx> V<xxxxx> D<xxxxx> MC MI R RESET S STOP Description Sets the direction of motion Sets the acceleration/deceleration time in seconds Sets the starting velocity in pulses per second Sets the run velocity in pulses per second Sets the distance in pulses for the MI command Starts continuous motion Starts incremental motion Displays the status of system parameters Resets the system Controlled stop of current motion Immediate stop of current motion 5. The indexer commands of interest are the ones used to generate and execute different velocity profiles. type HELP.. Typing HELP2. HELP4.01 0.page 589 ner to appear.. type the parameter name followed immediately by a question mark (i. will display a more detailed lists of these and other profiling commands Command H<+/-> T<xx.01 vel 20000 10 2000 distance 50000 100 6000 .e. Change the acceleration and decelleration times to be longer and shorter and observe the effects using the values below. The list below highlights the commands used in this lab. HELP3. To display all of the available indexer commands. As part of your observations.5 D10000 MI 7. Observe how the stepper motor responds and how the response relates to the parameter values entered.5 0. acc/dec 0. T? will display the current acceleration/deceleration time). 4. e. at what point does the motor lose synchronization with the input pulses). Generate and execute a velocity profile that will cause the motor to rotate at one revolution/second using the continuous motion command. 13. discuss some advantages and disadvantages of using a stepper motor compared to a DC motor. Enter a program with the following commands. and interface. Generate. execute.5 TD0. determine what angle one pulse (step) corresponds to. . For this profile you will need to use the incremental motion command. You can see a list of programs in the memory using ’LIST’.page 590 8. 12. Programs can be deleted with ’DELETE’. Determine the parameter values for a velocity profile with an acceleration of 18000 rpm2. maximum velocity of 600 rpm. EDIT TEST PC0 TA0. velocity control. Determine the maximum speed of rotation for the stepper motor (i. Determine the maximum acceleration for the stepper motor (i. 10. 11. 14. Set the acceleration/deceleration parameter to several seconds. Based on the run velocity parameter value. delete ’Dx’ line ’x’ or insert ’Ix’ a line ’x’. Make a note of any strange phenomena that may occur.5 VS2000 D6000 MI Q NOTE: After this point you should use the manual for a source of examples. make the stepper motor rotate at various velocities. Using the run velocity parameter and the continuous motion command. 9. Compare your number to the resolution value on the stepper motor label. and a total run time of 10 seconds. Some issues to think about are torque. Each program will be assigned a number between 0 and 49. Based on your experiences in lab with motors. position control. The program can be run with ’RUN TEST’. make the stepper motor accelerate at various rates. at what point does the motor lose synchronization with the input pulses). Notice that the editor has commands to alter ’Ax’ line ’x’.e. and verify the profile. Using the acceleration/deceleration parameter and the continuous motion command. Decrease the run velocity to about one half the maximum speed determined previously. The motion controller has a limited set of variables available for user programs.147.483. Logical operations can be performed using ’IF’ and ’WHILE’ statements. Write a program that has a subroutine. . Refer to the manual for pinouts and electrical specifications. W. It is possible to branch within a program using ’JMP’.distance INx .position counter. Outputs can be set using the ’OUTx’ command. Z . The while loops must end with ’ENDW’ statements. >=. 17.input bit ’x’ PC . 18. <. Write a simple program that sets a general variable value. To jump to another program (subroutine) the ’JMP_SEQ’ command can be used. !=. Y. X. Connect a voltage supply to the inputs and a multimeter to the outputs and create a program to read an input and set an output as shown below.velocity VS LOOP D . the current motor position in steps 16.page 591 15. It will loop the code ’x’ times to the ’ENDL’ statement.647. where ’x’ is the output bit number. The if statements can include ’ELSE’ conditions and should terminate with ’ENDIF’ statements. The integers values are all 4 bytes and can range in value between +/-2. as indicated below. there are a fixed set availabe. The equivalent to a for-loop is the ’LOOP x’ statement.general purpose integer V. <=. the program can then return using the ’RET’ command. Write a simple program that will loop until an input becomes true. The operations can include =. >. Unlike normal programming variables. The AC current in the stator coils sets up an alternating magnetic field. Visit the Marathon Electric and Allen Bradley web sites and review the manuals for the motor and controllers.page 592 22. Using the manual determine how to change the PID parameters. Set it up and find the relationship between the input voltage and the motor speed.Variable Frequency Drives Theory: AC induction motors are designed with motor winding on the stator (outside) of the motor. Procedure: 1.13 Lab 11 . Replace the 161 controller with the 160 controller. This current creates a magnetic field that opposes the field from the stator.Variable Frequency Drives Objective: To learn the basic operation of Varaible Frequency Drives (VFD) and motors. the speed of rotation decreases.2 Experiment 11 . Don’t print these. For example a motor with four poles would rotate at half the speed of a two pole motor.13. and determine how this controller operates. For example a 3 phase motor (with two poles) that has a 60Hz power applied will with absolutly no rotational resistance rotate at 60 times per second. Follow the attached tutorial. . 22. Prelab: 1. 3. The motor drives are Allen Bradley model 160 and 161 motor drives.13. As a result a torque is created. As the number of poles in the motor rises. In actuality the rotor must rotate somewhat slower than the field changes in the stator. The speed of the motor can be controlled by changing the frequency of the AC power supplied to the motor. Determine how to use an analog input to control the speed. This field induces currents in the conductors (squirrel cage) in the rotor. 4. (and make notes and observations.) 2. Run a number of tests to see what it does. Connect the 3 phase motor to a tachometer for a velocity feedback. But in use it might rotate at 58 or 59Hz.Variable Frequency Drives 22. It is a Black Max model number 8VF56H17T2001. this difference is called slip.The motor that we will use in the lab is a 3 phase AC motor made by Marathon Electric.1 Prelab 11 . but make a not of the web address so that you can find the manuals easily during the lab. The wire from P24 (a 24V power source) and input 3 are for an emergency stop and must be connected for the drive to work. (WARNING: make sure the power is off before opening the drive. 3. These terminals can be found under a flip up panel on the bottom front of the drive that can be opened by pulling on the right side of the face. The program can be started using the green ’1’ button. For general caution the ends of the wires should be covered with electrical tape to prevent accidental contact with other conductors. These can be connected to the drive by loosening the screw on the front face of the drive. Notice the display and lights on the front face of the drive. What do you notice at very low speeds? button(s) sel up or down sel up or down sel up or down enter up or down sel up or down enter result d01 A-A01 00 01 00 A01 A02 01 02 A02 description move the the parameter number. T2 and T3.page 593 22. Program the unit using the buttons on the front panel. and relseal the drive when done) The two other lines P1 and P2 from the drive are for a thermal overload relay. AB 161 estop P24 drive 115Vac P1 L1 3 P2 3 phase N motor T1 T1 GND T2 T2 green T3 T3 2. The motor should be connected the the drive as shown in the figure below. Display .ALLEN BRADLEY 161 VARIABLE FREQUENCY DRIVES 1. from frequency move to the ’A’ parameters select the ’A’ parameter group (use up or down if not A01) select the velocity input source display the current setting select the potentiometer (on the controller) as the input accept the new value move the the start button selector move to parameter select the value for start to the ’run’ button accept the value 4. The three phase power lines are T1. When a program is running the ’RUN’ light is on. and stopped with the red ’0’ button. we will not use these.14 TUTORIAL . following the steps below (from page 17 in the manual). Connect a proximity to the controller as shown in the diagram below. Try holding the shaft (cover the shaft to avoid cuts) at high and low speeds. After the steps have been followed press the run button and turn the potentiometer to vary the speed. output status D16 . Function parameters can be set with the ’F’ locations. Try these to see what information they show. and down for an inactive input.page 594 the input values using ’D05’.total drive run time in 10 hour blocks 6. 7.The bits on the screen should move up for an active input. Input 3 will always be active because it is being used for the emergency stop (a factory default). Various display parameters are listed below. Restore the controller to the factory defaults using the sequence below from page 16 of the manual.the direction of rotation D04 . BRN BLK BLU drive P24 1 L V+ signal V- sensor 5. button(s) up or down sel up or down sel sel sel+up+down+0 sel+up+down result b-b01 b84 01 b84 b84 00 then 0. .PID parameters (when in use) D05 .input status D06 .display the motor current (try holding the shaft while turning slowly) D01 . Change the acceleration and decelleration times to 1 second using the ’F02’ and ’F03’ locations.0 description move to the ’B’ parameter groups enter the move to the reset function select the function. D02 .display the frequency of rotation D03 . make sure the value is ’01’ select the value hold down the keys for 3 seconds release the ’0’ key and continue to hold the others until the display blinks. 15 TUTORIAL . and the other a feedback from the encoder. connect these to the motor controller. controller pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 breakout pin 9 25 41 8 24 40 7 23 39 6 22 38 5 21 37 4 20 36 3 19 35 2 18 34 1 controller pin 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 breakout pin 50 17 33 49 16 32 48 15 31 47 14 30 46 13 29 45 12 28 44 11 27 43 10 26 42 d) A power cord to be connected to a normal 120Vac power source. The pin mapping from the motor controller to the terminal numbers on the motor controller are given below. This should include a brushless servo motor (Y-1003-2H). Obtain the motor and controller sets.ULTRA 100 DRIVES AND MOTORS 1.page 595 22. If not connected already. DO . a) The motor is connected to the controller with two cables. The encoder is used to measure the position and velocity of the motor. one for the power to drive the motor. c) A breakout board is provided with that will connect to the motor controller through a ribbon cable to J1. b) The controller should also have a serial cable for connecting to a PC serial port. The cables are described below. Connect this to a PC. Locate and verify they are connected as indicated in the sequence given below. an Ultra 100 Controller and miscellaneous cables. Plug in the power cord for the Ultra 100 drive and look for a light on the front to indicate that it is working. In the "drive setup" window ensure the following settings are made. Operation Mode Override: Analog Velocity Input . Select the ’IO Configuration’ window and make the following settings.page 596 NOT CONNECT THIS YET.this will set the output voltage so that every . Note: the pins on the breakout board don’t have the same numbers as on the motor controller. When prompted select ’drive 0’. WARNING: The motor might begin to turn after the next step --> Turn on the power supplies and the oscilloscope.Motor Feedback . Run the ’Ultramaster’ software on the PC. Analog Output 1: Velocity . breakout board Power Supply 18-24V + 24 40 Variable Power Supply -10V to 10V + 2 18 32 Oscilloscope A com B com 50 19 26 20 33 connector on Ultra drive 5 6 22 23 31 28 3. Scale: 500 RPM/VOLT . At this point the software should find the drive and automatically load the controller parameters from the controller. Connect the wires as shown below but do not turn on the devices yet. When done close the setup window. When it is done a setup window will appear. as measured by the encoder.this is needed so that the proper electrical and mechanical properties of the motor will be used in the control of the motor (including rotor inertia). 5. 2. 4.This will allow the voltage input (C+ and C-) to control motor velocity. Motor Model: Y-1003-2-H . In this case it will require that the breakout board be connected to the motor controller by a ribbon cable. The controller needs to be connected as shown below.this will make the analog voltage output from the controller (R+ and R-) indicate the velocity of the motor. 6. Change the voltage supply and notice how the motor responds. 17. . The pins on the controllers are 32 and 33 respectively.5ms 8. Hold the motor shaft while it is turning slowly and notice the response on the oscilloscopes. Attach the motor to a ball screw slide and attach the proximity sensors. 9. Hold the shaft again. and the response to the change should be slower. this will allow the motor to be controlled by the external voltage supply. The pins on the breakout board are 48 and 15 respectively. Observe the corresponding changes on the oscilloscope on the screen. 15. Set the parameters back to ’P’ = 200 and ’I’ = 66. Note that very small or large values of the parameters may lead to controller faults . it should be easier to stop. 18. Test these to see that they actually stop the motor in both directions when not on. When done position the oscilloscope to the side of the window so that it can be seen later. and then reverse direction to determine the dynamic load. Connect proximity sensors to digital inputs 1 and 2. Stop the ’Control Panel’.command Channel B: Velocity . 14. It should be larger than in previous trials. The slope of the ramp is a function of the maximum acceleration. blue for the common and black for the signal. Open the control panel and change the speed with the slider. 7.page 597 500RPM will produce an increase of 1V.remember to return it to normal when done. Leave the ’I’ value at ’0’ and change the ’P’ value to 50 and then change the speed again. This time the error should be larger. After this change the "IO Configuration window to set input 1 as "forward enable" and input 2 as the reverse enable". Once the proximity sensors are attached test them with the "Display Digital IO" window. Notice that the velocity change follows a ramp. The motor will move.motor feedback Time Base: 12. 16. Try other motor parameters and see how the motor behaves. Change the motor speed again and notice the final error. The wires for the proximity sensors are standardized as brown for V+. It will then pick parameters to leave the motor controller critically damped. 12.if this occurs set more reasonable ’P’ or ’I’ values and then reset the fault. Open the tuning window and change the ’I’ value to 0. and the actual oscilloscope. Select this to automatically pick the controller values. Open the "Oscilloscope" on the computer screen and make the following settings. To perform this function click the ’stop’ then ’start’ buttons. Change the motor controller to follow a position command. Reverse the voltage supply and notice that the motor turns in the other direction . You should be able to control the position of the motor by changing the variable power supply voltage. Channel A: Velocity . or by typing it in. Notice that the left hand side of the tuning window has an autotune function. 11. 10. 13. under the ’Threshold’ select ’Dark Fudicial’. To do this open the ’DVT SmartImage Sensor Emulator’ window. 8. Pause the images using the single vertical line. Apply the changes and dismiss the window and run the camera again. This will put up a window to define the product details. Delete the previous sensor and create a sensor (rotational positioning: find edge in parallelogram). The camera is capable of supporting tests for more than one product. You can select which product the tests will be for by first selecting ’Products’ then ’Product Management. We can do this by loading a set of test images.. The emulator will also start as another program... For the translation sensor. The next window will ask for the last image so select ’Measurement010. At this point we can set up a simple set of vision tests for the camera. 5.16 TUTORIAL . Select ’New’ and then enter ’part1’. As the images are captured the part may move around. Pick the file ’Measurement001.bmp’.bmp’.page 598 22. On the left hand side of the screen select ’Measurement’. Notice that as the images flip by the result of the test is shown at the bottom of the screen. In the pop-up window enter the test name ’test1’. It is common to delete and recreate the sensor a number of times to find the right position for the line. for example the right hand most side by the large circle. Run the ’Framework’ software. install it now. and a translation sensor (translational positioning: fudicial rectangle). 3. 6. Go to the emulator and load the two ’1dBarCode’ images in .’. Next we will add a test to the product. Use ’OK’ to dismiss the windows and get back to the main programming window.’. then ’Connect’. 4. Then select ’Configure’ then ’Image sequence.DVT CAMERAS (UPDATE FROM 450???) (******To be done outside the lab without the hardware) 1. 7. 10. 9. Delete the sensors. The emulator can be started by selecting the right pointing black triangle near the red circle. select the small line with two red arrows and then move the mouse over the picture and draw a line over a single section of the part. When it starts to run a window called ’PC Communications’ will appear. Go back to the Framework programming screen. so select ’Emulator’ then ’Model 630’. If the DVT software is not installed yet. 2. In this case we will only use the simulator.. In either case put the DVT CDRom in the computer and follow the tutorials on the CD. Run the software and note the rotation and translation data at the bottom of the screen as the images are processed. You should see images appear in a sequence. We need to now set up the emulator to feed images to the programming software. Select ’OK’ to get back to the main emulator window. Select ’Browse for Image’ and then look for images on the CD in the ’emulator\images\Measurement’ directory. Double click on the sensor and look at some of the options possible. Try changing these and see what happens. In Framework run the camera so that these appear on the screen. . then pause the camera. Draw the sensor line over the middle of the barcode.page 599 the ’emulator\images\1DReader’. On the left hand side of the screen select ’Readers’ then ’Barcode Sensor: Line for 1D codes’. 2 THE TECHNICAL DEPTH OF THE REPORT • This is the most common question for beginning report writers.to leave a record of work done so that others may continue on . . make it clear that they are an optional part of the report and can be skipped.(lets forget about this one) as a student you must do them to get marks .1 WHY WRITE REPORTS? • Reports are written for a number of reasons. If the question we are probably best to condense the section or leave it out. • Your reports are most likely to find their way to a superiors desk than you are to meet the individual. reports are the most common form of document we will write. • Avoid more artistic sections.they are required for legal reasons (contract or legislation) .they bring closure to the project 23. but in many cases can make a dramatic impact on our progression. • Note: typically these documents are done as a long written document -this is done in point form for more mercenary reasons. It is somewhat arrogant to force the reader .“What happens if I am hit by a car.page 600 23. • Report writing is an art that we often overlook.to let other engineers know the results of an experiment .as a record you may use yourself if you must do work again some time later . WRITING REPORTS • As engineers. • Always follow the doctrine . 23.“If I was reading this before starting the project would I look at this section and say it is not needed?”. If you put these in. • Always ask the question . could another pick up my report and continue?” if the answer to this question is no the report is too short. A summary of details.3 TYPES OF REPORTS • We do different types of reports. Executive .Theses ‘Lab Reports’ describe one or more experiments. Title. 23. Equipment . who did the work. This should end with some comparison of alternatives. It is completely unacceptable to make incorrect entries or leave out important steps or data. Date .A report to apprise supervisors and others as to the progress of a project or other major undertaking. Project .page 601 to 23. and a set of conclusions. or an instrument is found to be out of .A description of work done in a project to inform other engineers who may be asked to take up further work on the project. observations. 2.a review of applicable theory and calculations necessary. The completeness of detail allows you (and others) to review these and verify the correctness of what has been done. They should also contain the analysis and conclusions. Purpose .1 Laboratory • Purpose: These reports should outline your procedure and results in detail. including. Laboratory . Author. Research .A summary of current advances in a topic.a list of the required equipment will help anybody trying to replicate the procedure. test results.these make it clear what the labs contain. Consulting . This is best written in the form of a scientific goal using the scientific methods.a brief one line statement that allows a quick overview of what the experiment is about. • Standard Format: 1. Any design work is done at this stage 4.A brief summary of the report. If there are problems in the data. Specific identifying numbers should be listed when possible. Theory . Typically they will also contain a recommendation.3. 3. the results. and any implications for decision making at the management levels. These have been historically used for hundreds of years and are accepted as a form of scientific and legal evidence. and when it was done. and the conclusions drawn from them. Interim . . We want to use this as a scientific protocol. etc.will the counter increment/decrement between 0 to 9? • NOTE: These reports are much easier to write if you prepare all of the calculations. etc. Wyred . At this point we want to consider the scientific method. If testing designs these are the specifications.) 7. 23.. 6. • Style: These are meant to be written AS the work is done. as appropriate.To conclude we will summarize the significant results. Examples might be. graphs. The level of detail should be enough that somebody else could replicate the procedure. M. power loss. believe me.. Discussion . If you sit down and decide to do things as you write it will take twice as long and get you half the marks. Results (Note: sometimes procedure and results are mixed) . high humidity. 8. we can track the problems to specific sets of data and equipment. etc. I have written many in the past and I mark them now. and make general statements either upholding or rejecting our purpose. before you start to write.these are sequential operations that describe what was done during the experiment..what is the thermal capacity of a material? .1.An Example First Draft of a Report Grand Valley State University Padnos School of Engineering EGR 345 Dynamics Systems Modeling and Control Laboratory Exercise 7 Title: The Cooling of Coffee Author: I. 5.what is the bandwidth of an amplifier? . Conclusions ..At this stage the results are reviewed for trends and other observations. graphs. As a result the work should be past tense • Laboratory reports should have one or more hypotheses that are to be tested. It will also be very helpful to note other events that occur (e.g. Procedure .1 .3.the results are recorded in tables.page 602 calibration. . The factors involved in this convection/conduction can be difficult to measure directly.( θ coffee – θ air ) R where. there will be a corresponding temperature increase. 1998 Purpose: To derive a theoretical model of the rate at which coffee cools and experimentally verify the model and find coefficients. Consider the temperature difference between the coffee and the ambient temperature. In a typical use. . This relationship can be seen formally in the equation below. The basic relationships are given below.page 603 Date: Dec. the higher the rate of heat flow out of the coffee. This is known as the thermal capacitance.. The greater the temperature difference. 23. As the amount of energy rises. Theory: When coffee is heated kinetic energy is added. but we can approximate them with a simple thermal resistance. q = heat flow rate from coffee to air (J/s ) R = thermal resistance between air and coffee θ = temperatures in the coffee and air We can also consider that coffee has a certain thermal capacity for the heat energy. 1 q = -. We can also assume that the atmosphere is so large that the heat transfer will not change the temperature. coffee cools as heat is lost through convection and conduction to the air and solids in contact. and this value is unique for every material. I will assume that the energy flow rate into the coffee is negligible. when coffee is cooled kinetic energy is removed. q C coffee C coffee where.= --------------. dθ coffee –1 ----------------. θ coffee = -----------------------------------.( θ coffee – θ air ) dt M coffee σ coffee R dθ coffee 1 1 ∴----------------.q C coffee dt The temperatures can be found by consider that the energy flowing out of the cup.q C coffee dt dθ coffee –1 .= -------------------------------. We will make two assumptions. the temperature in the coffee and air are governed by the two capacitances. θair M coffee σ coffee R M coffee σ coffee R dt This differential equation can then be solved to find the temperature as a function of time.( q in – qout ) = --------------. And. C coffee = thermal capacitance C coffee = M coffee σ coffee where.page 604 –1 1 ∆θ coffee = --------------. and that there is no energy flowing into the coffee.= --------------.1 ∴-----------------. and into the atmosphere is governed by the resistance. -.+ -----------------------------------. . M coffee = mass of thermal body σ coffee = specific heat of material in mas s dθ coffee –1 ----------------. that the thermal capacitance of the atmosphere is infinite. + -----------------------------------.θ = BCe Ct dt ∴BCe 1 1 Ct + -----------------------------------. the initial temperature of the coffee should be used. θ 0 = A + Be C(0) = θ air + B –t ---------------------------------M coffee σ coffee R B = θ 0 – θair The final equation is.+ -----------------------------------. + -----------------------------------.= 0 M coffee σ coffee R –1 A -----------------------------------. θ air = 0 M coffee σ coffee R M coffee σ coffee R M coffee σ coffee R B BC + -----------------------------------.page 605 Guess θ = A + Be Ct Ct d---.Proctor Silex Model 1234A 1 thermocouple (gvsu #632357) 1 temperature meter (gvsu #234364) 1 thermometer . θ air = 0 M coffee σ coffee R M coffee σ coffee R –1 C = -----------------------------------M coffee σ coffee R A = θ air To find B. τ = M coffee σ coffee R Equipment: 1 ceramic coffee cup (14 oz. θ = θ air + ( θ 0 – θ air )e The time constant of this problem can be taken from the differential equation above. ground coffee 1 coffee maker . θ air M coffee σ coffee R M coffee σ coffee R –1 B A Ct ∴e BC + -----------------------------------.) 2 oz. ( A + Be ) = -----------------------------------. Coffee was poured into the cup and. 2. and the pot was full. The mass of the empty coffee cup was measured on the scale and found to be 214g.page 606 2 quarts of tap water 1 standard #2 coffee filter 1 clock with second hand 1 small scale (gvsu# 63424) Procedure and Results: 1. The coffee pot was filled with water and this was put into the coffee maker. The coffee filter and grounds were put into the machine. 3. These values were recorded in Table 1 below. Table 1: Coffee temperatures at 10 minute intervals time (min) 0 10 20 30 40 50 60 temperature (deg C) 65 53 43 35 30 28 26 Discussion: The difference between the temperature of the coffee in the pot and in the cup was . 4. After five minutes approximately the coffee was done. The air temperature in the room was measured with the thermometer and found to be 24C. The temperature of the coffee in the pot was measured using the thermocouple and temperature meter and found to be 70C. The temperature was 65C. During this period the cup was left on a table top and allowed to cool in the ambient air temperature. the temperature was measured again. and the machine was turned on. after allowing 1 minute for the temperature to equalize. Readings of the coffee temperature were taken every 10 minutes for the next 60 minutes. During this period the mass of the full coffee cup was measured and found to be 478g. except for the point at 30 minutes. where there is a difference of 3. The readings for temperature over time are graphed in Figure 1 below.5 degrees C.page 607 5C. temp (deg C) 60 40 24 20 0 20 τ ≈ 32min 40 60 t (min) Figure 1 . This indicates that some of the heat energy in the coffee was lost to heating the cup. and from these we can graphically estimate the time constant at approximately 32 minutes. The graph clearly shows that there is good agreement between the two curves.A graph of coffee temperature measured at 10 minute intervals We can compare the theoretical and experimental models by using plotting both on the same graph. These show the first-order response as expected. . but I will assume that the heating of the cup was complete within the first minute. This change is significant. and this will have no effect on the data collected afterwards. except for a single data point. the thermal resistance is found to be 1731sC/J. the results can be used to calculate a thermal resistance. This error was most likely .2 --------KgJ τ = 32min = 1920s Conclusion: In general the models agreed well.5 deg. difference of 3.5% 65 – 24 Finally.Comparison of experimental and modelled curves This gives an overall error of 8. and have the time constant.100 = 8. only being 8.5 error = ----------------.264Kg Cσ coffee = 4.page 608 temp (deg C) 60 max. compared to the total range of the data. If we know the mass of the coffee and assume that the coffee has the same specific heat as water.= 1731 ----J M coffee σ coffee M coffee = 478g – 214g = 0. τ = M coffee σ coffee R sC τ R = -------------------------------. 3.5% of the entire data range.5% between these two curves. This error was relatively small. C experimental data mathematical model 40 20 0 20 40 60 t (min) Figure 2 . Outline what you know on a word processor in point form and find the ‘holes’ 3.1. and it will be distributed in the lab. 23. • Strategy A: 1.2 . These reports serve as a well known.3 Project • Purpose: These reports allow the developer or team to document all of the design decisions made during the course of the project.An Example Final Draft of a Report • A final draft of the report is available on the course website in Mathcad format. In many cases they will not have the opportunity to talk to us. Rearrange the points into a logical structure 6. Do research to find the missing information 4. After reading a research report another reader should be able to discuss advanced topics in general terms. In the procedure the temperature measuring location was not fixed. The error value is greater than the theoretical value. central document that gathers all relevant information.page 609 caused by a single measurement error.3. which suggests that the temperature might have been read at a "hot spot". Proof read and edit 23. which probably resulted in a variation in measurement location.3. 23. Clearly define the objectives for the report 2. Define the goals for the project clearly in point form .3.2 Research • Purpose: After looking at a technical field we use these reports to condense the important details and differences. • Strategy A: 1. This report should also mention avenues not taken. Convert point form into full text 7. or we may not have the time. Quite often the projects that we start will be handed off to others after a period of time. Incorporate the new and old information (still in point form) 5. Proof read and edit 23. When a project is initially planned.6 Interim • Purpose: This report is normally a formal report to track the progress of a project. equations. The report typically ends with conclusions. as well as major achievements and problems. As work continues on the project add notes and figures 6. The consultant will review the details of the problem.figures . etc.page 610 2.tables . Basically these save a manager from having to read a complete report to find the details that interest him/her. do tests as required.4 Executive • Purpose: These reports condense long topics into a very brief document. The interim report will indicate progress relative to the initial timeline. 7. As a result we use a number of common items. Examine available options and also add these in point form 3. typically less than one page in length. .equations - . Start to examine engineering aspects of the options 4. When the project is complete. Make engineering decisions.3.3. suggestions or recommendations.3. 23. 23. and summarize the results. it will be given a timeline to follow. 23. and add point form to the document 5.4 ELEMENTS • In reports we must back up our opinions with data. drawings.5 Consulting • Purpose: These reports are typically commissioned by an independent third party to review a difficult problem. convert the point form to full text. 1’ • The figures do not need to immediately follow the reference. etc. For example “Hardness (RHC)” instead of “RHC” .the smallest features are visible .1 Figures • Figures include drawings. and cropped to size .4. . • These days it is common to cut and paste figures in software.scale the curve to make good use of the graph . schematics.scanned photographs are clear and cropped to size . Make sure . linear regression) .the colors print properly in the final form or print well as black and white . We will often move figures to make the type setting work out better. there MUST be a mention of them in the written text.the resolution is appropriate .page 611 • When these elements are included.scanned drawings are clean and cropped to size .if fitting a line/curve to the points indicate the method used (e.avoid overly busy graphs . For example “Figure 1 .digital photographs should be properly lit. but they should be kept in sequence. • They should be labelled underneath sequentially and given a brief title to distinguish it from other graphs.try not to use more than 5 curves on the same graph .g.label axes with descriptive term.clearly label units and scales .use legends that can be seen in black and white . graphs. charts.screen captures are clipped to include only relevant data 23. • If drawing graphs by computer.Voltage and currents for 50 ohm resistor” • In the body of the report the reference may be shortened to ‘Fig. • They allow dense information presentation.2 Tables • Tables are often treated as figures. .page 612 Figure 2 . wood • Legends can be added to tables to help condense size. typically numerical in nature. Table 2: A Comparison of Toy Vehicle Properties Description car truck motorcycle 3 6 2 Number red blue green Color Shape rectangular long small Material die cast polyprop.Various Techniques for Making a Sphere with AMP 23.4. 4.866 ∴ tan θ R = ---------------1 + 0.4 Experimental Data • When analyzing the results from an experiment there are a few basic methods that may be used. use a good equation editor.5 ∴θ R = 30° 98 sin 60° = F R sin 30° ∴F R = 170N 23. etc are visible. and watch to make sure subscripts.= tan θ R 1 + cos 60° cos θ R 0. • Box in equations of great significance. • Number equations that are referred to in the text.4.= ----------------------------------sin θ R cos θ R sin θ R sin 60° ∴-------------------------.3 Equations • When presenting equations.= -------------. Percent difference Mean and standard deviation Point by point Matching functions - . + ∑ Fx ∑ Fy = – T 1 sin 60° + F R sin θ R = 0 (1) (2) sub (1) into (2) + = – T 1 – T 1 cos ( 60° ) + F R cos θ R = 0 T 1 sin 60° T 1 + T 1 cos 60° ∴F R = ---------------------.page 613 23. But. or the reader may want to get additional detail.. XXXXXXXXXXXXX 23. . [Yackish.. [14]). and the references are listed numerically at the end. • Footnotes are not commonly used in engineering works.. The numbers are used in the body of the paper (eg.7 Acknowledgments • When others have contributed to the work but are not listed as authors we may choose to recognize them.5 Result Summary • It is very important to put a summary of results at the end of a report.page 614 etc. • Another method is to list the author name and year (eg. XXXXXXXXXXXXXX Add more XXXXXXXXXXXXXXXXX 23. • Acknowledgments are brief statements that indicate who has contributed to a work. 1997]) and then list the references at the end of the report.4.. • Reference formats vary between publication sources.6 References • References help provide direction to the sources of information when the information may be questioned. 23.4. • One popular method for references is to number them. the best rule is be consistent.4.. . IBM means “Ion Beam Manufacturing”) .5 GENERAL FORMATTING • Some general formatting items are. roman numerals starting from ‘i)’ on the first page arabic numerals starting from ‘1’ on the .number sections sequentially with roman or Arabic numerals • For numbers.number all pages sequentially.long tables of materials data .avoid informal phrases (e.g. . giga. “show me the money”) . milli. mega. kilo. This is very useful for multi part manuals for example ‘4-7’ would be the 7th page in the 4th section .units are required always • General English usage.page 615 23. but is too bulky to include. .reviews of basic theory . • Examples of appendices include.g.4.note that you must read to double guess the smell checker.check spelling . .check grammar .use engineering notation (move exponents 3 places) so that units are always micro.define acronyms and jargon the first time you use them (e. number pages by section.long test results 23.use significant figures to round the numbers .if pages are blank label them ‘this page left blank’ .or. etc. one option is to add an appendix.sample calculations . .. .8 Appendices • When we have information that is needed to support a report.program listings . it is fine to say ‘I’ or ‘we’. movement. . For example.use exact engineering terms when needed. but don’t get carried away.” is better put “Pressure probe readings were taken as the probe was inserted”. sliding. don’t try to get creative. .keep it simple (especially the introduction) .don’t be afraid to reuse terms.get to the point and be concise. avoid personal opinions or ‘gut feels’ . • General engineering rules are. displacing.all statements should be justified. phases or words if it is an exact description. as the probe was ascending up the chimney towards the top. For example. For example. “Electronic computer based digital readings can provided a highly accurate data source to improve the quality of the ascertained data.page 616 • General style rules. . “Readings of the pressure.” . .” could be replaced with “Computer based data collection is more accurate. etc. were taken.most authors trying to be eloquent end up sounding long winded and pretentious. . we could increase confusion by also describing translation as motion. and tailored to meet our engineering requirements.matrices. angles and triple product . small angle approximation .linear. polar form. circles.conics.straight line equations .divergence and curl . sine. adjoint. areas of parallelograms. ellipses. inverse.integration of volumes . determinants.quadratic equation .guessing and separation . eigenvectors .by parts and separation . MATHEMATICAL TOOLS ***** This contains additions and sections by Dr. cofactors. . cosine. Andrew Sterian.triangles. but it is designed to be a quick reference guide to support the engineer required to use techniques that may not have been used recently. second-order .centroids . but for reference. • This is not intended for learning. Cramer’s rule.complex numbers. • The section outlined here is not intended to teach the elements of mathematics. minima and inflection points . • We use math in almost every problem we solve.solenoidal and conservative fields . etc.integration .solving equations using inverse matrices.slop and perpendicular .first-order differential equations .maxima. 24.1 INTRODUCTION • This section has been greatly enhanced. non-homogeneous. .second-order differential equation . • For those planning to write the first ABET Fundamentals of Engineering exam. homogeneous. multiplication .limits.dot and cross products. As a result the more relevant topics of mathematics are summarized here. L’Hospital’s rule. conjugate. . addition of polar forms .page 617 24. substitution .integration of areas . the following topics are commonly on the exam. etc.eigenvalues. probability .trig identities . standard deviation.1 Constants and Other Stuff • A good place to start a short list of mathematical relationships is with greek letters name lower case α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ φ χ ψ ω upper case Α Β Γ ∆ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega .taylor series . spherical .mean..cartesian.derivative .basics. cylindrical. chain rule.log properties .basic coordinate transformations . partial fractions 24. . small angles approx.1.permutations and combinations . etc.page 618 . mode.partial fractions .integration using Laplace transforms . natural log. page 619 Figure 429 The greek alphabet • The constants listed are amount some of the main ones. other values can be derived through calculation using modern calculators or computers.29578° Figure 430 Some universal constants 24.57721566 = Eulers constant 1radian = 57.1415927 = pi γ = 0. and are described in sufficient detail for our use.1.2 Basic Operations • These operations are generally universal. • Basic properties include. commutative distributive associative a+b = b+a a ( b + c ) = ab + ac a ( bc ) = ( ab )c a + (b + c) = (a + b) + c Figure 431 Basic algebra properties . 1 n e = 2. The values are typically given with more than 15 places of accuracy so that they can be used for double precision calculations.7182818 = lim 1 + -- = natural logarithm base n n → ∞ π = 3. page 620 24.1. if x is not 0 x –p 0 x = x m --n 1 -n n x x m 1= ---p x n n n = n = x n⋅m ( xy ) = ( x ) ( y ) n x = nx -----y n y Figure 433 Properties of exponents • Logarithms also have a few basic properties of use.3 Exponents and Logarithms • The basic properties of exponents are so important they demand some sort of mention (x )( x ) = x (x ) ---------. . n! = 1 ⋅ 2 ⋅ 3 ⋅ 4 ⋅ … ⋅ n 0! = 1 Figure 432 The basic factorial operator 24.1.2.1 .Factorial • A compact representation of a series of increasing multiples.= x n – m m (x ) (x ) n m n n m n+m x = 1 . 1. = log n ( x ) – logn ( y ) y log n ( x ) = ylogn ( x ) logm ( x ) log n ( x ) = -----------------logm ( n ) ln ( A ∠θ ) = ln ( A ) + ( θ + 2πk )j k∈I y log n ( n ) = 1 log n ( 1 ) = 0 Figure 435 Properties of logarithms 24. log n ( xy ) = log n ( x ) + log n ( y ) x logn .page 621 The basic base 10 logarithm: log x = y The basic base n logarithm: log n x = y x = n y x = 10 y The basic natural logarithm (e is a constant with a value found near the start of this section: ln x = log e x = y x = e y Figure 434 Definitions of logarithms • All logarithms observe a basic set of rules for their application. .4 Polynomial Expansions • Binomial expansion for polynomials. + 321 28 (x y ) 2 2 3 4 4 2 2 h) i) 5 8 -. Simplify the following expressions.a x +…+x 2! Figure 436 A general expansion of a polynomial 24.= 4 x+2 2 3 j) k) l) 4x – 8y .= --.3 9 5 - 4 ------5 (y + 4) (y – 2) x y x+1 ----------. Are the following expressions equivalent? a) b) c) d) e) f) g) h) A ( 5 + B ) – C = 5A + B – C A+B A B ------------.+ --.-.5 Practice Problems 1.page 622 ( a + x ) = a + na n n n–1 n( n – 1 ) n – 2 2 n x + ------------------. a) b) c) d) e) f) g) x ( x + 2 ) – 3x 2 ( x + 3 ) ( x + 1 )x -------------------------------------(x + 1) x 3 log ( x ) 64 ----16 15 --------.1.C+D C D log ( ab ) = log ( a ) + log ( b ) 5(5 ) = 5 4 5 3 log ( 4 ) = log ( 16 ) ( x + 6 ) ( x – 6 ) = x + 36 10 log ( 5 ) = ----10 5 6 ( x + 1 ) .= x 2 + 2x + 1 -----------------(x + 1) 2 2 2. B1 1 a) A + B -----------. a) n log ( x ) + m log ( x ) – log ( x ) 2n log ( x ) + 3m log ( x ) – 4 log ( x ) ( 2n + 3m – 4 ) log ( x ) ( 2n + 3m – 4 ) log ( x ) 2 3 4 . x2 d) log ( x 5 ) + log ( x 3 ) (ans. x2 3 = (x y ) = x y 2 5 3 6 15 d) log ( x 5 ) + log ( x 3 ) = 5 log ( x ) + 3 log ( x ) = 8 log ( x ) 4. Simplify the following expressions. A.AB AB AB B A AB b) -----------A + B cannot be simplified 4 5 c) ( x y ) -------------.page 623 3.+ -. Simplify the following expressions. a) A + B -----------AB AB b) -----------A+B 4 5 3 c) ( x y ) -------------. a) n log ( x ) + m log ( x ) – log ( x ) 2 3 4 (ans.= -----.+ -----.= -. = x + 2 y+z (ans. y+x ---------. Find the limits below.2 3 3 t → ∞ 5t 3 + 1 5(∞) + 1 5(∞) . a) b) 3 t3 + 5 0 +5 lim ---------------- = ---------------------.page 624 5.= 0. y+x ---------. a) t3 + 5 lim ---------------- t → 0 5t 3 + 1 t3 + 5 lim ---------------- t → ∞ 5t 3 + 1 b) (ans.= -------------. Rearrange the following equation so that only ‘y’ is on the left hand side.= x + 2 y+z y + x = (x + 2)(y + z) y + x = xy + xz + 2y + 2z y – xy – 2y = xz + 2z – x y ( – x – 1 ) = xz + 2z – x xz + 2z – x y = ------------------------–x–1 6.= 5 3 t → 0 5t 3 + 1 5(0) + 1 3 3 t3 + 5 ∞ +5 ∞ lim ---------------- = ----------------------. ax + bx + c = 0 = a ( x – r 1 ) ( x – r 2 ) 2 – b ± b – 4ac r 1.1 Discrete and Continuous Probability Distributions Binomial P(m) = Poisson P(m) = t≤m t≤m ∑ t p q n λe -----------t! t –λ t n–t q = 1–p q.2 FUNCTIONS 24.page 625 24. r 2 = -------------------------------------2a 2 Figure 438 Quadratic equation . p ∈ [ 0.2.2 Basic Polynomials • The quadratic equation appears in almost every engineering discipline. therefore is of great importance. 1 ] ∑ λ>0 Hypergeometric r s t n – t P ( m ) = ∑ ---------------------- r + s t≤m n 1 x –t2 P ( x ) = ---------.2.∫ e dt 2π –∞ Normal Figure 437 Distribution functions 24. r 2 = ----------. This can be done by first reducing the equation to a quadratic. = 0 2 2 3 2 2 2 4 3 2 Figure 440 Quartic equations .– -.( S – T ) 2 2 3 S+T a j 3 . calculate. x + ax + bx + c = 0 = ( x – r 1 ) ( x – r 2 ) ( x – r 3 ) First.– -------.– -. r 4 = z + -----------------------------------------.( S – T ) 2 2 3 Figure 439 Cubic equations • On a few occasions a quartic equation will also have to be solved. 3b – a Q = ----------------9 2 3 2 9ab – 27c – 2a R = -------------------------------------54 3 S = 3 R+ Q +R 3 2 T = 3 R– Q +R 3 2 Then the roots.+ -------.page 626 • Cubic equations also appear on a regular basic. find the roots of the 2 equations below. solve the equation below to get a real root (call it ‘y’). and as a result should also be considered. a + a 2 – 4b + 4y y + y2 – 4d r 1. r 2 = z + ------------------------------------------- z + ----------------------------. y – by + ( ac – 4d )y + ( 4bd – c – a d ) = 0 Next. z + ----------------------------.r 3 = ----------. x + ax + bx + cx + d = 0 = ( x – r 1 ) ( x – r 2 ) ( x – r 3 ) ( x – r 4 ) First. = 0 2 2 2 2 y – y2 – 4d 2 a – a – 4b + 4y r 3. a r 1 = S + T – -3 S+T a j 3 . 2.3 Partial Fractions • The next is a flowchart for partial fraction expansions.page 627 24. start with a function that has a polynomial numerator and denominator is the order of the numerator >= denominator? yes use long division to reduce the order of the numerator no Find roots of the denominator and break the equation into partial fraction form with unknown values OR use limits technique. . If there are higher order roots (repeated terms) then derivatives will be required to find solutions use algebra technique Done Figure 441 The methodolgy for solving partial fractions • The partial fraction expansion for. = ---.1 = lim ---. s → 0 ds s + 1 = lim [ – ( s + 1 ) ] = – 1 s→0 –2 d.page 628 A B 1 Cx ( s ) = -------------------.+ ---------2 2 s s+1 s (s + 1) s 1 C = lim ( s + 1 ) -------------------. 2 s → 0 ds s (s + 1) Figure 442 A partial fraction example • Consider the example below where the order of the numerator is larger than the denominator.s -------------------.+ -.= 1 s+1 s→0 d. .2 1 B = lim ---. 2 s→0 s (s + 1) = 1 1= lim ---------. ---------. 2 s → –1 s (s + 1) 1 2 A = lim s -------------------. page 629 5s + 3s + 8s + 6 x ( s ) = ------------------------------------------2 s +4 This cannot be solved using partial fractions because the numerator is 3rd order and the denominator is only 2nd order.= ---. Therefore long division can be used to reduce the order of the equation.+ -----------------.+ --------------3 2 3 2 (s + 1) 2 s (s + 1) s (s + 1) s (s + 1) Figure 444 Partial fractions with repeated roots . – 12s – 6 x ( s ) = 5s + 3 + --------------------2 s +4 solve – 12s – 6 A B --------------------. as shown below.= -----------. 5 F ( s ) = ----------------------3 2 s (s + 1) 5 A -C D E ----------------------.+ -----------2 s + 2j s – 2j s +4 Figure 443 Solving partial fractions when the numerator order is greater than the denominator • When the order of the denominator terms is greater than 1 it requires an expanded partial fraction form.+ B + -----------------. 5s + 3 s +4 2 3 2 5s + 3s + 8s + 6 3 5s + 20s 3s – 12s + 6 2 3s + 12 2 3 2 – 12s – 6 This can now be used to write a new function that has a reduced portion that can be solved with partial fractions. = --.4 Summation and Series b • The notation is equivalent to ∑ xi and b integers and .+ --------------3 2 2 s ( s + 1 )3 ( s + 1 )2 ( s + 1 ) s s (s + 1) A ( s + 1 ) + Bs ( s + 1 ) + Cs + Ds ( s + 1 ) + Es ( s + 1 ) = ----------------------------------------------------------------------------------------------------------------------------------------3 2 s (s + 1) 4 3 2 3 3 2 2 2 2 s ( B + E ) + s ( A + 3B + D + 2E ) + s ( 3A + 3B + C + D + E ) + s ( 3A + B ) + ( A ) = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------3 2 s (s + 1) 0 1 3 3 1 1 3 3 1 0 0 0 1 0 0 0 1 1 0 0 1 2 1 0 0 A 0 B 0 C = 0 D 0 E 5 A 0 1 B 1 3 C = 3 3 D 3 1 E 1 0 0 0 1 0 0 0 1 1 0 0 1 2 1 0 0 –1 0 5 0 – 15 0 = 5 0 10 5 15 5 5.page 630 • We can solve the previous problem using the algebra technique.+ -------.+ -----------------.– 15 5 10 15 ----------------------.= ---.+ -----------------.+ B + -----------------. The index variable are b≥a matter. • Operations on summations: b a i=a xa + xa + 1 + xa + 2 + … + xb assuming is a placeholder whose name does not i a ∑ xi i=a = ∑ xi i=b . 5 A -C D E ----------------------.+ --------------3 2 3 2 (s + 1) 2 s s (s + 1) (s + 1) s (s + 1) Figure 445 An algebra solution to partial fractions 24.+ -----------------.2. 1 summation the does not converge. α = 1 i=0 i ∞ ∑α i=0 i 1 = ----------.. α ≠ 1 for both real and complex α .N ( N + 1 ) 2 1 – αN ---------------.α For 1–α α ≥ . ∑ α = 1–α N. .page 631 b b ∑ αxi i=a b = α ∑ xi b i=a b ∑ xi + ∑ yj i=a b j=a c = ∑ ( xi + yi ) i=a c ∑ xi + ∑ i=a b i = b+1 d xi = ∑ xi i=a b d y = x ∑ i ∑ j i = a j = c ∑ ∑ xi yj i=a j=c • Some common summations: N ∑i i=1 N–1 1 = -. α < 1 for both real and complex . Solve the following equation to find ‘x’.5 Practice Problems 1.g.page 632 24. a) b) c) x + 2x + 1 = ( x + 1 ) ( x + 1 ) x – 2x + 1 x –1 x +1 2 2 2 2 d) e) f) x + x + 10 2 2. – 2 2 2 3. e.5 x + 4---------------.= ------------------.0.= 0.5 + ---------------.2. 2x + 8x = – 8 x + 4x + 4 = 0 2 (x + 2) = 0 x = – 2.= A + ----------.5 2 x x+8 x + 8x . x + 4x+4 B---------------. 2x + 8x = –8 2 (ans.= Ax + 8A + Bx --------------------------------2 2 x(x + 8) x x+8 x + 8x x + 8x ( 1 )x + 4 = ( A + B )x + 8A 8A = 4 A = 0. x + 4---------------2 x + 8x (ans. Reduce the following expression to partial fraction form. Convert the following polynomials to multiplied terms as shown in the example..5 1 = A+B B = 0. 1 Trigonometry • The basic trigonometry functions are.= ---------r sec θ y 1sin θ tan θ = . y 1sin θ = .3 SPATIAL RELATIONSHIPS 24.page 633 24.sin 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° .= ---------.= ----------x cot θ cos θ Pythagorean Formula: r = x +y 2 2 2 r y θ x • Graphs of these functions are given below.3. Sine .= ---------r csc θ x 1 cos θ = . page 634 Cosine .tan 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° Cosecant .cos 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° Tangent .csc 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° . .page 635 Secant .sec 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° Cotangent -cot 1 -270° -180° -90° 0° -1 90° 180° 270° 360° 450° • NOTE: Keep in mind when finding these trig values. may need additions of ±90° or ±180°. that any value that does not lie in the right hand quadrants of cartesian space. These are often best used when attempting to manipulate equations.page 636 Cosine Law: c = a + b – 2ab cos θ c c Sine Law: a b c ------------. .= ------------sin θ A sin θ B sin θ C θB θC θA b 2 2 2 a • Now a group of trigonometric relationships will be given.= ------------. 2 Hyperbolic Functions • The basic definitions are given below.= ± 1 + cos θ -------------------2 2 θ sin θ 1 – cos θ tan -.page 637 sin ( – θ ) = – sin θ cos ( – θ ) = cos θ tan ( – θ ) = – tan θ sin θ = cos ( θ – 90° ) = cos ( 90° – θ ) = etc. sin ( θ 1 ± θ 2 ) = sin θ 1 cos θ 2 ± cos θ 1 sin θ 2 cos ( θ1 ± θ 2 ) = cos θ 1 cos θ 2 − sin θ 1 sin θ 2 + tan θ 1 ± tan θ 2 tan ( θ 1 ± θ 2 ) = -----------------------------------1 − tan θ 1 tan θ 2 + cot θ 1 cot θ2 − 1 + cot ( θ 1 ± θ 2 ) = -----------------------------------tan θ 2 ± tan θ 1 θ sin -.= -------------------.3.= -------------------2 1 + cos θ sin θ ( cos θ ) + ( sin θ ) = 1 2 2 OR OR sin ( 2θ ) = 2 sin θ cos θ cos ( 2θ ) = ( cos θ ) + ( sin θ ) 2 2 -ve if in left hand quadrants • These can also be related to complex exponents. e +e cos θ = --------------------2 jθ –jθ e –e sin θ = --------------------2j jθ –j θ 24. .= ± 1 – cos θ -------------------2 2 θ cos -. = ----------------.page 638 e –e sinh ( x ) = ----------------.= hyperbolic sine of x 2 e +e cosh ( x ) = ----------------. .= hyperbolic cosine of x 2 sinh ( x ) e –e tanh ( x ) = -----------------.= hyperbolic cosecant of x x –x sinh ( x ) e –e 1 2 sech ( x ) = -----------------. sinh ( – x ) = – sinh ( x ) cosh ( – x ) = cosh ( x ) tanh ( – x ) = – tanh ( x ) csch ( – x ) = – csch ( x ) sech ( – x ) = sech ( x ) coth ( – x ) = – coth ( x ) • Some of the more advanced relationships are.= ----------------.= hyperbolic tangent of x x –x cosh ( x ) e +e 1 2 csch ( x ) = ----------------.= hyperbolic secant of x x –x cosh ( x ) e +e cosh ( x ) e +e x coth ( x ) = -----------------.= ----------------.= ----------------.= hyperbolic cotangent of x –x sinh ( x ) e –e x –x x –x x –x x –x • some of the basic relationships are. cos θ cos θ – sin θ sin θ = ( s + 3j ) ( s – 3j ) ( s + 2j ) = 2 . Find all of the missing side lengths and corner angles on the two triangles below. Simplify the following expressions.Practice Problems 1. 5 3 10° 5 3 2. 2 2 2 2 2 2 sin ( jx ) = j sinh ( x ) cos ( jx ) = cosh ( x ) tan ( jx ) = j tanh ( x ) j sin ( x ) = sinh ( jx ) cos ( x ) = cosh ( jx ) j tan ( x ) = tanh ( jx ) 24.2.page 639 ( cosh x ) – ( sinh x ) = ( sech x ) + ( tanh x ) = ( coth x ) – ( csch x ) = 1 sinh ( x ± y ) = sinh ( x ) cosh ( y ) ± cosh ( x ) sinh ( y ) cosh ( x ± y ) = cosh ( x ) cosh ( y ) ± sinh ( x ) sinh ( y ) tanh ( x ) ± tanh ( y )tanh ( x ± y ) = ---------------------------------------------1 ± tanh ( x ) tanh ( y ) • Some of the relationships between the hyperbolic. and normal trigonometry functions are.3.1 . y. x + 0.5 (ans. I z = moment of inertia of area (or second moment of inertia) .= -----------------------------------------.3. and the notation used is described below. so --------------an acceptable answer is also. 4 A B Ax + 2A + Bx + B ( 2A + B ) + ( A + B )x -------------------------.3 Geometry • A set of the basic 2D and 3D geometric primitives are given. A = contained area P = perimeter distance V = contained volume S = surface are a x.= ----------.page 640 (ans. I y. y. Solve the following partial fraction 4 -------------------------.+ ----------.= 2 x + 3x + 2 1 Note: there was a typo here. z = centre of mass x. cos θ cos θ – sin θ sin θ = cos ( θ + θ ) = cos ( 2θ ) ( s + 3j ) ( s – 3j ) ( s + 2j ) = ( s – 9j ) ( s + 4js + 4j ) s + 4js + 4j s – 9j s – 9j 4js – 9j 4j s + ( 4j )s + ( 5 )s + ( 36j )s + ( – 36 ) 4 3 2 4 3 2 2 2 2 2 2 2 2 2 2 2 2 3. z = centroid I x.= ------------------------------------------------2 2 2 x+1 x+2 x + 3x + 2 x + 3x + 2 x + 3x + 2 A+B = 0 A = –B B = –4 A = 4 4 –4 ----------.+ ----------x+1 x+2 2A + B = 4 = – 2B + B = – B 24. page 641 AREA PROPERTIES: Ix = ∫y A 2 dA = the second moment of inertia about the y-axis Iy = ∫x A 2 dA = the second moment of inertia about the x-axis I xy = ∫ xy dA A = the product of inertia JO = ∫r A 2 dA = ∫ (x A 2 + y ) dA = I x + I y = The polar moment of inertia 2 ∫ x dA A x = -----------.= centroid location along the y-axis ∫ dA A .= centroid location along the x-axis ∫ dA A ∫ y dA A y = -----------. page 642 Rectangle/Square: A = ab P = 2a + 2b y a x b Moment of Inertia (about origin axes): ba I x = -------3 b a I y = -------3 b aI xy = ---------4 2 2 3 3 Centroid: b x = -2 a y = -2 Moment of Inertia (about centroid axes): ba I x = -------12 3 3 b a I y = -------12 I xy = 0 . ( 2a – b ) 72 2 bh 2 2 I y = ----.( a + b – ab ) 12 bh I xy = -------.( 2a – b ) 24 2 Circle: A = πr 2 y r P = 2πr x Moment of Inertia Moment of Inertia (about centroid axes): (about origin axes): 4 πr I x = ------Ix = 4 πr I y = ------4 I xy = 0 4 Centroid: x = r y = r Mass Moment of Inertia (about centroid): Mr J z = --------2 2 Iy = I xy = .page 643 Triangle: bh A = ----2 P = y a θ h x b Centroid: a+b x = ----------3 h y = -3 Moment of Inertia (about centroid axes): bh I x = -------36 3 Moment of Inertia (about origin axes): bh I x = -------12 3 bh 2 2 I y = ----.( a + b – ab ) 36 bh I xy = -------. page 644 Half Circle: πr A = ------2 P = πr + 2r 2 y r x Centroid: x = r 4r y = ----3π Moment of Inertia (about centroid axes): π 8.01647 r 4 I xy r = ---8 4 .– ----. r 8 9π πr I y = ------8 I xy = 0 4 Moment of Inertia (about origin axes): πr I x = ------8 πr I y = ------8 I xy = 0 4 4 Quarter Circle: πr A = ------4 πr P = ----.05488r I y = 0.+ 2r 2 2 y r x Centroid: 4r x = ----3π 4r y = ----3π Moment of Inertia (about centroid axes): I x = 0.4 I x = -.05488r 4 Moment of Inertia (about origin axes): 4 πr ------Ix = 16 πr I y = ------16 4 4 I xy = – 0. ( θ – sin θ ) 8 r I y = ---.page 645 Circular Arc: θr A = ------2 P = θr + 2r 2 y r x θ Centroid: θ 2r sin -2 ---------------x = 3θ y = 0 Moment of Inertia (about centroid axes): Ix = Iy = I xy = Moment of Inertia (about origin axes): r I x = --.( θ + sin θ ) 8 I xy = 0 4 4 . ( sin θ ) dθ a 2 2 2 x r 1 + r2 P ≈ 2π --------------2 Centroid: x = r2 y = r1 Moment of Inertia Moment of Inertia (about centroid axes): (about origin axes): πr 1 r 2 I x = -----------4 3 πr 1 r 2 I y = -----------4 I xy = 3 2 Ix = Iy = I xy = .page 646 Ellipse: A = πr 1 r 2 P = 4r 1 ∫ π -2 y r1 r2 0 r1 + r 2 2 1 – ------------------. ( sin θ ) dθ + 2r 2 a 2 2 2 r1 r2 x r 1 + r2 P ≈ π --------------.05488r 2 r 1 I y = 0.+ 2r 2 2 Centroid: x = r2 4r 1 y = ------3π Moment of Inertia (about centroid axes): I x = 0.05488r 2 r 1 I xy = – 0.01647r 1 r 2 2 2 3 3 Moment of Inertia (about origin axes): πr 2 r 1 I x = -----------16 3 πr 2 r 1 -----------Iy = 16 2 2 r1 r2 I xy = --------8 3 .page 647 Half Ellipse: πr 1 r 2 A = -----------2 P = 2r 1 ∫ 2 π -2 y 0 r1 + r 2 2 1 – ------------------. + ----.+ 2r 2 2 2 Centroid: 4r 2 x = ------3π 4r 1 y = ------3π Moment of Inertia (about centroid axes): Ix = Iy = I xy = Moment of Inertia (about origin axes): I x = πr 2 r 1 I y = πr 2 r 1 I xy r2 r1 = --------8 2 2 3 3 Parabola: 2 A = -.ln --------------------------------------.( sin θ ) dθ + 2r 2 a 2 2 2 r1 r2 x π r 1 + r2 P ≈ -.ab 3 b .--------------. 4a + b + 16a b + 16a P = --------------------------. b 8a 2 2 2 2 2 2 y a x b Centroid: b x = -2 2a y = ----5 Moment of Inertia (about centroid axes): Ix = Iy = I xy = Moment of Inertia (about origin axes): Ix = Iy = I xy = .page 648 Quarter Ellipse: πr 1 r 2 A = -----------4 r1 ∫ 2 π -2 y P = 0 r1 + r 2 2 1 – ------------------. . 16a b 4 2 2 2 y a x b Centroid: 3b x = ----8 2a y = ----5 Moment of Inertia Moment of Inertia (about centroid axes): (about origin axes): 3 3 8ba 2ba I x = ----------I x = ----------175 7 19b a I y = -------------480 b a I xy = ---------60 2 2 3 2b a I y = ----------15 b a I xy = ---------6 2 2 3 • A general class of geometries are conics. This for is shown below.4a + b + 16a P = --------------------------.+ -------. and can be used to represent many of the simple shapes represented by a polynomial.ln --------------------------------------.page 649 Half Parabola: ab A = ----3 2 2 b b + 16a . page 650 Ax + 2Bxy + Cy + 2Dx + 2Ey + F = 0 Conditions A = B = C = 0 B = 0. A = C 2 B – AC < 0 2 B – AC = 0 2 B – AC > 0 straight line circle ellipse parabola hyperbola 2 2 . = centroid location along the z-axis ∫ dV V .page 651 VOLUME PROPERTIES: Ix = ∫ rx V 2 dV = the moment of inertia about the x-axi s Iy = Iz = ∫ ry V 2 dV = the moment of inertia about the y-axi s ∫ rz V 2 dV = the moment of inertia about the z-axis ∫ x dV V x = -----------.= centroid location along the y-axis ∫ dV V ∫ z dV V z = -----------.= centroid location along the x-axis ∫ dV V ∫ y dV V y = -----------. page 652 Parallelepiped (box): V = abc S = 2 ( ab + ac + bc ) b c y z x a Centroid: a x = -2 b y = -2 c z = -2 Moment of Inertia (about centroid axes): M(a + b ) I x = -------------------------12 M(a + c ) I y = -------------------------12 M(b + a ) I z = -------------------------12 2 2 2 2 2 2 Moment of Inertia (about origin axes): Ix = Iy = Iz = Mass Moment of Inertia (about centroid): Jx = Jy = Jz = Sphere: 4 3 V = -.πr 3 S = 4πr 2 y r z x Moment of Inertia (about centroid axes): 2Mr I x = -----------5 2Mr I y = -----------5 2Mr I z = -----------5 2 2 Centroid: Moment of Inertia (about origin axes): Ix = Iy = Iz = Mass Moment of Inertia (about centroid): 2Mr J x = -----------5 2Mr J y = -----------5 2Mr J z = -----------5 2 2 x = r y = r z = r 2 2 . page 653 Hemisphere: 2 3 V = -.πh ( 3r – h ) 3 y h z r S = 2πrh x Centroid: Moment of Inertia (about centroid axes): Ix = Iy = Iz = Moment of Inertia (about origin axes): Ix = Iy = Iz = x = r y = z = r .Mr 320 2Mr I y = -----------5 2 Moment of Inertia (about origin axes): Ix = Iy = Iz = x = r 3r y = ---8 z = r 83.2 I z = -------.Mr 320 Cap of a Sphere: 1 2 V = -.2 I x = -------.πr 3 y z S = r x Centroid: Moment of Inertia (about centroid axes): 83. + --.πr h 3 S = πr r + h 2 2 y z h r x Centroid: x = r h y = -4 z = r Moment of Inertia (about centroid axes): 3h 3r I x = M -------.page 654 Cylinder: V = hπr 2 y r h S = 2πrh + 2πr 2 z x Moment of Inertia (about origin axis): h.rI x = M ----. 12 4 h r I z = M ---. 3 4 2 2 M ( 3r + h ) J z = ----------------------------12 2 2 Cone: 1 2 V = -.+ --. 12 4 Mr I y = --------2 2 2 2 Mass Moment of Inertia (about centroid): M ( 3r + h ) J x = ----------------------------12 Mr J y = --------2 2 2 2 x = r h y = -2 z = r h r I z = M ----.rI x = M ---.+ --.+ --.+ ------- 80 20 3Mr I y = -----------10 2 3 2 Moment of Inertia (about origin axes): Ix = Iy = 3h 3r I z = M -------. 3 4 Iy = 2 2 2 2 Centroid: Moment of Inertia (about centroid axis): h .+ ------- 80 20 3 2 Iz = . Ah 3 y h A Centroid: Moment of Inertia (about centroid axes): Ix = Iy = Iz = z x Moment of Inertia (about origin axes): Ix = Iy = Iz = x = h y = -4 z = Torus: 1 2 2 V = -. 2 z = r2 .π ( r 1 + r 2 ) ( r 2 – r 1 ) 4 y r2 z r1 x Moment of Inertia (about centroid axes): Ix = Iy = Iz = Moment of Inertia (about origin axes): Ix = Iy = Iz = S = π ( r2 – r1 ) 2 2 2 Centroid: x = r2 r2 – r1 y = -------------.page 655 Tetrahedron: 1 V = -. πr 1 r 2 r 3 3 y r2 z r3 r1 x Moment of Inertia (about centroid axes): Ix = Iy = Iz = Moment of Inertia (about origin axes): Ix = Iy = Iz = S = Centroid: x = r1 y = r2 z = r3 Paraboloid: 1 2 V = -.page 656 Ellipsoid: 4 V = -.πr h 2 y h z r x S = Centroid: Moment of Inertia (about centroid axes): Ix = Iy = Iz = Moment of Inertia (about origin axes): Ix = Iy = Iz = x = r y = z = r . there are some basic relationships that can be derived.page 657 24. . The basic relationships are given below.+ -. • The most fundamental mathematical geometry is a line. and that at one end we have a local reference frame. Lines.3. y = mx + b 1 m perpendicular = --m y2 – y1 m = --------------x2 – x1 x y -.= 1 . etc.4 Planes.a b defined with a slope and intercept a slope perpendicular to a line the slope using two points as defined by two intercepts • If we assume a line is between two points in space. y 1. d ( cos θ α ) + ( cos θ β ) + ( cos θ γ ) = 1 The equation of the line is. y 0. d 2 2 ( x 0.= -------------x2 – x1 y2 – y1 z2 – z1 ( x. z 2 ) θγ θα x z The direction cosines of the angles are. z ) = ( x 1. z 0 ) y2 – y1 θ β = acos --------------.= --------------. . y 1. x – x1 y – y1 z – z1 --------------. d 2 z2 – z1 θ γ = acos -------------. z 1 ) d = ( x2 – x1 ) + ( y2 – y1 ) + ( z2 – z1 ) 2 2 2 d ( x 2. y 2. z 1 ) ) Explicit Parametric t=[0. x2 – x1 θ α = acos --------------. y.page 658 y θβ ( x 1. z 1 ) + t ( ( x 2. z 2 ) – ( x 1. y 1.1] • The relationships for a plane are. y 2. z 3 ) z The determinant can also be used. z 1 ) where the coefficients defined by the intercepts are.3. ( x.5 Practice Problems 1. y. Ax + By + Cz + D = 0 P 1 = ( x 1. What is the circumferenece of a circle? What is the area? What is the ratio of the area to the circumference? . B . 1 A = -a 1 B = -b 1 C = -c D = –1 N P 2 = ( x 2. x – x1 y – y1 z – z1 det x – x 2 y – y 2 z – z 2 = 0 x – x3 y – y3 z – z3 ∴det y2 – y1 z2 – z1 y3 – y1 z3 – z1 ( x – x 1 ) + det z2 – z1 x2 – x1 z3 – z1 x3 – x1 ( y – y1 ) c a x b + det x2 – x1 y2 – y1 x3 – x1 y3 – y1 ( z – z1 ) = 0 The normal to the plane (through the origin) is. C ) 24. y 3. z ) = t ( A .page 659 y The explicit equation for a plane is. y 1. z 2 ) P 3 = ( x 3. y 2. = 1 cos x tan x = 1 x = atan 1 x = …. a) ( cos 2θ ) sin 2θ --------------------.+ sin 2θ sin 2θ 2 2 2 (ans. –135°. The perpendicular line passes through (3.+ sin 2θ = ( cos 2θ ) + ( sin 2θ ) = 1 sin 2θ 2 . Simplify the following expressions. 0) to (0. 1) and (1. 225°. 5). 45°.page 660 2. – 2 2(1 ) 2 2 b) sin x = cos x sin x ---------.= – 1. 0) to (2. … 5. 2).= ----------------------------. Manipulate the following equations to solve for ‘x’.= --------------. What is the equation of a line that passes through the points below? a) (0. a) x 2 + 3x = – 2 b) sin x = cos x (ans. a) ( cos 2θ ) 2 2 sin 2θ --------------------. 2) b) (1. 1) c) (3. Find a line that is perpendicular to the line through the points (2. 4) to (2. 9) 3. 4. a) x 2 + 3x = – 2 x + 3x + 2 = 0 – 3 ± 3 – 4( 1)( 2 ) –3± 9–8 –3±1 x = -----------------------------------------------. 5 m y = – 0.5 x b = 0 24. and for a line perpendicular to it. • The basic algebraic properties of these numbers are. ‘j’ will be the preferred notation for the complex number. y = mx + b m = 2 x = 1 y = 2 substituting 2 = 2(1) + b y = 2x perpendicular 1 m perp = – --. 2) and has a slope of 2. (ans.page 661 6.1 Complex Numbers • In this section. given.4. A line that passes through the point (1. Find the equation for the line. .= – 0. as in all others.4 COORDINATE SYSTEMS 24. this is to help minimize confusion with the ‘i’ used for current in electrical engineering. page 662 The Complex Number: j = Complex Numbers: a + bj where. -----------. N* = a – bj .= a + bj = ---. = ------------. -----. j ----------------------------2 2 2 c + dj c – dj 2 M N* M c + dj c +d c +d • We can also show complex numbers graphically.---. = ac + bd + ----------------. If it in not obvious above. These representations lead to alternative representations. but a polar notation can also be very useful when doing large calculations. please consider the notation above uses a cartesian notation. a and b are both real numbers –1 j = –1 2 Complex Conjugates (denoted by adding an asterisk ‘*’ the variable): N = a + bj Basic Properties: ( a + bj ) + ( c + dj ) = ( a + c ) + ( b + d )j ( a + bj ) – ( c + dj ) = ( a – c ) + ( b – d )j ( a + bj ) ⋅ ( c + dj ) = ( ac – bd ) + ( ad + bc )j N N* a + bj c – dj bc – ad N . whereas cartesian notation is easier for addition and subtraction). . R POLAR FORM Ij imaginary (j) N = A ∠θ θ R real A = amplitude θ = phase angl e • We can also do calculations using polar notation (this is well suited to multiplication and division.page 663 CARTESIAN FORM Ij imaginary (j) N = R + Ij R real A = R +I 2 2 R = A cos θ I = A sin θ Iθ = atan -. . these coordinates appear as if the cartesian box has been replaced with a cylinder.4.= ----- ∠( θ 1 – θ 2 ) A 2 ( A 2 ∠θ 2 ) ( A ∠θ ) = ( A ) ∠( nθ ) n n (DeMoivre’s theorem) • Note that DeMoivre’s theorem can be used to find exponents (including roots) of complex numbers jθ • Euler’s formula: e = cos θ + j sin θ • From the above.page 664 A ∠θ = A ( cos θ + j sin θ ) = Ae jθ ( A 1 ∠θ 1 ) ( A 2 ∠θ 2 ) = ( A 1 A 2 ) ∠( θ 1 + θ 2 ) A1 ( A 1 ∠θ 1 ) -------------------.2 Cylindrical Coordinates • Basically. the following useful identities arise: jθ – jθ e +e cos θ = --------------------2 e –e sin θ = --------------------2j jθ – jθ 24. z ) ↔ ( r. z ) z z z y x x y θ r = x +y 2 2 r x = r cos θ y = r sin θ y θ = atan . θ.3 Spherical Coordinates • This system replaces the cartesian box with a sphere. x 24.4. y.page 665 z ( x. . y.4. r 24.page 666 z ( x. φ ) z φ r z y x x y 2 θ r = x +y +z 2 2 x = r sin θ cos φ y = r sin θ sin φ z = r cos θ y θ = atan . z ) ↔ ( r.4 Practice Problems 1. θ. Simplify the following expressions. x z φ = acos . j = –1 . a) b) c) 16 -------------------2 ( 4j + 4 ) 3j + 5 -------------------( 4j + 3 ) 2 ( 3 + 5j )4j where. y a) find the area of the shape. For the shape defined below. head terminus A vector is said to have magnitude (length or strength) and direction. origin tail . b) find the centroid of the shape. a) 16 1616 -------------------.page 667 (ans. x 4 y = (x + 2) 2 24. as shown below.1 Vectors • Vectors are often drawn with arrows.5 MATRICES AND VECTORS 24.= – 0. c) find the moment of inertia of the shape about the centroid. – 7 – 24j = – 35 – 141j + 72 = 37 – 141j -----------------------------------------------------------2 – 7 + 24j – 7 – 24j – 16 + 24j + 9 49 + 576 625 ( 4j + 3 ) c) ( 3 + 5j )4j = 12j + 20j 2 = 12j – 20 2.= --------------------.= --------------------------------.= -----------------------------------.5.5j 2 – 16 + 32j + 16 32j ( 4j + 4 ) 3j + 5 -------------------3j + 5 3j + 5 b) -------------------.= ------. 5. y x z becomes y k j i j z x k i • Vectors can be added and subtracted. 9 ) A + B = ( 2 + 7. 3 + 8.2 Dot (Scalar) Product • We can use a dot product to find the angle between two vectors .page 668 • Cartesian notation is also a common form of usage. 4 + 9 ) A – B = ( 2 – 7. 3. 4 ) B = ( 7. A = ( 2. 4 – 9 ) Parallelogram Law A B B A+B A 24. 8. 3 – 8. numerically and graphically. 707k ) • ( – 3i + 4j + 5k )N ∴F 1V = ( 0 ) ( – 3 ) + ( 0. To do this we first convert V to a unit vector.707j + 0.= 0.707j + 0. z We want to find the component of force F1 that projects onto the vector V.47 ) ( 6 ) θ F2 = 5i + 3j F1 = 2i + 4j x • We can use a dot product to project one vector onto another vector. x 1j + 1k V= ----. 2 2 + 4 2 5 2 + 3 2 22 ∴θ = acos ---------------------. .707 ) ( 5 ) = 6N V F 1V • We can consider the basic properties of the dot product and units vectors. the component we find will be multiplied by the magnitude of V. = 32.= -------------------.707k V 2 2 1 +1 F 1 = ( – 3i + 4j + 5k )N V = 1j + 1k y F1 λV F 1V = λ V • F 1 = ( 0.707 ) ( 4 ) + ( 0. if we do not.5° ( 4.page 669 y F1 • F2 cos θ = ----------------F1 F2 ( 2 ) ( 5 ) + ( 4 )( 3) ∴θ = acos -----------------------------------------. and the displaced x-y axes shown below as x’-y’. relative to the x-y axis. but consider the other obvious case where we want to project a vector onto itself. But. if we find the equivalent vectors with a magnitude of one we can simplify many tasks. x axis = 2i y axis = 3j x‘ axis = 1i + 1j y‘ axis = – 1i + 1j F = 10N ∠60° = ( 10 cos 60° )i + ( 10 sin 60° )j None of these vectors has a magnitude of 1. . In particular if we want to find the x and y components of F relative to the x-y axis we can use the dot product. As an example consider the vector. y y’ F = 10N x’ 45° 60° x We could write out 5 vectors here. λ x = 1i + 0j (unit vector for the x-axis) F x = λ x • F = ( 1i + 0j ) • [ ( 10 cos 60° )i + ( 10 sin 60° )j ] ∴ = ( 1 ) ( 10 cos 60° ) + ( 0 ) ( 10 sin 60° ) = 10N cos 60° This result is obvious. and hence they are not unit vectors.page 670 Unit vectors are useful when breaking up vector magnitudes and direction. page 671 10 cos 60°i + 10 sin 60°j Fλ F = ----. Now finally consider the more general case.= cos 60°i + sin 60°j F 10 Incorrect .Not using a unit vector FF = F • F = ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( 10 cos 60° )i + ( 10 sin 60° )j ) = ( 10 cos 60° ) ( 10 cos 60° ) + ( 10 sin 60° ) ( 10 sin 60° ) = 100 ( ( cos 60° ) + ( sin 60° ) ) = 100 Using a unit vector FF = F • λF = ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( cos 60° )i + ( sin 60° )j ) = ( 10 cos 60° ) ( cos 60° ) + ( 10 sin 60° ) ( sin 60° ) Correct Now consider the case where we find the component of F in the x’ direction. Again. this can be done using the dot product to project F onto a unit vector.= -------------------------------------------------------. u x' = cos 45°i + sin 45°j F x' = F • λ x' = ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( cos 45° )i + ( sin 45° )j ) = ( 10 cos 60° ) ( cos 45° ) + ( 10 sin 60° ) ( sin 45° ) = 10 ( cos 60° cos 45° + sin 60° sin 45° ) = 10 ( cos ( 60° – 45° ) ) Here we see a few cases where the dot product has been applied to find the vector projected onto a unit vector. = 10 ( ( cos 60° ) + ( sin 60° ) ) = 10 2 2 2 2 . . = V 2 ( cos θ 1 cos θ2 + sin θ 1 sin θ2 ) = V 2 [ ( cos θ 1 i + sin θ 1 j ) • ( cos θ 2 i + sin θ 2 j ) ] V1 V2 V 1 • V2 V1 • V2 = V 2 -------. V 2V1 = V 2 cos ( θ 2 – θ1 ) Next.page 672 y V2 V1 θ2 θ1 x V 2V1 First.= V2 • λ V1 V1 V2 V1 V2 V1 Or more generally.• -------. by inspection.= ----------------. we can see that the component of V2 (projected) in the direction of V1 will be. V1 • V 2 V2 V1 = V 2 cos ( θ2 – θ 1 ) = V 2 ----------------V1 V2 V1 • V2 ∴ V 2 cos ( θ 2 – θ1 ) = V 2 ----------------V1 V2 V1 • V2 ∴ cos ( θ 2 – θ 1 ) = ----------------V 1 V2 *Note that the dot product also works in 3D. we can manipulate this expression into the dot product form. and similar proofs are used.= V 2 ----------------. 66N ) – 0m ( – 6. Here there is only a z component because this vector points out of the page. • The basic properties of the cross product are.page 673 24.66N ) )i – ( 2m0N – 0m ( – 6.5. F = ( – 6. 2m 0m 0m – 6.43N ) )k = 15. .66j + 0k )N d = ( 2i + 0j + 0k )m i M = d×F = j k NOTE: note that the cross product here is for the right hand rule coordinates. and a rotation about this vector would rotate on the plane of the page. In this right handed system find the positive rotation by pointing your right hand thumb towards the positive axis (the ‘k’ means that the vector is about the z-axis here).43N 7.43i + 7. it is a vector. this result is positive.3k ( mN ) NOTE: there are two things to note about the solution.3 Cross Product • First.66N 0N ∴M = ( 0m0N – 0m ( 7. that is the positive direction. consider an example. Second. First. and curl your fingers. If the left handed coordinate system is used F and d should be reversed.43N ) ) j + ( 2m ( 7. because the positive sense is defined by the vector system. V1 × V2 V1 V1 × V2 = ( x 1 i + y1 j + z1 k ) × ( x2 i + y 2 j + z 2 k ) i j k V1 × V2 = x1 y1 z1 x2 y2 z2 V 1 × V 2 = ( y 1 z 2 – z 1 y 2 )i + ( z 1 x 2 – x 1 z 2 )j + ( x 1 y 2 – y 1 x 2 )k V2 We can also find a unit vector normal ‘n’ to the vectors ‘V1’ and ‘V2’ using a cross product. . V1 × V2 λ n = -------------------V1 × V2 • When using a left/right handed coordinate system. y x z x + z y + z + x y • The properties of the cross products are. divided by the magnitude.page 674 The cross (or vector) product of two vectors will yield a new vector perpendicular to both vectors. The positive orientation of angles and moments about an axis can be determined by pointing the thumb of the right hand along the axis of rotation. with a magnitude that is a product of the two magnitudes. The fingers curl in the positive direction. we can do both steps in one operation by finding the determinant of the following.5.5. This allows us to collect terms in a cross product operation.5 Matrices • Matrices allow simple equations that drive a large number of repetitive calculations . • A matrix has the form seen below.page 675 The cross product is distributive. followed by a dot product (called the mixed triple product). but not associative. An example of a problem that would use this shortcut is when a moment is found about one point on a pipe. r 1 × F + r 2 × F = ( r 1 + r2 ) × F r×F≠F×r but r × F = –( F × r ) DISTRIBUTIVE NOT ASSOCIATIVE 24. and then the moment component twisting the pipe is found using the dot product. .4 Triple Product When we want to do a cross product.as a result they are found in many computer applications. ux uy uz ( d × F) • u = dx dy dz F x F y Fz 24. but we cannot change the order of the cross product. • Matrix operations are available for many of the basic algebraic expressions. examples are given below.many of these are indicated. A = 2 3 4 5 B = 6 7 8 9 10 11 12 13 14 C = 15 16 17 18 19 20 21 D = 22 23 E = 24 25 26 Addition/Subtraction 3+2 4+2 5+2 A+B = 6+2 7+2 8+2 9 + 2 10 + 2 11 + 2 B + D = not valid 3–2 4–2 5–2 B–A = 6–2 7–2 8–2 9 – 2 10 – 2 11 – 2 B – D = not valid 3 + 12 4 + 13 5 + 14 B + C = 6 + 15 7 + 16 8 + 17 9 + 18 10 + 19 11 + 20 3 – 12 4 – 13 5 – 14 B + C = 6 – 15 7 – 16 8 – 17 9 – 18 10 – 19 11 – 20 . There are also many restrictions .page 676 n columns a 11 a21 … a n1 a 12 a22 … a n2 … … … … a 1m a 2m … a nm m rows If n=m then the matrix is said to be square. Many applications require square matrices. We may also represent a matrix as a 1-by-3 for a vector. --.C D B Note: To multiply matrices. etc = not allowed (see inverse) .page 677 Multiplication/Division 3(2 ) 4(2 ) 5(2) A ⋅ B = 6(2 ) 7(2 ) 8(2) 9 ( 2 ) 10 ( 2 ) 11 ( 2 ) 3 -2 B -. D.. the first matrix must have the same number of columns as the second matrix has rows. .= 6 -A 2 9 -2 4 -2 7 -2 10 ----2 5 -2 8 -2 11 ----2 B⋅D = ( 3 ⋅ 21 + 4 ⋅ 22 + 5 ⋅ 23 ) ( 6 ⋅ 21 + 7 ⋅ 22 + 8 ⋅ 23 ) ( 9 ⋅ 21 + 10 ⋅ 22 + 11 ⋅ 23 ) D ⋅ E = 21 ⋅ 24 + 22 ⋅ 25 + 23 ⋅ 26 B⋅C = ( 3 ⋅ 12 + 4 ⋅ 15 + 5 ⋅ 18 ) ( 3 ⋅ 13 + 4 ⋅ 16 + 5 ⋅ 19 ) ( 3 ⋅ 14 + 4 ⋅ 17 + 5 ⋅ 20 ) ( 6 ⋅ 12 + 7 ⋅ 15 + 8 ⋅ 18 ) ( 6 ⋅ 13 + 7 ⋅ 16 + 8 ⋅ 19 ) ( 6 ⋅ 14 + 7 ⋅ 17 + 8 ⋅ 20 ) ( 9 ⋅ 12 + 10 ⋅ 15 + 11 ⋅ 18 ) ( 9 ⋅ 13 + 10 ⋅ 16 + 11 ⋅ 19 ) ( 9 ⋅ 14 + 10 ⋅ 17 + 11 ⋅ 20 ) B B -----.. E = not valid (matrices not square) Transpose 3 6 9 T B = 4 7 10 5 8 11 D = 21 22 23 T 24 E = 25 26 T .page 678 Determinant B = 3⋅ 7 8 –4⋅ 6 8 +5⋅ 6 7 10 11 9 11 9 10 = ( 7 ⋅ 11 ) – ( 8 ⋅ 10 ) = – 3 = 3 ⋅ ( – 3 ) – 4 ⋅ ( –6 ) + 5 ⋅ ( – 3 ) = 0 7 8 10 11 6 8 9 11 6 7 9 10 = ( 6 ⋅ 11 ) – ( 8 ⋅ 9 ) = – 6 = ( 6 ⋅ 10 ) – ( 7 ⋅ 9 ) = – 3 D . To do this we use the inverse.y. D –1 = invalid (must be square) . and the matrix is indeterminate. B D = B –1 –1 x ⋅B⋅ y z x x B D = I⋅ y = y z z –1 –1 B B= -------B In this case B is singular. and then finding the determinant of what is left. Note the sign changes on alternating elements.page 679 Adjoint 7 8 10 11 B = – 4 5 10 11 4 5 7 8 – 6 8 10 11 3 5 9 11 – 3 5 6 8 6 7 9 10 – 3 4 9 10 3 4 6 7 T The matrix of determinant to the left is made up by getting rid of the row and column of the element. D = invalid (must be square) Inverse x D = B⋅ y z To solve this equation for x. so the inverse is undetermined.z we need to move B to the left hand side. B⋅I = I⋅B = B D⋅I = I⋅D = D B –1 ⋅B = I 1 0 0 1 0. etc=I 0 1 0 0 1 • The eigenvalue of a matrix is found using. and solve. 1.5. then rearrange. 0 1 0 .page 680 Identity Matrix This is a square matrix that is the matrix equivalent to ‘1’. 2 4 3 x 5 = 7 9 6 8 y 11 13 10 z 12 x 2 4 3 ∴ y = 9 6 8 z 11 13 10 –1 5 7 = 12 . A – λI = 0 24. 2⋅x+4⋅y+3⋅z = 5 9⋅x+6⋅y+8⋅z = 7 11 ⋅ x + 13 ⋅ y + 10 ⋅ z = 12 Write down the matrix.6 Solving Linear Equations with Matrices • We can solve systems of equations using the inverse matrix. Given. 2⋅x+4⋅y+3⋅z = 5 9⋅x+6⋅y+8⋅z = 7 11 ⋅ x + 13 ⋅ y + 10 ⋅ z = 12 Write down the coefficient and parameter matrices. Perform the matrix operations below. Note: when trying to find the first parameter ‘x’ we replace the first column in A with B. . 5 4 3 7 6 8 12 13 10 x = ----------------------------. and calculate the determinants for matrices below.= A 2 4 5 9 6 7 11 13 12 z = ----------------------------.= A 2 5 3 9 7 8 11 12 10 y = ----------------------------.7 Practice Problems 1.= A 24.5. Given.page 681 • We can solve systems of equations using Cramer’s rule (with determinants). 2 4 3 9 6 8 11 13 10 5 7 12 A = B = Calculate the determinant for A (this will be reused). Solve the following set of equations using a) Cramer’s rule and b) an inverse matrix. 5x – 2y + 4z = –1 6x + 7y + 5z = – 2 2x – 3y + 6z = –3 ANS.273 y= -0.167 2. 1 2 3 10 68 = 167 4 5 6 11 7 8 9 12 266 = 1 2 3 4 2 6 7 8 9 = 36 = 1 2 3 4 2 6 7 8 9 –1 – 0.333 0.167 0. Solve the following equations using any technique.167 –0. – 10 ) A • B = 13 4. A × B = ( – 4.167 = 0.072 z= -0.833 0.627 5. 1 A = 2 3 6 B = 2 1 Cross Product Dot Product A×B = A•B = ANS.167 – 0. x= 0. 2x + 3y = 4 5x + 1y = 0 . Perform the vector operations below.5 0.167 0.page 682 Multiply 1 2 3 10 4 5 6 11 = 7 8 9 12 Determinant 12 3 42 6 78 9 Inverse 123 426 789 –1 ANS. 17. 2 3 x = 4 5 1 y 0 a) 4 3 0 1 4 x = --------------. Show all work.= ----– 13 13 2 3 5 1 b) x = 2 3 y 5 1 –1 1 –( 5 ) 1 –3 4– ----–( 3 ) 2 –5 2 4 14 = ------------------------------. T A B C X L + M D E F Y GH I Z N (ans. a) A B C X D E F Y = GH I Z b) A B C D E F X Y Z = GH I .page 683 (ans. Perform the following matrix calculation. Perform the matrix calculations given below.4 = -----------------= – ----- 4 = 13 13 – 20 – 13 0 0 0 20 2 3 ----13 5 1 6. A B C X L D E F Y + M GH I Z N T T T = AX + BY + CZ L DX + EY + FZ + M GX + YH + IZ N AX + BY + CZ + L = DX + EY + FZ + M GX + YH + IZ + N = AX + BY + CZ + L DX + EY + FZ + M GX + YH + IZ + N 7.= -------– 13 2 3 5 1 T 2 4 5 0 – 20 20 y = --------------.= -------. Perform the following matrix calculations. A • B = xp + yq + zr A×B = i j k x y z p q r yr – zq = i ( yr – zq ) + j ( zp – xr ) + k ( xq – yp ) = zp – xr xq – yp 9. Find the dot product.----------------ad – bc ad – bc c d adj . a) a b c T d e f g h k mnp b) a b c d c) a b c d –1 (ans.= -----------------. a) a b c T d e f d e f = a b c g h k = ( ad + bg + cm ) ( ae + bh + cn ) ( af + bk + cp ) g h k mnp mnp = ad – bc b) a b c d c) a b c d –1 a b d –c d .–c ----------------.= ad – bc ad – bc ad – bc –b a a b ----------------.----------------c d –b a = -----------------.page 684 8. of the vectors A and B below. x A = y z p B = q r (ans. and the cross product. = -------.page 685 10. 1 2 3 x 5 1 4 8 y = 0 4 2 1 z 1 5 2 3 0 4 8 1 2 1 5 ( 4 – 16 ) + 2 ( 8 – 0 ) + 3 ( 0 – 4 ) – 60 + 16 – 12 – 56 x = ----------------. Perform the matrix calculations given below. x + 2y + 3z = 5 x + 4y + 8z = 0 4x + 2y + z = 1 (ans. Find the value of ‘x’ for the following system of equations.= ---------------------------------. a) A B C X D E F Y = GH I Z A B C D E F X Y Z = GH I det A B = C D A B C D A B C D A b) c) d) = –1 e) = .= – 7 1 ( 4 – 16 ) + 2 ( 32 – 1 ) + 3 ( 2 – 16 ) – 12 + 62 – 42 8 1 2 3 1 4 8 4 2 1 11.= --------------------------------------------------------------------------------. But. 3x + 5y = 7 4x – 6y = 2 a) Inverse matrix b) Cramer’s rule c) Gauss-Jordan row reduction d) Substitution 24. Solve the following set of equations with the specified methods. or know where to look.1 .Differentiation • The basic principles of differentiation are. .1 Single Variable Functions 24.6. Many students are turned off by the topic because they "don’t get it".1.6.page 686 12. Each one has to be learned separately.it is more a loose collection of tricks and techniques. the secret to calculus is to remember that there is no single "truth" . and when needed you must remember it.6 CALCULUS • NOTE: Calculus is very useful when looking at real systems. 24. ( x ) du • Differentiation rules specific to basic trigonometry and logarithm functions .( u ) = chain rule dx du dx d1 ----.( uv ) = ( u ) ----.( u ) dx dx ddd----.( y ) ----. u = ---- ----.( u ) dx dx d d d----.( u ) = ------------dx d----.dd.( w ) + ( uw ) ----.( u ) dx dx dx u.( u ) dx dx dx dx ddd----.( u ) + ----.( u + v + … ) = ----.( u n ) = ( nu n – 1 ) ----. Also note that C is used as a constant.( v ) + ( v ) ----.( y ) = ----.( v ) + … dx dx dx d d ----.( uvw ) = ( uv ) ----.( C ) = 0 dx dd----. and all angles are in radians.( x ) du d----.( y ) = ------------dx d----.d----.( u ) – ---- ----. d----.page 687 Both u.( Cu ) = ( C ) ----.( v ) 2 dx 2 dx dx v v v dddd----. v and w are functions of x.( y ) ddu ----.( v ) + ( vw ) ----.-v. but this is not shown for brevity. ( cot u ) = ( – csc u ) 2 ----.( u ) dx dx dd----.( sin u ) = ( cos u ) ----.page 688 dd----.( u ) dx dx dd----.( u ) dx dx dd----.( sec u ) = ( tan u sec u ) ----.( u ) dx dx dd----.( tanh u ) = ( sech u ) 2 ----.( u ) dx dx dd----. dd.( cosh u ) = ( sinh u ) ----. .( u ) dx dx d 1 2d ----.( ln x ) = -dx x dd----.2 ---- f ( x ) ---- f ( x ) dt dt f( x) lim ---------- = lim --------------------- = lim ----------------------.g ( x ) dt ---- g ( x ) dt • Some techniques used for finding derivatives are.( sinh u ) = ( cosh u ) ----.( csc u ) = ( – csc u cot u ) ----.( u ) dx dx dd----.( e u ) = ( e u ) ----.( u ) cos u dx dx dd----.( cos u ) = ( – sin u ) ----.( tan u ) = ----------- ----. = … x → a g(x) x → a d x → a d 2 ---.( u ) dx dx • L’Hospital’s rule can be used when evaluating limits that go to infinity.( u ) dx dx d1 ----. page 689 Leibnitz’s Rule, (notice the form is similar to the binomial equation) can be used for finding the derivatives of multiplied functions. d- n d- 0 d- n d- 1 d- n – 1 ----- ( uv ) = ----- ( u ) ----- ( v ) + n ----- ( u ) ----- (v) dx dx dx 1 dx dx d- n – 2 d- 0 d- 2 n d- n n ----- ( u ) ----- ( v ) + … + ----- ( u ) ----- ( v ) dx n dx dx 2 dx 24.6.1.2 - Integration • Some basic properties of integrals include, In the following expressions, u, v, and w are functions of x. in addition to this, C is a constant. and all angles are radians. ∫ C dx = ax + C = C ∫ f ( x ) dx = ∫ Cf ( x ) dx ∫ u dv ∫ ( u + v + w + … ) dx ∫ f ( Cx ) dx ∫ u dx + ∫ v dx + ∫ w dx + … = uv – ∫ v du = integration by parts 1 = --- ∫ f ( u ) du u = Cx C d F(u) ∫ F ( f ( x ) ) dx = ∫ F ( u ) ------ ( x ) du = ∫ ----------- du f' ( x ) du n x ∫ x dx = ------------ + C n+1 x a ∫ a dx = -------- + C ln a x n+1 u = f(x) ∫ -- dx x 1 = ln x + C x ∫ e dx x = e +C • Some of the trigonometric integrals are, page 690 ∫ sin x dx ∫ cos x dx ∫ ( sin x ) 2 = – cos x + C = sin x + C sin x cos x + x dx = – ------------------------------ + C 2 sin x cos x + x dx = ------------------------------ + C 2 2 3x sin 2x sin 4x dx = ----- + ------------- + ------------- + C 8 4 32 n+1 ( sin x ) n ∫ cos x ( sin x ) dx = ------------------------ + C n+1 ∫ ( cos x ) 4 ∫ sinh x dx ∫ cosh x dx ∫ tanh x dx = cosh x + C = sinh x + C = ln ( cosh x ) + C ∫ ( cos x ) 2 cos x ( ( sin x ) + 2 ) 3 ∫ ( sin x ) dx = – ------------------------------------------- + C 3 sin x ( ( cos x ) + 2 ) ∫ ( cos x ) dx = ------------------------------------------- + C 3 3 2 ∫ x cos ( ax ) dx cos ( ax - x ) = ------------------ + -- sin ( ax ) + C 2 a a 2 2 2x cos ( ax ) a x – 2 2 ∫ x cos ( ax ) dx = -------------------------- + ------------------- sin ( ax ) + C 3 2 a a • Some other integrals of use that are basically functions of x are, page 691 x n ∫ x dx = ------------ + C n+1 n+1 ∫ ( a + bx ) ∫ ( a + bx –1 ln a + bx dx = ----------------------- + C b 2 –1 1 a + 2 –b ) dx = --------------------- ln -------------------------- + C, a > 0, b < 0 a – x –b 2 ( – b )a 2 –1 2 ln ( bx + a ) ∫ x ( a + bx ) dx = ---------------------------- + C 2b ∫x 2 a x ab x 2 –1 ( a + bx ) dx = -- – ------------- atan ------------ + C a b b ab 2 ∫ (a 1- a + x 2 –1 2 2 – x ) dx = ----- ln ----------- + C, a > x a – x 2a –1 ∫ ( a + bx ) ∫ x(x 2 2 a + bx dx = ---------------------- + C b x ±a +C 2 2 CORRECT?? ± a ) dx = 2 –1 2 1 – -2 ∫ ( a + bx + cx ∫ ( a + bx + cx 1 ) dx = ------ ln c b2 a + bx + cx + x c + --------- + C, c > 0 2 c 2 –1 1– 2cx – b ) dx = --------- asin ------------------------ + C, c < 0 2 –c b – 4ac page 692 2 2 ∫ ( a + bx ) dx = ------ ( a + bx ) 3b 2 2 ∫ ( a + bx ) dx = ------ ( a + bx ) 3b 1 -2 1 -2 3 -- 3 -- ∫ x ( a + bx ) 1 -2 2 ( 2a – 3bx ) ( a + bx ) dx = – ---------------------------------------------------2 15b 1 -- 3 -2 1 2 2 ln x + ---- + x 1 - 2 a 2 2 2 1 -x ( 1 + a x ) + -------------------------------------------a 2 2 2 ---------------------------------------------------------------------------------∫ ( 1 + a x ) dx = 2 1a ---- + x 2 a x ( 1 + a x ) dx = --------------------------∫ 3 1 -2 2 2 3 -2 2 2 2 13 1 1 ln x + ---- + x ---2 a ax 1 8 2 2 2 2 2 2 2 2 2 - ∫ x ( 1 + a x ) dx = ----- ----2 + x – -------- x ( 1 + a x ) – --------------------------------------------2 3 4 a 8a 8a 1 asin ( ax ) 2 2 2 ( 1 – a x ) dx = -- x ( 1 – a x ) + -------------------∫ 2 a 2 a 1 - ---- 2 ∫ x ( 1 – a x ) dx = – -- a2 – x 3 1 -2 2 2 3 -1 -2 2 2 1 -- 1 -- x 2 2 2 1 x 2 2 2 2 x ( a – x ) dx = – -- ( a – x ) + -- x ( a – x ) + a asin -- ∫ a 4 8 2 2 1 -2 2 3 -- 1 -- 1 12 2 ∫ ( 1 + a x ) dx = -- ln x + ----2 + x a a 2 2 1 – -2 1 -- ∫(1 – a 2 2 1 1 x ) dx = -- asin ( ax ) = – -- acos ( ax ) a a 1 – -2 page 693 • Integrals using the natural logarithm base ‘e’, ax e ∫ e dx = ------- + C a ax e ∫ xe dx = ------- ( ax – 1 ) + C 2 a ax ax 24.6.2 Vector Calculus • When dealing with large and/or time varying objects or phenomenon we must be able to describe the state at locations, and as a whole. To do this vectors are a very useful tool. • Consider a basic function and how it may be represented with partial derivatives. page 694 y = f ( x, y, z ) We can write this in differential form, but the right hand side must contain partial derivatives. If we separate the operators from the function, we get a simpler form. We can then look at them as the result of a dot product, and divide it into two vectors. ∂ ∂ ∂ ( d )y = f ( x, y, z ) dx + f ( x, y, z ) dy + f ( x, y, z ) dz ∂ x ∂ y ∂ z ∂ ∂ ∂ ( d )y = dx + dy + dz f ( x, y, z ) ∂ x ∂ y ∂ z ∂ ∂ ∂ ( d )y = i + j + k • ( dxi + dyj + dzk ) f ( x, y, z ) ∂x ∂y ∂z We then replace these vectors with the operators below. In this form we can manipulate the equation easily (whereas the previous form was very awkward). ( d )y = [ ∇ • dX ]f ( x, y, z ) ( d )y = ∇f ( x, y, z ) • dX ( d )y = ∇f ( x, y, z ) dX cos θ In summary, ∇ = ∂ ∂ ∂ i+ j+ k ∂x ∂y ∂z ∇ • F = the divergence of function F ∇ × F = the curl of functio F n F = F x i + F y j + Fz k • Gauss’s or Green’s or divergence theorem is given below. Both sides give the flux across a surface, or out of a volume. This is very useful for dealing with magnetic fields. ∫ ( ∇ • F ) dV V = ∫ °FdA A where, V, A = a volume V enclosed by a surface are Aa F = a field or vector value over a volume page 695 • Stoke’s theorem is given below. Both sides give the flux across a surface, or out of a volume. This is very useful for dealing with magnetic fields. ∫ ( ∇ × F ) dA A = ∫ °FdL L where, A, L = A surface area A, with a bounding parimeter of length L F = a field or vector value over a volume 24.6.3 Differential Equations • Solving differential equations is not very challenging, but there are a number of forms that need to be remembered. • Another complication that often occurs is that the solution of the equations may vary depending upon boundary or initial conditions. An example of this is a mass spring combination. If they are initially at rest then they will stay at rest, but if there is some disturbance, then they will oscillate indefinitely. • We can judge the order of these equations by the highest order derivative in the equation. • Note: These equations are typically shown with derivatives only, when integrals occur they are typically eliminated by taking derivatives of the entire equation. • Some of the terms used when describing differential equations are, ordinary differential equations - if all the derivatives are of a single variable. In the example below ’x’ is the variable with derivatives. dd- 2 ---- x + ---- x = y dt dt e.g., first-order differential equations - have only first-order derivatives, d d ---- x + ---- y = 2 dt dt e.g., page 696 second-order differential equations - have at least on second derivative, dd ---- x + ---- y = 2 dt dt 2 e.g., higher order differential equations - have at least one derivative that is higher than second-order. partial differential equations - these equations have partial derivatives • Note: when solving these equations it is common to hit blocks. In these cases backtrack and try another approach. • linearity of a differential equation is determined by looking at the dependant variables in the equation. The equation is linear if they appear with an exponent other than 1. eg. y'' + y' + 2 = 5x ( y'' ) + y' + 2 = 5x y'' + ( y' ) + 2 = 5x y'' + sin ( y' ) + 2 = 5x 3 2 linear non-linear non-linear non-linear 24.6.3.1 - First-order Differential Equations • These systems tend to have a relaxed or passive nature in real applications. • Examples of these equations are given below, y' + 2xy – 4x = 0 y' – 2y = 0 2 3 • Typical methods for solving these equations include, guessing then testing separation page 697 homogeneous 24.6.3.1.1 - Guessing • In this technique we guess at a function that will satisfy the equation, and test it to see if it works. y' + y = 0 y = Ce –t the given equation the guess now try to substitute into the equation y' = – Ce –t –t –t y' + y = – Ce + Ce = 0 therefore the guess worked - it is correct y = Ce –t • The previous example showed a general solution (i.e., the value of ’C’ was not found). We can also find a particular solution. y = Ce y = 5e –t a general solution a particular solution –t 24.6.3.1.2 - Separable Equations • In a separable equation the differential can be split so that it is on both sides of the equation. We then integrate to get the solution. This typically means there is only a single derivative term. page 698 e.g., dx ----- + y 2 + 2y + 3 = 0 dy ∴dx = ( – y – 2y – 3 )dy –y - 2 ∴x = ------- – y – 3y + C 3 3 2 e.g., dx ----- + x = 0 dy 1 ∴ – -- dx = dy x ∴ ln ( – x ) = y 24.6.3.1.3 - Homogeneous Equations and Substitution • These techniques depend upon finding some combination of the variables in the equation that can be replaced with another variable to simplify the equation. This technique requires a bit of guessing about what to substitute for, and when it is to be applied. page 699 e.g., dy y ----- = - – 1 dx x y u = x the equation given the substitution chosen Put the substitution in and solve the differential equation, dy ----- = u – 1 dx du ∴u + x ----- = u – 1 dx du –1 ∴----- = ----dx x du 1 ∴– ----- = -dx x ∴– u = ln ( x ) + C Substitute the results back into the original substitution equation to get rid of ’u’, y – - = ln ( x ) + C x ∴y = – x ln ( x ) – Cx 24.6.3.2 - Second-order Differential Equations • These equations have at least one second-order derivative. • In engineering we will encounter a number of forms, - homogeneous - nonhomogeneous 24.6.3.2.1 - Linear Homogeneous • These equations will have a standard form, page 700 d- 2 d ---- y + A ---- y + By = 0 dt dt • An example of a solution is, e.g., d- 2 d ---- y + 6 ---- y + 3y = 0 dt dt Guess, y = e Bt d ---- y = Be Bt dt d ---- y = B 2 e Bt dt substitute and solve for B, B e + 6Be + 3e B + 6B + 3 = 0 B = – 3 + 2.449j, – 3 – 2.449j substitute and solve for B, y = e y = e y = e ( – 3 + 2.449j )t – 3 t 2.449jt 2 2 Bt Bt Bt 2 = 0 e –3 t ( cos ( 2.449t ) + j sin ( 2.449t ) ) Note: if both the roots are the same, y = C1e Bt + C 2 te Bt 24.6.3.2.2 - Nonhomogeneous Linear Equations • These equations have the general form, page 701 d- 2 d ---- y + A ---- y + By = Cx dt dt • to solve these equations we need to find the homogeneous and particular solutions and then add the two solutions. y = yh + yp to find yh solve, d 2 d ---- y + A ---- y + B = 0 dt dt to find yp guess at a value of y and then test for validity, A good table of guesses is, Cx form A Ax + B Ax e B sin ( Ax ) or B cos ( Ax ) Guess C Cx + D Ax Ax Cxe Ce C sin ( Ax ) + D cos ( Ax ) or Cx sin ( Ax ) + xD cos ( Ax ) • Consider the example below, page 702 d- 2 d ---- y + ---- y – 6y = e –2x dt dt First solve for the homogeneous part, d- 2 d ---- y + ---- y – 6y = 0 dt dt try y = e Bx d ---- y = BeBx dt d ---- y = B 2 e Bx dt 2 B e 2 2 Bx + Be Bx – 6e Bx = 0 B +B–6 = 0 B = – 3, 2 yh = e – 3x +e 2x Next, solve for the particular part. We will guess the function below. y = Ce – 2x d ---- y = – 2C e –2x dt d ---- y = 4Ce –2x dt 4Ce – 2x 2 + – 2C e – 2x – 6Ce – 2x = e – 2x 4C – 2C – 6C = 1 C = 0.25 y p = 0.25e Finally, y = e – 3x – 2x +e 2x + 0.25e – 2x 24.6.3.3 - Higher Order Differential Equations 24.6.3.4 - Partial Differential Equations • Partial difference equations become critical with many engineering applications involving flows, etc. page 703 24.6.4 Other Calculus Stuff • The Taylor series expansion can be used to find polynomial approximations of functions. f'' ( a ) ( x – a ) f ( a)(x – a) f ( x ) = f ( a ) + f' ( a ) ( x – a ) + ------------------------------ + … + -----------------------------------------------2! ( n – 1 )! 2 (n – 1) n–1 24.6.5 Practice Problems 1. Find the derivative of the function below with respect to time. 3t ----------------- + e 2t 2 (2 + t) (ans. d 3t dd---- ----------------- + e 2t = ---- ( 3t ( 2 + t ) –2 ) + ---- ( e 2t ) = 3 ( 2 + t ) –2 – 6t ( 2 + t ) –3 + 2e 2t 2 dt dt dt (2 + t) 2. Solve the following differential equation, given the initial conditions at t=0s. x'' + 4x' + 4x = 5t x0 = 0 x' 0 = 0 25te + 1.( sin t + cos t ) dt d–2 b) ---.25 .25t – 1.( 5te ) dt dd) ---.page 704 (ans.( 5 ln t ) dt C 2 = 1.25 4 x p = 1.25 3. homogeneous solution: guess: x'' + 4x' + 4x = 0 At xh = e 2 At x h' = Ae At At At x h'' = A e 2 2 At A e + 4Ae + 4e xh = C1 e – 2t = 0 = A + 4A + 4 = ( A + 2 ) ( A + 2 ) + C 2 te – 2t particular solution: guess: x p = At + B x p' = A x p'' = 0 ( 0 ) + 4 ( A ) + 4 ( At + B ) = 5t ( 4A + 4B ) + ( 4A )t = ( 0 ) + ( 5 )t 5 A = -.25 –2 ( 0 ) 0 = C1 e + C 2 ( 0 )e + 1.25 + C 2 te –2 ( 0 ) – 2t + 1.= 1.25 – 2 C 1 + C 2 + 1.25t – 1.25 ( 0 ) – 1. Find the following derivatives.25 C 1 = 1.25 x ( t ) = 1.25 = C 1 – 1.25e + 1.25 combine and solve for constants: x ( t ) = xh + xp = C1 e for x(0) = 0 – 2t 4 ( 1.25t – 1.25 ) + C 2 + 1.25 –2( 0) for (d/dt)x(0) = 0 2t 0 = ( – 2 )C 1 e 2t –2 ( 0 ) + ( – 2 )C 2 ( 0 )e + C2 e –2 ( 0 ) + 1. da) ---.25 = 0 = –2 ( 1.( ( t + 2 ) ) dt d8t c) ---.25 ) + 4B = 0 B = – 1. 5t ) = ------------------------.( 5te ) = 5e + 40te dt d5 d) ---. Find the following derivative. Find the following integrals ∫ 6 t dt 7t b) ∫ 14 e dt c) ∫ sin ( 0.5t ) dt ∫ -.( 5te 4t + ( t + 4 ) – 3 ) dt .( sin t + cos t ) = ---.dx x 5 (ans.5t ) + C 0.dx x 5 – cos ( 0. t3 a) ∫ 6 t dt = 6 --- = 2t + C 3 2 3 e 7t 7t b) ∫ 14 e dt = 14 ----.( sin t ) + ---.( ( t + 2 ) ) = – 2 ( t + 2 ) dt d8t 8t 8t c) ---.5t ) dt a) 2 d) ∫ -.5 = 5 ln ( x ) + C 5. ddda) ---. d---.( cos t ) = cos t – sin t dt dt dt d–2 –3 b) ---.( 5 ln t ) = -dt t 4.page 705 (ans.+ C = – 2 cos ( 0. + C = 2e + C 7 c) d) 7t ∫ sin ( 0. Find the following derivatives. a) d.1 ----. a) d. ----------- = -----------------2 x + 1 dx (x + 1) d ---. Solve the following differential equation.( e –t sin ( 2t – 4 ) ) = – e –t sin ( 2t – 4 ) + 2e –t cos ( 2t – 4 ) dt b) 7.5e + C 1 = – cos θ + -. Solve the following integrals.( e –t sin ( 2t – 4 ) ) dt b) (ans.sin 3θ + C 3 2t b) ∫ ( sin θ + cos 3θ ) dθ 8.page 706 6. a) ∫e 2t dt b) ∫ ( sin θ + cos 3θ ) dθ (ans. a) ∫e 2t dt = 0. x'' + 5x' + 3x = 3 x( 0) = 1 x' ( 0 ) = 1 . ----------- dx x + 1 d---.1 –1 ----. Set up an integral and solve it to find the volume inside the shape below. – 1 2 2 xh = C1 e Particular: xp = A x' p = 0 x'' p = 0 A = 1 – 4t + C2e –t 0 + 5 ( 0 ) + 3A = 3 xp = 1 Initial values: x = x h + xp = C1 e – 4t – 4t –t + C2 e + 1 C1 = –C2 1 = C1( 1 ) + C2( 1 ) + 1 x' = – 4C 1 e – C2e –t 1 = – 4C 1 ( 1 ) – C 2 ( 1 ) 4 ( – C2 ) + C2 = –1 1 – 4t 1 –t x = – -.e + -.= – 4.e + 1 3 3 1 C 2 = -3 1 C 1 = – -3 9.= ---------------. The shape is basically a cone with the top cut off. x'' + 5x' + 3x = 3 Homogeneous: A + 5A + 4 = 0 2 x( 0) = 1 x' ( 0 ) = 1 – 5 ± 25 – 16 –5±3 A = ----------------------------------.page 707 (ans. . ---------. Solve the first order non-homogeneous differential equation below. 2x' + 4x = 5 sin 4t 11. x + -. Assume the system starts at rest.page 708 z b y x a c (ans. x + π ---------. V = ∫ dV = ∫0 A dx 2 2 a c–b r = b + ---------. 2x'' + 4x' + 2x = 5 where. a a 3 a 2 0 π 2 2 2 V = πb a + π ( c – b )a + -. x = πb + 2π ---------. x a a a V = ∫0 πb 2 a 2 c–b c–b 2 + 2π ---------. x dx a a a 2 c–b 2 π c–b 2 3 V = πb x + π ---------. Solve the second order non-homogeneous differential equation below.( c – b ) a 3 10. ---------. a + -. x + π ---------. x a c–b c–b c–b 2 2 2 A = πr = π b + ---------. x( 0) = 2 x' ( 0 ) = 0 . x a 3 a c–b 2 π c–b 3 2 V = πb a + π ---------. y ( t i ) ≈ -------------------- = --------------------i = -.= – 2 y i + y i – 1 + y i + 1 -------------------------------------------i 2 dt T T 2 .( y i + 1 – y i ) – -.7.7 NUMERICAL METHODS • These techniques approximate system responses without doing integrations.( y i – y i – 1 ) dT T ---- y ( t ) ≈ ----------------------------------------------------------------. ( t i – t i – 1 ) = -.this means by doing repeated calculations to solve the equation.( y i – y i – 1 ) = -.page 709 24.1 Approximation of Integrals and Derivatives from Sampled Data • This form of integration is done numerically .( y i + 1 – y i ) ti – ti – 1 t i + 1 – ti dt T T 1 1 -. and will result in small errors. But these techniques make it possible to solve complex problems much faster. etc.( y i + y i – 1 ) ∫ti – 1 2 2 yi – yi – 1 yi + 1 – y 1 1 d---. 24. Numerical techniques are not as elegant as solving differential equations. • This method uses forward/backward differences to estimate derivatives or integrals from measured data. y(t) yi + 1 yi yi – 1 ti – 1 ti T ti T ti + 1 yi + yi – 1 T y ( t i ) ≈ -------------------. 9 x(t) 0 d/dt x(t) 0 h = 0.h ---- x ( t ) + ---.3 d.4 x ( t + h ) = x ( t ) + h ---- x ( t ) + ---.h ---- x ( t ) + ---.3 1.2 0. d ---- x = 1 + x 2 + t 3 dt d ---- x = 0 dt 0 x0 = 0 t (s) 0 0.h ---- x ( t ) + … dt 2! dt 3! dt 4! dt • When h=0 this is called a MacLaurin series.3 Taylor Series Integration • Recall the basic Taylor series.8 0.2 1.7. d1.4 d.4 0.1 .2 Euler First-order Integration • We can also estimate the change resulting from a derivative using Euler’s equation for a first-order difference equation. • We can integrate a function by.page 710 24.1 0.5 0.6 0.2 d.3 0.7 0. dy ( t + h ) ≈ y ( t ) + h ---.y ( t ) dt 24.7. 5 Newton-Raphson to Find Roots • When given an equation where an algebraic solution is not feasible. . 1 x ( t + h ) = x ( t ) + -. x + ----- 2 2 F2 h F 3 = hf t + --. x + F 3 ) where.4 Runge-Kutta Integration • The equations below are for calculating a fourth order Runge-Kutta integration. x + ----- 2 2 F 4 = hf ( t + h. and takes iterative steps towards a solution. One simple technique uses an instantaneous slope of the function.7. f ( xi ) x i + 1 = x i – ---------------------d ----. x ) F1 h F 2 = hf t + --.f ( x ) dx i • The function f(x) is supplied by the user.( F 1 + 2F 2 + 2F 3 + F4 ) 6 F 1 = hf ( t. a numerical solution may be required.7.page 711 24. x = the state variables f = the differential function t = current point in time h = the time step to the next integration point 24. And.8. ∫0 f ( t )e ∞ – st dt f ( t ) = the function in terms of time t F ( s ) = the function in terms of the Laplace s 24. 24.page 712 • This method can become divergent if the function has an inflection point near the root. • This calculation should be repeated until the final solution is found. • The technique is also sensitive to the initial guess. the Laplace transform is much more useful in system analysis. • The basic Laplace transform equations is shown below. as you recall from before the inverse of time is frequency. Because we are normally concerned with response.1 Laplace Transform Tables • Basic Laplace Transforms for operational transformations are given below. . F(s) = where.8 LAPLACE TRANSFORMS • The Laplace transform allows us to reverse time. – … – d f ( 0 ) ------------------n dt dt – n – ∫0 f ( t ) dt f ( t – a )u ( t – a ).a a – df ( s ) -------------ds f(s) ( – 1 ) -------------n ds nd ∞ n f ( at ). a > 0 e – at t f( s) f(t) f(s – a) 1 -- -. a > 0 tf ( t ) t f(t) f(t) ------t n ∫ f ( u ) du s • A set of useful functional Laplace transforms are given below.page 713 TIME DOMAIN Kf ( t ) f1 ( t ) + f2 ( t ) –f3 ( t ) + … df ( t ) ----------dt d f(t ) ------------2 dt d f(t ) ------------n dt n 2 FREQUENCY DOMAIN Kf ( s ) f1 ( s ) + f2 ( s ) –f 3 ( s ) + … sf ( s ) – f ( 0 ) df ( 0 ) 2 – s f ( s ) – sf ( 0 ) – ----------------dt s f( s) – s f(s) -------s e – as n n–1 – – f(0 ) – s – n – 2 df ( 0 ) ----------------.f s . . A 2 2 ( s + α + βj ) ( s + α – βj ) complex conjugate complex conjugate 2t A e – αt • Laplace transforms can be used to solve differential equations.+ A ------------------------------------s + α – βj s + α + βj A -----------------------------.+ ------------------------------------.page 714 TIME DOMAIN FREQUENCY DOMAIN A -s 1 ---2 s 1---------s+a ω ----------------2 2 s +ω s ----------------s +ω 2 2 A t e – at sin ( ωt ) cos ( ωt ) te e e – at – at sin ( ωt ) cos ( ωt ) 1 -----------------2 (s + a) ω ------------------------------(s + a) + ω s+a ------------------------------(s + a) + ω A---------s–a A ----------------2 (s – a) 2 2 2 – at 2 Ae – at Ate – at 2Ae – αt cos ( βt + θ ) cos ( βt + θ ) A ----------------------. . page 715 24. • The inverse z-transform is obtained by contour integration in the complex plane 1n–1 x [ n ] = ------.XIn ) = –n ∑ x [ n ]z n=0 –n both cases.. of finite magnitude). • Along with a z-transform we associate its region of convergence (or ROC). the two-sided z-transform is defined by ∞ ∞ X(z) = ∑ n = –∞ (z x [ n ]z . This is usually avoided by partial fraction inversion techj2π° niques. is z ) .e.9 z-TRANSFORMS • For a discrete-time signal x [ n ] . These are the values of z for which X ( bounded (i. The one-sided z-transform is defined by . similar to the Laplace transform.∫ X ( z )z dz . the z-transform is a polynomial in the complex variable z . page 716 • Some common z-transforms are shown below. Table 3: Common z-transforms Signal x[ n] δ[n] u[n] z-Transform X(z) 1 1 --------------–1 1–z z ---------------------–1 2 (1 – z ) z (1 + z ) ---------------------------–1 3 (1 – z ) 1 -----------------–1 1 – az az -------------------------–1 2 ( 1 – az ) 1 -----------------–1 1 – az az -------------------------–1 2 ( 1 – az ) 1 – z cos ω 0 -----------------------------------------------–1 –2 1 – 2z cos ω 0 + z z sin ω 0 -----------------------------------------------–1 –2 1 – 2z cos ω 0 + z 1 – az cos ω 0 --------------------------------------------------------–1 2 –2 1 – 2az cos ω 0 + a z –1 –1 –1 –1 –1 –1 –1 –1 ROC All z z >1 nu [ n ] z >1 n u[n ] 2 z >1 a u[n ] n z > a na u [ n ] n z > a ( – a )u [ – n – 1 ] n z < a ( – na )u [ – n – 1 ] n z < a cos ( ω 0 n ) u [ n ] z >1 sin ( ω 0 n ) u [ n ] z >1 a cos ( ω 0 n ) u [ n ] n z > a . u [ n ] k! ( n – k )! z >1 • The z-transform also has various properties that are useful. The table below lists properties for the two-sided z-transform. x[ n] Table 4: Two-sided z-Transform Properties Property Notation Time Domain x[ n] x1 [ n ] x2 [ n ] Linearity αx 1 [ n ] + βx 2 [ n ] X(z) X1 ( z ) X2 ( z ) αX 1 ( z ) + βX 2 ( z ) z-Domain ROC r2 < z < r 1 ROC 1 ROC 2 At least the intersection of ROC 1 and ROC 2 Time Shifting x[ n – k] z X( z) –k That of X ( z ) . except z = 0 if k > 0 and z = ∞ if k < 0 a r2 < z < a r1 1 1 ---. The one-sided z-transform properties can be derived from the ones below by considering the signal x [ n ]u [ nof simply instead ] .page 717 Table 3: Common z-transforms Signal x[ n] a sin ( ω 0 n ) u [ n ] n z-Transform X(z) az sin ω 0 --------------------------------------------------------–1 2 –2 1 – 2az cos ω 0 + a z z ----------------------------–1 k + 1 (1 – z ) –k –1 ROC z > a n! ---------------------.< z < ---r1 r2 r2 < z < r 1 z-Domain Scaling Time Reversal a x[ n] x [ –n ] nx [ n ] n X(a z) X(z ) dX ( z ) – z ------------dz –1 –1 z-Domain Differentiation . 11 TOPICS NOT COVERED (YET) • To ensure that the omissions are obvious. • Frequency domain . a0 f ( x ) = ---. • The basic definition of the Fourier series is given below. Bessel .page 718 Table 4: Two-sided z-Transform Properties Property Convolution Time Domain x 1 [ n ]*x 2 [ n ] z-Domain X 1 ( z )X 2 ( z ) ROC At least the intersection of ROC 1 and ROC 2 Multiplication x 1 [ n ]x 2 [ n ] x [ n ] causal z 1------.+ 2 ∞ ∑ n=1 nπx nπx a n cos -------.∫ f ( x ) sin -------. + b n sin -------. For example a square wave can be approximated with a sum of a series of sine waves with varying magnitudes. dx L L –L 24. Some of these may be added later if their need becomes obvious. v –1 dv v j2π° x [ 0 ] = lim X ( z ) z→∞ At least r 1l r 2l < z < r 1u r 2u Initial value theorem 24.Fourier.∫ X 1 ( v )X 2 .∫ f ( x ) cos -------. I provide a list of topics not covered below.10 FOURIER SERIES • These series describe functions by their frequency spectrum content. dx L L –L 1 L nπx b n = -. L L 1 L nπx a n = -. R.page 719 24..12 REFERENCES/BIBLIOGRAPHY Spiegel. Mathematical Handbook of Formulas and Tables. McGraw-Hill Book Company. 1968. Schaum’s Outline Series. . M. • Suited to Large and Complex Programs. • Emphasizes structured programming. 25. allows you to create your own functions. and commercial compilers became available in the Late 70’s. and some ‘C’ compilers. Over 90% of UNIX is written in ‘C’.’ .1 WHY USE ‘C’? • ‘C’ is commonly used to produce operating systems and commercial software. • Very Fast. by focusing on functions and subroutines. • */ is the end of comment. almost as fast as assembler. and thus it has the name main(). and can never be ignored. • Machine Portable. • The main program is treated like a function. which means that it requires only small changes to run on other computers. • Statements are separated by semi-colons ‘.2 BACKGROUND • Developed at Bell Laboratories in the Early 70’s. AT&T originally developed ‘C’ with the intention of making it an inhouse standard. • lower/UPPER case is crucial.3 PROGRAM PARTS • /* is the start of a comment.page 720 25. Lotus-123. 25. • Very Flexible. • You may easily customize ’C’ to your own needs.Recnetly has become more popular because of its ties to UNIX. Some examples of these are UNIX. dBase. A BASIC INTRODUCTION TO ‘C’ 25. or a set of statements between curly brackets {. y. char can be modified by the addition of unsigned. /* add the two variables */ printf(“%d + %d = %d\n”. An unsigned integer will not use 1 bit for number sign.page 721 • Statements consist of one operation. /* define three variables and give one a value */ x = 3. This function will do a formatted print. long. A register variable will use a data register in the microprocessor. In this case the format says print an integer %d followed by a space then a ‘+’ then another space. The format is the first thing which appears between the brackets. • A very common function in ‘C’ is printf(). then a line feed ‘\n’. and register. float (4 byte IEEE floating point standard). ‘=’. All variables that follow the format statement are those to be printed. and another space. /*print the results */ } Results (output): 3+2=5 • lines may be of any length. and it will speed things up (this is only available for integers). x. /* give another variable a value */ z = x + y. short. and z are the three integers to be printed. . short (1 byte integer). z). another integer. } • There are no line numbers. in their respective orders. y. Program to Add two Numbers: /* A simple program to add two numbers and print the results */ main() { int x. if possible. x. double (8 byte IEEE floating point standard). another space. another integer. z. y = 2. char (1 byte integer). long (4 byte integer). •int. • Major Data Types for variables and functions are (for IBM PC): int (2 byte integer). /* describe types of variable lists */ { int c. and is not used by any other function. short k. z). z. which has been assigned a name. /* Declare a integer function called ‘add’ */ main() { int x = 3. This determines which functions are able to use that variable. this is an auto type. If the variable needs to be initialized every time the subroutine is called. char l.g. These can be modified by the addition of static. Using extern will allow the variable . If a variable is defined in a function. and returning a single value. y). then it may be used by any function. /* pass the two values to ‘add’ and get the sum*/ printf(“%d + %d = %d\n”. y. /* define a work integer */ c = a + b. etc • A function consists of a sub-routine or program. then it will be local to that function. b) /* define function and variable list */ int a. register j. b. (e. This function is capable of accepting an argument list. /* add the numbers */ return(c). static variables can be used for a variable that must keep the value it had the last time the function was called. y = 2. The function must be defined before it is called from within the program. extern and auto.page 722 Example of Defining Different Data Types: main() { unsigned int i. /* Return the number to the calling program */ } • Every variable has a scope. Program to add numbers with a function: /* A simple program to add two numbers and print the results */ int add(). /*print the results */ } int add(a. sin() and read()). If a variable is global. /* define three variables and give values */ z = add(x. x. double m. /*print the number */ } } . i = i + 1){ printf(“number %d \n”. enum. • Some basic control flow statements are while(). i <= 5. /* Declare an integer function called ‘add’ */ main() { printf(“%d + %d = %d\n”. switch(). i). and if(). etc. x. y. /* Define global x and y values */ y = 2. /*print the results */ } int add() /* define function */ { return(x + y). struct. Program example using global variables: /* A simple program to add two numbers and print the results */ int x = 3. do-while(). A couple of example programs are given below which demonstrate all the ’C’ flow statements. Program example with a for loop: /* A simple program toprint numbers from 1 to 5*/ main() { int i. add()). add(). for(i = 1.page 723 types from other parts of the program to be used in a function. /* Return the sumto the calling program */ } • Other variable types of variables are union. for(). }while(i <= 5) } or example with a do until loop: main() { int i = 1. i). i = i + 1. }until(i > 5) } .page 724 or example with a while loop: main() { int i = 1. i = i + 1. i). do{ printf(“number %d \n”. while(i <= 5){ printf(“number %d \n”. i = i + 1. do{ printf(“number %d \n”. } } or example with a do while loop main() { int i = 1. i). h extension is used to indicate a header file which contains ‘C’ code to define functions and constants.h> at the top of your programs. x-2).h into the program. } else if(y > x){ printf(“Maximum is %d \n”. We did not define printf() before we used it. case 2: /* You need two to start something */ printf(“There are two parents\n”). y = 3. } } • #include <filename. The *. “stdio. break. /* Number of People in Family */ switch(x){ /* choose the numerical switch */ case 0: /* Nobody */ printf(“There is no family \n”).h”. } else { printf(“Both values are %d \n”. x). but a start */ printf(“There is one parent\n”).h> will insert the file named filename.page 725 Example Program with an if else: main() { int x = 2. default: /* critical mass */ printf(“There are two parents and %d kids\n”. x). a function must be defined (as with the ‘add’ function). } } Example Program using switch-case: main() { int x = 3. if(x > y){ printf(“Maximum is %d \n”. break.’. break. If we needed to use a math function like y = sin(x) we would have to also use . This almost always includes “stdio.h” contains a line which says ‘int printf(). y). break. As we saw before. this is normally done by using #include <stdio. case 1: /* Only one person. 283185307 #define STEPS 5 main() { double x. /* Current x value*/ for(x = 0. or dimensions. /* and */ are all handled by the Preprocessor. • #define.page 726 #include <math. before the compiler touches the program. A Sample Program to Print Some sin() values (using defined constatnts) #include “stdio. #else. #undef CONSTANT will undefine the CONSTANT. #ifdef.h” #define TWO_PI 6.0. Arrays may be any data type. #ifndef. or else the compiler would not know what type of value that sin() is supposed to return. #ifndef. #if. • Matrices are defined as shown in the example.h” #include “math. #else and #else can be used to conditionally include parts of a program. In ‘C’ there are no limits to the matrix size. x = x + (TWO_PI / STEPS)){ printf(“%f = sin(%f) \n”. Strings are stored as arrays of characters. . •#define CONSTANT TEXT will do a direct replacement of CONSTANT in the program with TEXT. This is use for including and eliminating debugging lines in a program. #include.h>. } } • #ifdef. x). • i++ is the same as i = i + 1. before compilation. x <= TWO_PI. #if. sin(x). char H. We may use some of the operations of ‘C’ to get the variable that the pointer.page 727 A Sample Program to Get a String Then Print its ASCII Values (with matrix) #include “stdio. i < STRING_LENGTH. points to. this memory of location is called a pointer. ASCII 85 pos 0. /* character array */ gets(string). } } INPUT: HUGH<return> OUTPUT: pos 0. char H.h” #define STRING_LENGTH 5 main() { int i. First recall that each variable uses a real location in memory. char string[STRING_LENGTH]. This allows us to deal with variables in a very powerful way. /* Input string from keyboard */ for(i = 0. This pointer is always hidden from the programmer. ASCII 72 pos 0. char . char G. string[i]). ASCII 0 • Pointers are a very unique feature of ‘C’. string[i]. char U. ASCII 71 pos 0. The computer remembers where the location of that variable is. ASCII 72 pos 0. char %c. the pointer to a variable may be used. i. ASCII %d \n”. i++){ printf(“pos %d. In ‘C’. and uses it only in the background. . i. First and Second Pass Compiler. char H.4 HOW A ‘C’ COMPILER WORKS • A ‘C’ compiler has three basic components: Preprocessor. i++){ printf(“ pos %d.h” main() { int i. char G. /* character pointer */ gets(string). ASCII 72 pos 0.page 728 A Sample Program to Get a String Then Print its ASCII Values (with pointers): #include “stdio. char *string. ASCII %d \n”. string[i]). . ASCII 72 25. and Linker. char H. /* Input string from keyboard */ for(i = 0. string[i] != 0. } } INPUT: HUGH<return> OUTPUT: pos 0. ASCII 85 pos 0. string[i]. char U. char %c. ASCII 71 pos 0. c” #include files (like “stdio. Library files (*.h”) The Preprocessor Will remove comments.5 STRUCTURED ‘C’ CODE • A key to well designed and understandable programs. ASCII Text Code The First and Second Pass The compiler will parse the program and check the syntax.page 729 Source code “filename. include programs. replace strings which have a defined value. Object Code (*. .exe) 25.obj) The Linker The compiler will combine the basic machine language from the first pass and combine it with the pieces of machine language in the compiler libraries. TheSecond Pass produces some simple machine language. An optimization operation may be used to reduce execution time.lib) Executable Code (*. which performs the basic functions of the program. and remove unneeded characters. i). Each function consists of programs written using the previous simpler functions. } 25. .6 ARCHITECTURE OF ‘C’ PROGRAMS (TOP-DOWN) 25.for(. /* counter */ for(i = 0.i). to make the program look less cluttered. A Sample of a Bad Program Structure: main(){int i. } exit(0).page 730 • Use indents. • Descriptive variable names.i++)printf(“age:%d\n”.} A Good Example of the same Program: #include <stdio. • All declarations for the program should be made at the top of the program listing.h> #define COUNT 10 /* Number of counts in loop */ main() { int i.6. • Comments are essential to clarify various program parts. and give it a block style. i++){ /* loop to print numbers */ printf(“age:%d\n”.i<10. spaces and blank lines. and defined constants make the purpose of the variable obvious. i < COUNT.1 How? • A program should be broken into fundamental parts (using functions for each part) and then assembled using functions. Design User Interface .Write out the relevant theory. 2. calculations and figures. which are necessary for a complete solution to the problem. as outlined in the course notes.The layout of the screen(s) must be done on paper. • It is just as easy to change the overall flow of a program. Define Problem . (There are numerous factors to be considered at this stage. User options and help are also considered here. The method of data entry must also be considered. Application of ‘C’ to a CAD Program 25. once written. • When programs are complete. and are thus much easier to locate. than in a complete program.) . 3. as it is to change a function. From this we make a list of required data (inputs) and necessary results (output). • Try to isolate machine specific commands (like graphics) into a few functions.7 CREATING TOP DOWN PROGRAMS 1. This description should include variables. • Never use goto’s. 25. It is much easier to find an error in a few lines of code. • Updates to programs are much easier. errors tend to be associated with modules.2 Why? • A top-down design allows modules to be tested as they are completed.Make a written description of what the program is expected to do.page 731 Example with a Car Frame Suspension Wheel Body Frame is like one subroutine which also calls other subroutines like Suspension Engine • A Clear division should be maintained between program levels. they are a major source of logic errors. when we only need to change one function. Define Objectives . Functions are much easier to use.6. Load Position. a top-down diagram can be drawn. and a written description of functions should also be given. and is written calling dummy ‘program stubs’. a display of Beam Deflection. Note: Always consider the basic elements of Software Engineering. If any bugs are encountered. then the program is revised.2 Problem Definition: • The basic theory for beam design is available in any good mechanical design textbook. and then retested. the program is compiled.1 Objectives: • The program is expected to aid the design of beams by taking basic information about beam geometry and material. Axial Stiffness.8. and be under a single point load. 25.At this stage. the operation of the program is formally described. The program should also provide a printed report on the beam. before you commit yourself to your programmed solution. Beam Length. Load Force. This continues until all of the stubs are completed. as outlined in the ES488 course notes. Beam Width. Beam Material. 6. Bending Stiffness. After the completion of any new function. • The possible outputs are Cross Section Area.8. and then providing immediate feedback. . Document . 25.page 732 4.The dummy ‘stubs’ are now individually written as functions. 7. In this example it will not be given. Testing and Debugging. tested and debugged. 5. • The inputs were determined to be few in number: Beam Type. Write Flow Program . These functions will call another set of dummy ‘program stubs’. a visual display of Beam Geometry. For Programmers. then work out the problem on paper. and Beam Deflection. Beam Thickness. Golden Rule: If you are unsure how to proceed when writing a program.The program operation is tested. and checked to make sure that it meets the objectives. This is the most abstract part of the program. Expand Program .This is the main code that decides when general operations occur.8 HOW THE BEAMCAD PROGRAM WAS DESIGNED 25. The beam will be simply supported. Weight. Beam Height. 8.8. • Keys required: UP/DOWN Cursors. F4.2 . Beam Cross section(3). • The cursor keys could be used to cursor the input selector up or down.’.3 User Interface: 25. 25.3.3 .8. and updated. calculations. • The left side of the screen was for inputs. In the spirit of robustness it was decided to screen all other keys.3. 25. 25. input display and prompts(1). F2.page 733 25. ‘. and Beam Deflection(5). • In a separate Prompt Box(2). and other relevant information were obtained from a text. Numerical Results(4).8. • The screen is divided into regions for input(2). • For a printed report. ‘-’. screen information would be printed to a printer. on a single screen. with the prompt area replaced with the date and time.1 .Input: • Current Inputs were indicated by placing a box around the item on the display(1).3. • Proper textual descriptions were used to ensure clarity for the user. F1. • Single keystroke operation. numbers from ‘0’ to ‘9’. this input could be made.Help: • A special set of help information was needed. material types.8.3. the right side for outputs.4 .Screen Layout (also see figure): • The small number of inputs and outputs could all be displayed. . It was decided to ensure that the screen always displays all information necessary(2). and <RETURN>.Output: • Equations. Error Checking: • Reject any input which violates the input limits. • An error checking program was created.5 .page 734 25.6 .8. .Miscellaneous: • The screen was expressed in normalized coordinates by most sub-routines. • A default design was given. which the user could modify.8.3. • Colors were used to draw attention. which gives error messages. 25.3. and highlight areas. screen(UPDATE). These routines are listed below.8. */ { static int error. in a time of about 30 hours. 1989.5 Expand Program: • The routines were written in a top down fashion.8. screen(UPDATE). if(error == ERROR) { printf(“EGA Graphics Driver Not Installed”). if((error = setup()) != ERROR) { screen(NEW).4 Flow Program: main() /* * EXECUTIVE CONTROL LEVEL * * This is the main terminal point between the * various stages of setup. . input. } } error = NO_ERROR.page 735 25. } } 25. * * January 29th. while((error = input()) != DONE) { if(error == REVISED) { screen(NEW). } kill(). revision * and termination. • screen() .perform the calculations of outputs from the inputs • picture() .A function to print text on the screen at normalized coords. • text() . or refresh part of the screen.A function to draw.checks for entry error.A Function to draw a line in normalized coords.A function to print the EGA screen.deinitialize anything initialized in setup().A function to remove help messages from the screen.A function which controls the main input loop for numbers. controls. • calculations() .to set up graphics mode and printer.page 736 Routines Used In Package: • main() . and thus speed up response. this function uses some low level commands. against a set of limits for any input. • printes() . A response of more than 0. Input uses both higher and lower level commands for the sake of speed. • input() .draws the beam cross section and deflection of beam. • Condition and error flags were used to skip unnecessary operations. • box() . For the sake of speed. • setup() . and then dumps the screen to the printer. this section will use low level commands. • printer() . • draw_line() .A Function to draw a double lined box anywhere on screen.to be used as the main program junction.5 seconds will result in loss of attention by the user. error screening. In the interest of program speed. • kill() . . and any calls to desired routines. • enter() . screen(). input() and kill() directly. This took a couple of hours.8.7 Documentation . enter() draw_line() text() calculations() printes() Machine Dependence Increases Consideration of detail Consideration of flow 25. to their basic parts. none of the functions calls any of the functions to the left of it. with only realignment of graphics being required.6 Testing and Debugging: • The testing and debugging was very fast.8. This structure shows a clear division of tasks. 25. In this case main() will call setup().page 737 High Level Executive Subroutine Top main() screen() input() box() printer() Low Level Specific Subroutines Down setup() kill() picture() In this case we see that most of the routines are at the bottom of the design tree. only to the right. On the above diagram. and possible use it. basic sequence of operations. screen layout. 25.8. • The Objectives of the program were described. 3.1 . State your assumptions about the problem.7. Each piece of sheet metal will have a hole drilled in it that is the size of the screw. What are some reasons for using ‘C’ as a programming language? .8 Listing of BeamCAD Program. What are the basic components of a ‘C’ compiler.8. You are required to consider that the two pieces are experiencing a single force. 25.Programmers Manual: • Design Strategy was outlined and given. • A walk through manual was given. • Complete production of this Documentation took about 6 hours.7. • Program Specifications were also given. • A manual was given which described key layouts. and what do they do? 2.2 . who wanted to verify the theory. • The theory for beam design was given for the reference of any program user.Users Manual: • The documentation included an Executive Summary of what the Program does. then describe how you would produce this program with a Top Down design.page 738 25. You have been asked to design a CAD program which will choose a bolt and a nut to hold two pieces of sheet metal together. • Written for turbo ‘C’ 25.8. This allowed the user to follow an example which displayed all aspects of the program. • A complete program listing was given (with complete comments). inputs and outputs.9 PRACTICE PROBLEMS 1. Describe some of the reasons for Using Top-Down Design. .page 739 4. and how to do it. keep the units in the equation d = dx + dy 2 2 · d y = 5ft ∴d = ∴d = ∴d = ∴d = ∴d = ∴d = ( 10m ) + ( 5ft ) 100m + 25ft 2 2 2 2 multiply by 1 From the tables 1ft = 0.3048m 100m + 25ft -------------------- 1ft m 100m + 25ft ( 0. From the values below any conversion value can be derived.page 740 26. but instead a minimal (but fairly complete) set is given. • A simple example of unit conversion is given below. d x = 10m Find the distance ‘d’.3048m 0. If you are not sure about this. UNITS AND CONVERSIONS • Units are essential when describing real things.1 HOW TO USE UNITS • This table does not give an exhaustive list of conversion factors. • Good engineering practice demands that each number should always be accompanied with a unit. **a simple unit conversion example: Given. ask the instructor to show you how. 26.092903 ) -----2 ft 2 2 2 cancel out units 100m + 25 ( 0.3048m ∴1 = -------------------1ft 2 2 2 0.12m 2 2 2 .092903 )m 102.32m = 10. There are two major variations US units are marked with ‘US’ and Imperial units are marked with ‘IMP’. N•m 5.150782 mi 1 micron = 10-6 m 1 angstrom = 10-10 m 1 mil = 10-6 m 1 acre = 43. Use a slash or exponents. m = milli.2 HOW TO USE SI UNITS 1.540 cm 1 yd (yard) = 3 ft.609km 1 in.3048 m (meter) 1 mile = 1760 yards = 5280 ft = 1. (inches) = 0. Use spaces to divide digits when there are more than 5 figures.560 ft. e. e. e. N/cm or KN/m 3. 26. (feet) = 12 in.(inch) = 2..g.3 THE TABLE Major Division Distance 1 ft. commas are avoided because their use is equivalent to decimal points in some cultures.g.page 741 26.g. • In some cases units are non-standard. mega 2. (kg•m/s2) or (kg•m•s-2) 4. e. Use a dot in compound units.4047 hectares . Beware upper/lower case letter in many cases they can change meanings. 1 nautical mile = 6080 ft.. = 0. Try to move prefixes out of the denominator of the units. = 1852 m = 1..g. 000 dyne 1 dyne = 2.1 pints (pt) = 1. = 28.448N 1 oz. 1 US pint = 16 US oz 1 IMP pint = 20 IMP oz 1tablespoon = 0.5 US gal.2046 lb 1lb = 16 oz. 1 US gal.000 m2 1 Hectare (ha) = 10.274 in3 1 barrel = 31 IMP gal. (ounce) = 4.66 ft2 1 Hectare (ha) = 10.S.559.040842 IMP oz = 2 tablespoons = 6 teaspoons 1 IMP gal.201 U.2365882 l = 8 USoz 1 US oz = 1 dram = 456.785 l = 4 quarts = 8 pints = 16 cups 1 liter (l) = 0.2780N .06 quarts (qt) = 0.5 oz.085678e16 m Area 1 acre = 43.460528e15 m 1 parsec = 3.page 742 1 furlong = 660 ft 1 lightyear = 9.000 m2 Velocity 1 mph = 0. (pound) 1 kg = 9.001 m3 = 2.9464 l 1 cup (c) = 0. 1 bushel = 32 quarts 1 peck = 8 quarts Force/Mass 1 N (newton) = 1 kg•m/s2 = 100.248*10-6 lb. = 3. gal.81 N (on earth surface) = 2.000 m2 1 Hectare (ha) = 10.000 m2 1 Hectare (ha) = 10. = 1.26 gallons (gal) 1 qt (quart) = 0. = 31.35 g (gram) = 0.0129 drops = 480 US minim = 1.8689762 knot Angle 1 rev = 2PI radians = 360 degrees = 400 gradians 1 degree = 60 minutes 1 minute = 60 seconds Volume 1 US gallon = 231 in3 1 CC = 1 cm3 1 IMP gallon = 277. 7 W (watts) = 2. 1 W = 1 J/s .545 BTU/hr.2 kg 1 metric tonne = 1000 kg 1 troy oz = 480 grain (gr) 1 g = 5 carat 1 pennyweight = 24 grain 1 stone = 14 lb 1 long ton = 2240 lb 1 short ton = 2000 lb Pressure 1 Pascal (Pa) = 1 N/m2 = 6. (horsepower) = 745.p.0132*105 N/m2 1 psi = 2.2389 cal./sec.356 W 1 J (joule) = 1 N•m = 107 ergs = 0. Hg at 32F = 2.0355 in.895 kPa 1 atm (metric atmos.lb.) =760 mmHg at 0°C=14.59 kg 1 imperial ton = 2000 lb = 907.03108 slug 1 kip = 1000 lb.223 lb/in2=1. = 550 ft. Hg at 62F 1 microbar = 0.1 N/m2 Scale/Magnitude atto (a) = 10-18 femto (f) = 10-15 pico (p) = 10-12 nano (n) = 10-9 micro (µ) = 10-6 milli (m) = 10-3 centi (c) 10-2 deci (d) = 10-1 deka (da) = 10 hecto (H) = 102 kilo (K) = 103 mega (M) = 106 giga (G) = 109 tera (T) = 1012 peta (P) = 1015 exa (E) = 1018 Power 1 h.page 743 1 lb = 0. 1 slug = 14.0416 in. 1 ft•lb/s = 1. 252 calories = 1 BTU (British Thermal Unit) -273./hr.7 °F = 0 K = 0 R = absolute zero 0 °C = 32 °F = 273. electron rest mass = 9.459.666 0. 1 cfm (cubic foot per minute) = 1 ft3/min.62x10-27 erg-sec = 6.62x10-34 J.60219*10-19 J 1 erg = 10-7 J Temperature °F = [(°C*9)/5]+32.02x1023 atoms/atomic weight density of water = 1 g/cm3 electron charge = 1. °C = Celsius (Centigrade). pressure) 1 therm = 100. F = Fahrenheit K = Kelvin Rankine (R) = F .2 °C = -459. e = 2.67*10**-27 kg .5 cycles 1 Hz = 1 cycle/sec.11*10**-31 kg proton rest mass = 1.page 744 1 ev = 1. 1 rpm (revolutions per minute) = 60 RPS (Revolutions per second) = 60Hz 1 fps (foot per second) = 1 ft/sec 1 mph (miles per hour) = 1 mi.7 R = Water Freezes 100°C = 212°F = 373.60x10-19 coul.3x10-23 J/K h = Planck’s constant = 6.987 cal/mole K = ideal gas law constant K = Boltzmann’s constant = 1.1416 radians = 180 degrees = 0.000 BTU Mathematical π radians = 3.sec Avagadro’s number = 6.718 Time 1 Hz (hertz) = 1 s-1 1 year = 365 days = 52 weeks = 12 months 1 leap year = 366 days 1 day = 24 hours 1 fortnight = 14 days 1 hour = 60 min.7 R = Water Boils (1 atm. 1 min = 60 seconds 1 millenium = 1000 years 1 century = 100 years 1 decade = 10 years Physical Constants R = 1.3 K = 671.3x10-16 erg/K = 1.3 K = 491. ASCII values above this are not commonly used in robust applications.05564 lux = 43.004*PI oersted electric flux density = coulomb/m**2 capacitance = farad permeability = henry/m electric field strength = V/m luminous flux = lumen luminance = candela/m**2 1 flame = 4 foot candles = 43. binary.05564 meter-candles illumination = lux resistance = ohm 26.98*10**24 kg Electromagnetic magnetic flux = weber (We) = 10**8 maxwell inductance = henry magnetic flux density = tesla (T) = 10**4 gauss magnetic intensity = ampere/m = 0. hexadecimal. The values shown only go up to 127. and ASCII values.67*10**-11 Nm**2/kg**2 permittivity of free space = 8.00x1010 cm/sec speed of sound in dry air 25 C = 331 m/s gravitational constant = 6.4 ASCII. BINARY CONVERSION • The table below will allow conversions between decimal.26*10**-6 henry/m mean radius of earth = 6370 Km mass of earth = 5.85*10**-12 farad/m permeability of free space = 1.page 745 speed of light (c) = 3. . HEX. < = > ? ASCII binary binary . / 0 1 2 3 4 5 6 7 8 9 : .page 746 hexadecimal hexadecimal decimal decimal ASCII 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR S0 S1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 space ! “ # $ % & ‘ ( ) * + . . page 747 hexadecimal hexadecimal decimal decimal ASCII 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 01000000 01000001 01000010 01000011 01000100 01000101 01000110 01000111 01001000 01001001 01001010 01001011 01001100 01001101 01001110 01001111 01010000 01010001 01010010 01010011 01010100 01010101 01010110 01010111 01011000 01011001 01011010 01011011 01011100 01011101 01011110 01011111 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ yen ] ^ _ 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 01100000 01100001 01100010 01100011 01100100 01100101 01100110 01100111 01101000 01101001 01101010 01101011 01101100 01101101 01101110 01101111 01110000 01110001 01110010 01110011 01110100 01110101 01110110 01110111 01111000 01111001 01111010 01111011 01111100 01111101 01111110 01111111 ‘ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } r arr. l arr.5 G-CODES • A basic list of ‘G’ operation codes is given below. ASCII binary binary . 26. These direct motion of the tool. Preset position G70 .fixed cycle cancel G81-89 .cutter compensation to the left G42 .page 748 G00 .drilling cycle (Prolight Mill) G82 .pattern repeating (Emco Lathe) G75.Stop on input (INROB1 is high) (Prolight Mill) G33-35 .indicate finishing cycle (EMCO Lathe) G72 .1 . cut cycle in z-axis G77 .tool length compensation.multiple threading cycle G80 .enable 360 degree arcs (Prolight Mill) G76 .cutter compensation cancel G41 .z-x plane for circular interpolation G19 .tool length compensation.Pause (for operator intervention) G08 .Counterclockwise circular motion G04 .Rapid move (not cutting) G01 .return to reference point G29 .set inch based units or finishing cycle G71 .Clockwise circular motion G03 .3D circular interpolation clockwise (Prolight Mill) G73 .facing cycle contour (Emco Lathe) G74.Acceleration G09 .wait for input #1 to go high (Prolight Mill) G28 .wait for input #2 to go low (Prolight Mill) G36 .Deceleration G17 .wait for input #2 to go high (Prolight Mill) G40 . negative G50 .Dwell G05 .thread cutting cycle or metric data specification G24 .turning cycle or inch data specification G21 .x-y plane for circular interpolation G18 .straight drilling cycle with dwell (Prolight Mill) G83 .1 .3D circular interpolation counter clockwise (Prolight Mill) G74 . positive G44 .return from reference point G31 .fixed cycles specified by machine tool manufacturers G81 .cutter compensation to the right G43 .disable 360 deg arcs (Prolight Mill) G75 .drilling cycle (EMCO Lathe) .Linear move G02 .y-z plane for circular interpolation G20 .thread cutting functions (Emco Lathe) G35 .face turning cycle G25 .wait for input #1 to go low (Prolight Mill) G26 .turning cycle contour (EMCO Lathe) G73 .set metric units or stock removal G72 .cut-in cycle in x-axis G78 .deep hole drilling. coolant off M09 .Write current position to data file (Prolight Mill) M25 .turn on accessory #2 (120VAC outlet) (Prolight Mill) M11 .spindle on CCW M05 .Coordinate system setting G94 .turn on accessory #1 (120VAC outlet) (Prolight Mill) M09 .boring cycle with dwell (Prolight Mill) G90 .tailstock back (EMCO Lathe) M20 .Rotational speed rpm (EMCO Lathe) G98 .withdraw the tool to a safe plane or feed per revolution G101 .spindle off M06 .program stop M01 .page 749 G83 .tailstock forward (EMCO Lathe) M22 .Surface cutting speed (EMCO Lathe) G97 .close chuck (EMCO Lathe) M26 .boring with spindle off and dwell cycle (Prolight Mill) G89 .Feed rate in ipr (EMCO Lathe) G96 .Spline interpolation (Prolight Mill) • M-Codes control machine functions and these include.incremental dimensions G92 .subroutine end M20 . M00 .spindle on CW M04 .turn off accessory #2 (120VAC outlet) (Prolight Mill) or tool change M17 .boring cycle (Prolight mill) G86 .set output #1 off (Prolight Mill) M26 .Chain to next program (Prolight Mill) M21 .flood with coolant M08 .Feed rate in ipm (EMCO Lathe) G95 .end of tape (rewind) M35 .end of program M03 .turn off accessory #1 (120VAC outlet) (Prolight Mill) M10 .withdraw the tool to the starting point or feed per minute G99 .Spindle speed limit G93 .absolute dimension program G91 .reaming cycle (EMCO Lathe) G85 .open chuck (EMCO Lathe) M25 .mist with coolant M08 .tool change M07 .set output #2 off (Prolight Mill) .peck drilling cycle (Prolight Mill) G84 .set output #1 on (Prolight Mill) M30 .optional stop using stop button M02 .taping cycle (EMCO Lathe) G85 . relative motion in x Vnnn . or taper value Qnnn .compensate for rounded external curves M97 .compensate for sharp external curves M98 .set output #2 on (Prolight Mill) M38 .a feed value (in ipm or m/s. or second z-axis spline control point.relative motion in z Xnnn .puff blowing on (EMCO Lathe) M72 .an orientation. or thread pitch Innn .a z-axis value .move y-axis home (Prolight Mill) M103 .return from subprogram.relative motion in y Wnnn .an orientation. spindle speed Tnnn .an orientation. or second x-axis spline control point Bnnn . or a fixed number of times (Prolight Mill) M71 .put stepper motors on low power standby (Prolight Mill) M47 .x-axis center for circular interpolation.restart a program continuously. or end of block (EMCO Lathe) . or first y-axis spline control point Knnn . or chamfer Fnnn . or first x-axis spline control point Jnnn .subprogram block number Pnnn . loop counter and program cycle counter Nnnn .y-axis center for circular interpolation.a clearance plane for tool movement.puff blowing off (EMCO Lathe) M96 .cutting speed (rpm). jump instruction M101 .page 750 M36 .arc angle.starts a comment (proLight Mill).z-axis center for circular interpolation. not ipr).peck depth for pecking cycle Snnn .move z-axis home (Prolight Mill) • Other codes and keywords include.a sequence/line number Onnn .a y-axis value Znnn . or second y-axis spline control point Cnnn . Annn .a tool number Unnn .subprogram reference number Rnnn .subprogram call M99 . or first z-axis spline control point Lnnn .an x-axis value Ynnn . .move x-axis home (Prolight Mill) M102 . or arc radius. yield strain ten .7 73 70 72 36-41 26 26 0.57 55.85 26.33 0.yield stress ten .shear ten .01 47. stress Material Density poisson Type G E aluminum typical 1100-h14 2024-T6 5456-h116 2014-T6 6061-T6 7075-T6 2.96 7.33 410 270 480 480 310 550 13 17 11 10-6/deg C (Mg/m3) (MPa) (MPa) (GPa) (GPa) (%) .09 12. thermal expansion 23 ult.3 7.comp.33 35-500 100-550 1-45 2.ult.33 2.37 28. stress .85 65.page 751 27.9 Valances Hw 1/2 2/3 3 6/8 2 4 2/4 3/4 F = 96. ATOMIC MATERIAL DATA density g/cm3 8.6-2.51 Element copper iron aluminum tungsten zinc silicon carbon titanium Atomic # 29 26 13 74 30 14 6 22 Atomic weight 63.86 2.67 19.8 2.500 coulombs 28. stress .13 2.8 70-79 26-30 0. ult. MECHANICAL MATERIAL PROPERTIES Table 5: yield stress .8 2.comp.33 0.1 4.97 183. 170.6 96-110 36-41 0.8 48-83 19-35 0. stress .9 17-31 17-31 17-31 110-120 na na na 40-47 0. ult.34 0.34 70-550 200-620 4-60 Yellow Brass cold rolled annealed Red Brass cold rolled annealed Bronze Cast Iron typical typical 8.1-0.1-0.4 96-120 83-170 36-44 32-69 0.comp.8 14 13 ult.27 30-1000 0 Plate Fibers 70 700020000 1.ult.2-8.8 7.8 8.4-2.83 8.3 82-690 120 200-830 69-480 5-60 0-1 Concrete typical reinforced lightweight 2.761.0-7.4-8.comp.121.330.3 2.2-0.page 752 Table 5: yield stress .36 55-760 230-830 4-50 Copper typical annealed hard drawn Glass typical 2.8 210 80 0. stress Material Density poisson Type G E Brass typical 8.32 1701100 100-620 4501200 310-760 2-50 Nickel 8.2 0.35 80-280 140-340 2-20 Magnesium typ.6 5-11 26.2 0.9-12 7-14 16.1-1.2 0. thermal expansion 19.4 1.yield stress ten .31 2-50 10-6/deg C (Mg/m3) (MPa) (MPa) (GPa) (GPa) (%) .shear ten .yield strain ten . stress .8 41-45 15-17 0.1-0.30% Cu 170 66 0.617.2 18-21 3401400 10-70 9.128. alloys Monel 67%Ni. ult.2-0.3 0.00020.3 Rubber typical .30 cold rolled annealed high strength 3401000 340-700 4001600 280-700 5501200 550-860 7001900 4001000 900 340-830 5-25 machine spring 5-25 3-15 stainless 5-40 tool structural astm-a48 520 200-700 8 10-40 10-6/deg C (Mg/m3) (MPa) (MPa) (GPa) (GPa) (%) .1 .6-2.9 20-70 na 0.comp.00070.85 190-210 75-80 0.shear ten .4 2.3 50280 50280 50280 20200 20200 1-7 7-20 100-800 130-200 10-18 14 12 ult.001 0.96-1.004 0.soil.4 0.2-0.3 Limestone 2.6-2.2-2.comp.0-2.88-1. stress .4 0.yield stress ten .gra vel Steel 1. thermal expansion 70-140 140-290 5-9 Granite 2.50 Sand.page 753 Table 5: yield stress . stress Material Density poisson Type G E Plastics Nylon Polyethylene Rock .96-1.6-2.270.9 20-70 na 0.0-2.9 40-100 na 0.4 40-80 7-28 20-100 15-300 Marble 2.7-1.2-0. stress .2-0.450.9 40-100 na 0.1-3.yield strain ten . ult.3 Sandstone 2.2 7.9 40-100 na 0.2-0.3 Quartz 2.4 na na 0. alloys 4. ult.1-11 4.shear ten .comp.9 340-380 140-160 0.2 0-4 Water fresh sea 1.page 754 Table 5: yield stress .0 1.48-.64 11-13 11-12 11-14 30-50 40-60 40-60 50-80 50-100 50-100 30-50 30-40 30-50 40-70 30-50 40-70 28.64-. stress . stress Material Density poisson Type G E astm-a47 astm-a36 astm-a5242 astm-a441 astm-a572 astm-a514 wire 340 700 2801000 500 830 5501400 20 15 5-40 250 400 30 Stainless Steel Titanium aisi 302 typ.3 ult.comp. thermal expansion 12 12 12 17 8.33 7601000 9001200 14004000 10 Tungsten 1.ult. stress .5 100-120 39-44 0.72 .1 FORMULA SHEET • A collection of the essential mechanics of materials formulas are given below 10-6/deg C (Mg/m3) (MPa) (MPa) (GPa) (GPa) (%) .yield stress ten .yield strain ten .56 .02 Wood (dry) Douglas fir Oak Southern pine .56-. ( r o – r i ) 2 P = 2πfT (hollow tube) .page 755 Axial/Normal Stress/Strain P σ = εE = -A PL δ = εL = -----AE Shear Stress/Strain τ = γG τ xy γ xy = -----G Poisson’s ratio ε lateral ν = – --------------------------ε longitudinal σy σz σx ε x = ----.– ν ---E E E E = 2G ( 1 + ν ) Torsion Tc τ max = ----J TL φ = -----JG σ ten = – σ comp = τ γ ε = -2 τ max γmax = ---------G πr J = ------2 4 (cylinder) π 4 4 J = -.– ν ----. (for circle) 2 c ε max = -ρ EI ρ = ----M 4 3 Buckling π EI P < ----------2 2 k L 2 k=0.7 (one end fixed.6 0.1 0.8 0.0 P d/2 r P d/2 2.2 0.0 r/d .5 2.5 (both ends fixed) k=0.0 1.3 0.5 0.page 756 Beams My σ = – ------I VQ τ = ------Ib L = ρθ My σ = – ------I bh I = -------.5 0.9 1. one pinned) k=1.0 (one end pinned.4 0.0 (both ends pinned) k=2.(for rectangle) 12 πr I = ------.7 0. one free) K 3. 6 0.1 r/d 0.5 P 2.7 0.5 D/d = 1.3 0.1 0.page 757 K 2.9 1.25 D/d = 1.0 .8 0.5 0.0 D r d P 1.4 0.2 0.5 D/d = 2.0 1.0 D/d = 1. 33 D/d = 1.0 1.07 0.2 D/d = 1.1 r/d 0.1 1.02 0.5 r d T 2.09 0.page 758 K T D 2.04 0.01 0.06 0.03 0.08 0.0 .05 0.5 D/d = 2.0 D/d = 1.