TOLERANCE ANALYSIS ELECTRONIC OF CIRCUITS "USI:NG IVIATLAB® Robert R. Boyd 0 CRC Press Taylor & Francis Group Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Group, an informa business Library or Coqrest Cataloging·ln-PubUcadon Data Boyd, Robert {Robert R.) Tolerance analysis of electronic circuits using MATI.AB I by Robert Boyd. p. em. ISBN 0-8493-2276-6 I. Electronic circuits--Data processing. 2. Tolerance (Engineering)--Data processing. 3. Electric circuit analysis-Data processing. 4. MATI.AB. I. Title. TK7867.B65 1999 621.3815-dc21 99-26898 CIP This book contains infonnation obtained from authentic and higb]y regarded sources. Reprinted material is quoted with pennission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any infonnation storage or retrieval sys- tem, without prior permission in writing from the publisher. The consent of CRC Press U.C does not extend to copying for general distribution, for promotion, for creatinJ new worb, or for resale. Specific per- mission must be obtained in writing from CRC Press U.C for such copying. Direct all inquiries to CRC Press U.C, 2000 Corporate Blvd., N.W., Boca Raton, Florida 33431. Trademark Notice: Product or corporate names may be trademarks or registered trademarlts, and are only used for identification and explanation, without intent to infringe. C 1999 by CRC Press UC No claim to original U.S. Government works International Standard Book Number 0-8493-2276-6 Library of Congress Card Number 99-26898 Preface This book is written for the practicing electronics professional. Knowledge of the capabilities and limitations of tolerance analysis is a valuable asset to both the engineer and senior technician. Tolerance analysis is necessary in several phases of the design task, primarily to show that a circuit card, and a system of circuit cards, will meet requirements over production life. Methods are shown which can be used in the design process to perform worst- case analysis, determine manufacturing yields, calculate limits for production testing, determine if a design meets specification limits, and for component stress analysis. Topics include rxtreme value analysis and root-sum-square anal- ysis using symmetric and asymmetric tolerances, Monte Carlo anal- ysis using normal and uniform component distributions, Spice com- parisons, sensitivity formulas, and ratiometric tolerances. Also included are tolerance analyses of opamp offsets and anomalies of high-Q and high-gain circuits. Much ofthis material is not found in textbooks. 1be information will benefit those involved in the following areas of engineering: analog design/analysis, RF design/analysis, test, system, reliability, and quality assurance. The book will also be of value to specification writers, programmers, and senior technicians. It is the author's hope that this work will fulfill the maxim of Richard. W. Hamming: "The purpose of computing is insight, not numbers." iii About the Author Robert R. Boyd was a technical instructor in the United States Air Force for 19 years. Upon his retirement from the Air Force in 1971, he enrolled at the University of New Mexico and obtained a BSEE degree with honors in 1974. Mr. Boyd was employed in the aerospace industry in anlog circuit design until 1996. He is presently a consultant in analog circuit design and analysis and teaches a course in the tolerance analysis of electronic circuits at the University of California Extension (Irvine, CA). v Contents PART I Root-Sum-Square and Extreme Valuue Analysis Derivatives and Sensitivities .....•......•.••...................••.••....•.••••...•••••..• I Approximate Derivatives and Sensitivities ...................................... 2 Tolerance Analysis of a DC Differential Amplifier •••••••••.••••••••.•••..• 3 MATLAB M-file diffamp.m ........................................................... ll Nominal Output = Zero .................................................................. 14 Combined Gain and Offset Analysis ..••..••••..••••..•••.••••.••••..••••••••••••• 17 More Complicated Circuits ............................................................ 19 Tolerance Analysis of AC Circuits ................................................. 26 Tolerance Analysis of Bandpass Filter ........................................... 29 Bandpass Filter with Asymmetric Tolerances •.•.............••.•••.....•.•.. 39 Lowpass Filter ................................................................................ 41 Spice Results Compared •••••••••••••••••••••••.••.•••••••••••••••••••••••••••••••••••••• 4S Tolerance Analysis of Stability ••••.•.••.•..••..••••••••.•••.•••••.•••.••.•.••..•.•.• 46 PART2 Monte Carlo Analysis General Comments Concening RSS .............................................. 65 66 Uniform vs. Gaussian Distribution. .•..••............•.•.....•.•••.••.•.•..•.....•• ····-············································6··6· ········-···· Ratiometric Tolerances MCA of Opamp de Offsets ............................................................ 70 MCA of RTD Circuit ....•...•••••...••••••••.•.•.•.•.••...•.••.•..•••••••.•••••••...••••. 75 MCA of Bandpass Filter (BPF) Circuit •••.•.••••••.•.••••••••.••••••••••.•••••• 78 Fast Monte Carlo Analysis ......•...•.•.•..•..•.•...••..••••••••..•.•.•.•...••••.••.... 85 Sallen and Key BPF ....................................................................... 92 vii viii Tolerance Analysis of Electronic Circuits More MCAIFMCA Examples ........................................................ 99 Delyiannis BPF• .....•.••.•..•.•.•••..•.....•...•.••••....•..•.•••.•..•..•.•..•••.....•. 100 Twin-T Passive Notch Filter. .•...•..•..........••.........•••.••..•..•.••.•••... l02 LTC 1562 BPF. ............................................................................. 103 MFB All-Pass Filter. ..................................................................... I 05 NS MF10 Switched Capacitor Filters .......................................... 106 Buffered 60-Hz Notch Filter ........................................................ 109 APPENDIX Derivation of the RSS Equation ................................................... 113 BPF Sensitivity Expressions ......................................................... 115 Confidence Intervals ..................................................................... 119 Percent Yield ................................................................................. l20 Mathematical Curios ..................................................................... l22 An "Accurate" Cancer Test ...................................................... 122 Easter Dates .............................................................................. 123 Number of Weekdays Between Two Datcs .............................. l24 M-file Listings .............................................................................. 125 REFERENCES ............................................................................ 147 Introduction There are three well-known tolerance analysis methods. The first two are covered in Part 1: 1. Root-Sum-Square analysis (RSS) 2. Extreme Value Analysis (EVA) (sometimes called worst-case analysis) The third is covered in Part 2: 3. Monte Carlo Analysis (MCA) The author has added a fourth method that is an application of an old idea: 4. Fast Monte Carlo Analysis (FMCA). As will be shown, this method exposes several weaknesses in methods I and 2 above. The treatment of asymmetric tolerances is neglected in what few existing publications there are on the subject. (See References.) Asymmetric tolerances can occur when performing design verifica- tion analyses where the specification temperature extremes, and hence the temperature variation of the components are most always asymmetric. For example: -55°C to +85°C. The worst-case methods used in circuit analysis packages derived from Spice cannot acco- modate asymmetric tolerances. In addition, for ac circuits the sensi- tivity portion and the resulting output of the present-day Spice .WCASE analyses is incorrect as will be shown. In ac analyses, especially in high-Q, high-gain filter circuits, there are some pitfalls that the analyst must be aware of. These anomalies will be illustrated by several examples. ix