Modern Control Design With MATLAB and SIMULINK This page intentionally left blank Modern Control Design With MATLAB and SIMULINK Ashish Tewari Indian Institute of Technology, Kanpur, India JOHN WILEY & SONS, LTD Copyright © 2002 by John Wiley & Sons Ltd Baffins Lane, Chichester, West Sussex, PO19 1UD, England National 01243 779777 International (+44) 1243 779777 e-mail (for orders and customer service enquiries): cs-books@wiley.co.uk Visit our Home Page on http://www.wiley.co.uk or http://www.wiley.com All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under the terms of the Copyright Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency, 90 Tottenham Court Road, London, W1P 9HE, UK, without the permission in writing of the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the publication Neither the authors nor John Wiley & Sons Ltd accept any responsibility or liability for loss or damage occasioned to any person or property through using the material, instructions, methods or ideas contained herein, or acting or refraining from acting as a result of such use The authors and Publisher expressly disclaim all implied warranties, including merchantability of fitness for any particular purpose Designations used by companies to distinguish their products are often claimed as trademarks In all instances where John Wiley & Sons is aware of a claim, the product names appear in initial capital or capital letters Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration Other Wiley Editorial Offices John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012, USA Wiley-VCH Verlag GmbH, Pappelallee 3, D-69469 Weinheim, Germany John Wiley, Australia, Ltd, 33 Park Road, Milton, Queensland 4064, Australia John Wiley & Sons (Canada) Ltd, 22 Worcester Road, Rexdale, Ontario, M9W 1L1, Canada John Wiley & Sons (Asia) Pte Ltd, Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809 British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library ISBN 471 496790 Typeset in 10/12j pt Times by Laserwords Private Limited, Chennai, India Printed and bound in Great Britain by Biddies Ltd, Guildford and Kings Lynn This book is printed on acid-free paper responsibly manufactured from sustainable forestry, in which at least two trees are planted for each one used for paper production To the memory of my father, Dr Kamaleshwar Sahai Tewari To my wife, Prachi, and daughter, Manya This page intentionally left blank Contents Preface xiii Introduction 1.1 What is Control? 1.2 Open-Loop and Closed-Loop Control Systems 1.3 Other Classifications of Control Systems 1.4 On the Road to Control System Analysis and Design 1.5 MATLAB, SIMULINK, and the Control System Toolbox References 10 11 12 Linear Systems and Classical Control 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 How Valid is the Assumption of Linearity? Singularity Functions Frequency Response Laplace Transform and the Transfer Function Response to Singularity Functions Response to Arbitrary Inputs Performance Stability Root-Locus Method Nyquist Stability Criterion Robustness Closed-Loop Compensation Techniques for Single-Input, Single-Output Systems 2.12.1 Proportional-integral-derivative compensation 2.12.2 Lag, lead, and lead-lag compensation 2.13 Multivariable Systems Exercises References State-Space Representation 3.1 The State-Space: Why Do I Need It? 3.2 Linear Transformation of State-Space Representations 13 13 22 26 36 51 58 62 71 73 77 81 87 88 96 105 115 124 125 125 140 viii CONTENTS 3.3 System Characteristics from State-Space Representation 3.4 Special State-Space Representations: The Canonical Forms 3.5 Block Building in Linear, Time-Invariant State-Space Exercises References Solving the State-Equations 4.1 Solution of the Linear Time Invariant State Equations 4.2 Calculation of the State-Transition Matrix 4.3 Understanding the Stability Criteria through the State-Transition Matrix 4.4 Numerical Solution of Linear Time-Invariant State-Equations 4.5 Numerical Solution of Linear Time-Varying State-Equations 4.6 Numerical Solution of Nonlinear State-Equations 4.7 Simulating Control System Response with SIMUUNK Exercises References Control System Design in State-Space 5.1 Design: Classical vs Modern 5.2 Controllability 5.3 Pole-Placement Design Using Full-State Feedback 5.3.1 Pole-placement regulator design (or single-input plants 5.3.2 Pole-placement regulator design for multi-input plants 5.3.3 Pole-placement regulator design for plants with noise 5.3.4 Pole-placement design of tracking systems 5.4 Observers, Observability, and Compensators 5.4.1 Pole-placement design of full-order observers and compensators 5.4.2 Pole-placement design of reduced-order observers and compensators 5.4.3 Noise and robustness issues Exercises References Linear Optimal Control 6.1 The Optimal Control Problem 6.1.1 The general optimal control formulation for regulators 6.1.2 Optimal regulator gain matrix and the riccati equation 6.2 Infinite-Time Linear Optimal Regulator Design 6.3 Optimal Control of Tracking Systems 6.4 Output Weighted Linear Optimal Control 6.5 Terminal Time Weighting: Solving the Matrix Riccati Equation Exercises References 146 152 160 168 170 171 171 176 183 184 198 204 213 216 218 219 219 222 228 230 245 247 251 256 258 269 276 277 282 283 283 284 286 288 298 308 312 318 321 CONTENTS Kalman Filters 7.1 Stochastic Systems 7.2 Filtering of Random Signals 7.3 White Noise, and White Noise Filters 7.4 The Kalman Filter 7.5 Optimal (Linear, Quadratic, Gaussian) Compensators 7.6 Robust Multivariable LOG Control: Loop Transfer Recovery Exercises References Digital Control Systems 8.1 8.2 8.3 8.4 8.5 8.6 8.7 What are Digital Systems? A/D Conversion and the z-Transform Pulse Transfer Functions of Single-Input, Single-Output Systems Frequency Response of Single-Input, Single-Output Digital Systems Stability of Single-Input, Single-Output Digital Systems Performance of Single-Input, Single-Output Digital Systems Closed-Loop Compensation Techniques for Single-Input, Single-Output Digital Systems 8.8 State-Space Modeling of Multivariable Digital Systems 8.9 Solution of Linear Digital State-Equations 8.10 Design of Multivariable, Digital Control Systems Using Pole-Placement: Regulators, Observers, and Compensators 8.11 Linear Optimal Control of Digital Systems 8.12 Stochastic Digital Systems, Digital Kalman Filters, and Optimal Digital Compensators Exercises References Advanced Topics in Modern Control 9.1 Introduction 9.2 #00 Robust, Optimal Control 9.3 Structured Singular Value Synthesis for Robust Control 9.4 Time-Optimal Control with Pre-shaped Inputs 9.5 Output-Rate Weighted Linear Optimal Control 9.6 Nonlinear Optimal Control Exercises References Appendix A: Introduction to MATLAB, SIMULINK and the Control System Toolbox ix 323 323 329 334 339 351 356 370 371 373 373 375 379 384 386 390 393 396 402 406 415 424 432 436 437 437 437 442 446 453 455 463 465 467 Chapter 2.4 The system is stable with = 377.27 rad/s and £ = 1.26 x 10 Maximum overshoot = 0.0069 m, steady state deviation = 0.007 m, settling time = 6100 seconds 2.5 The system is stable with &>n = 5634.7 rad/s and £ = 1.409 x 10~6 Maximum overshoot = 3.13 x 10~5 m, steady state deviation = 3.15 x 10~5 m, settling time = 460 seconds 2.6 (a) G(ito) = l/(-ma)2 + icco + k) (b) = (k/m)l'2;$=c/[2(km)['2] (c) si.2 = ±i(k/m)l/2 2.8 (a) Maximum overshoot = 0; settling time = 0.8 second; steady state output = 0.2 (b) Maximum overshoot = —80%; settling time = 5.33 seconds; steady state output = 0.5 (c) Maximum overshoot = 464%; settling time = 18.5 seconds; steady state output = 1.0 2.9 Maximum overshoot = 213.3 units; steady state output = 2.10 IS^I =250m 2.14 (a) Ki=l,KD = 2.114, KP = 2.394; (b) maximum overshoot = 21.6%; settling time = 6.33 seconds; steady state error = 0; (c) < KI < 5.8; (d) Gain margin = oo, phase margin = 129.15°, gain-crossover frequency = 1.9 rad/s 2.18 (a) G(s) = K(s+a)/[s2(s + 1)], H(s) = K\ + K2s + K3as(s + ])/ (b) Type = (c) Plant is unstable (d) H(s) = [K3as2 + s(Ki + K2 + K3a) + K l a ] / ( s + a) ANSWERS TO SELECTED EXERCISES 490 (e) For K, = 500, a>n = 1.83 rad/s, f = 0.753 (f) Maximum overshoot = 0; settling time = 1.5 x 10~3 second; steady state error = (g) Gain margin = oo; phase margin = 178.04°; gain crossover frequency = 102.47 rad/s 2.22 (a) Gain margin = oo; phase margin = 3.63°; gain crossover frequency = 31.67 rad/s (b) Phase is maximum at (o = 400 rad/s; change in gain = 40 dB (c) Plant: max overshoot = 21%, settling time = 3.8 sec., steady state error = —199 Closed-loop system: max overshoot = 32.5%, settling time = 0.25 sec., steady state error = 0.005 (d) Gain margin = oo, phase margin = 99.27°, gain crossover frequency = 43.88 rad/s 2.25 (a) Gain margin = 28.09 dB, phase margin = 12.64° (b) a>0 = 0.0775 rad/s, a = 0.1 (c) Plant: maximum overshoot = 91%, settling time = 2000 seconds Closed-loop system: maximum overshoot = 42%, settling time = 70 seconds 2.28 K = 0.7, maximum overshoot = 1.8 m, settling time = 12.25 seconds |z(r)lmax = 29.9 m/s2 Plant: gain margin = oo, phase margin = 20.98°, gain crossover freq = 377.3 rad/s Closed-loop: gain margin = oo, phase margin = oo Chapter 3.1 (a) A = 0 2/17 0 -10/17 " —4 -3 -5" 0 3.2 (a) A = 0 0 3.4 0 1/17 B= C = [0 5]; D = "1 = C = [0 -3 1]; D= 0 = jc2(r); 3.8 (a) A = C= -0.5 -1.0724 0 1.0724 -0.5 0 0.0122 0.2922 -0.0074 -0.0073 -0.7779 -0.6646 0 -0.0025 -0.0774 0.0132 -0.0001 -0.0353 0 0.0774 -0.0025 -0.0116 -0.0001 -0.0276 "- 1.6771" -0.6065 B= 6.8075 6.3307 ; -i ; D= "0" 0 ANSWERS TO SELECTED EXERCISES 491 Chapter ' 4.1 (a) e A/ (3e-2; - 2.5607e~a5858f - 0.4393e~3-4142') 5858 = (1.2071e-°- 4142 ' - 0.2071e- ' ') 0.707(-e-°-5858' + e-3-4142') 0.75(2e-2f - e-°-5858r - e - - 4l42/ ) " 0.3535(e-°-5858' - e-3-4142') (-0.207 le"0-5858' + 1.2071e-3-4142/)_ (b) A., = - A = -0.5858, A = -3.4142 Stable (c) X(r) = 1.45e-2r - 0.1189e-°-5858/ - 0.33lie" 34142 ' 0.056e-°5858f-0.156e-34142' -0.0329e-°-5858f + 0.5329e-3-4142' Chapter 5.1 (a) Controllable, (b) Uncontrollable 5.4 (a) Yes (b) No No 5.6 (a) Yes (b) No (c) No 0.3814 -0.1654 0.3212 0.0615 -0.6328 -0.4675] 2.1142 0.3183 -0.3035 -0.0720 1.0523 0.5360 J Maximum overshoots: y i ( t ) (13.6789 m/s2); y2(t) (-0.1312 rad/s) Settling time: seconds 5.8 K = [-0.0033 [ 0.5702 0.0008 -0.6445 0.0003 -0.0011] 9.0813 0.2692 J 5.12 (a) Unobservable (b) Observable, (c) Unobservable 5.15 (a) Observable, (b) Unobservable (c) Unobservable 5.16 (a) Unobservable (b) Observable, (c) Observable, (d) Unobservable (e) L = [-15.28; 5.18 LT = 0.0000 0.0000 -30.393; -1.0685 -2.8493 6.9472; 4.2603 -1.9726 5.4} T -1.9726] -0.2603 J r.n-4 6.2 Q = K = [0.0072 0.0000 10,-4 0 0.01 0 0.01 0.0796 -0.0073 -0.0254 0.0967 -0.0967] -0.0254 J 6.3 Settling time = 0.1 second Maximum overshoot = —0.0117 rad/s Largest magnitude of SA(t) = 0.3 rad Largest magnitude of K ( t ) = 0.03 rad 492 °-4- ANSWERS TO SELECTED EXERCISES [-0.0077 -0.0280 -0.0916 0.0269 -0.0344 0.0261] - [ -0.0037 -0.0597 0.1593 0.6495 -1.0641 1.0249 J Settling time: 0.33 second Maximum overshoots: —9 x 10~4 units (vi(0); —0.09 units K Largest magnitude of u\(t) = 7.73 x 10~4 units Largest magnitude of «2(0 = 5.27 x 10~4 units Q - - = [ o io] ; [0 3665 [3.5047 R =I -4.9893 -4.1433 5.7678 -5.2177 -3.0179 19.3521 -12.8400 11.7067 14.2192 39.5569 J _ [0.5983 0.0656 -0.3026 0.9993] 0.8 Ko, _ 07147 _0.3068 0.0363 J ; , n „ _ [-3.1623 -15.1463 -2.8724 7.7314 0.11 KOI — |^ 0 0 Kd=0 ^~ 0 0 ] -3.1623 -15.0165 -3.1197 7.5203 J ' 6.12 Q = 10~5 I, R = I, V = 10001 Maximum magnitude of ui(t): 0.92 units Maximum magnitude of U2(t): 0.24 units 6.14 Maximum overshoot of 6> (1) (f) : -0.03 rad/s Final value of (1) (f) = -0.003 rad/s Chapter 7.1 xm = 0.5164, Rx(0) = 0.0843, xms = 0.3502 7.2 o)0 = rad/s 7.8 5i = -16.0070, 52 = -9.8148, 53 = -2.5413, 54 = -0.9606, 55.6 = -0.9336±6.3617i 7.12 F = B, Z = CCT, * = 0, V = 106BTB 10714 -6993.3 -15013 20143] T _ [4234.9 -13360 ~|_ 5370.1 -16994 13631 -8889.8 -19117 25652 J Largest magnitude of u\(t) = 0.053 units Largest magnitude of «2(0 = 1-877 units Chapter 8.1 (a) F(z) = ze"r/(zear - 1) 8.2 (a) f ( k T ) = -0.5025/(0.995/)* +0.5025/(-0.995/)* 8.3 (a) C(z) = z(z - 0.6375)/[(z - l)(z - 0.8187)] 8.4 (a) G(z) = [z(e-T + 27 - 1) + - e~r - 2Te~T]/[z2 + 2z(T -!) + !+ 2re-r] 8.6 (a) Unstable for all T > 8.9 (a) >-(oo) = oo 8.12 The closed-loop system is stable for -0.06 < K < With K = -0.002, the closed-loop step response settles in about second, with a maximum overshoot of about per cent ANSWERS TO SELECTED EXERCISES 8.19 Ad = cd = 8.25 0" "0 0" 1 j Bd = 1 -1 _1 0_ -1 " 0 0] ~1 d 0 ]' L °J "[ 8.30 K 493 "0 _1 -F° -0.0904 0.0226 0.0491 0.4488 _ r 0.9833 0.1610 -0.2418 0.1948] -2.5087 0.021 I j 0.0899 0.0248 0.0469 0.0109 0.0067 -0.0120 -0.0800 0.1442 -0.0403 ] 0.0762 Chapter 9.2 (a) M(G) = 10.24, (b) /z(G) = 4.65, (c) /z(G) = 102.8, (d) ^t(G) = 10.8 9.3 Maximum value of /x(P22(/