7/26/2019 Linear Control System by B. S. Manke
1/252
Scilab Textbook Companion for
Linear Control Systems
by B. S. Manke 1
Created byAshish Kumar
B.Tech (Pursuing)Electronics Engineering
M. N. N. I. T., AllahabadCollege Teacher
Dr. Rajesh Gupta, MNNIT, AllahabadCross-Checked by
K Sryanarayan and Sonanya Tatikola. IIT Bombay
August 9, 2013
1Funded by a grant from the National Mission on Education through ICT,http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilabcodes written in it can be downloaded from the Textbook Companion Projectsection at the website http://scilab.in
7/26/2019 Linear Control System by B. S. Manke
2/252
Book Description
Title: Linear Control Systems
Author: B. S. Manke
Publisher: Khanna Publishers
Edition: 9
Year: 2009
ISBN: 81-7409-107-6
1
7/26/2019 Linear Control System by B. S. Manke
3/252
Scilab numbering policy used in this document and the relation to theabove book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particularExample of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 meansa scilab code whose theory is explained in Section 2.3 of the book.
2
7/26/2019 Linear Control System by B. S. Manke
4/252
Contents
List of Scilab Codes 4
1 INTRODUCTION 13
2 TRANSFER FUNCTIONS 21
3 BLOCK DIAGRAMS 24
4 SIGNAL FLOW GRAPHS 38
5 MODELLING A CONTROL SYSTEM 47
6 TIME RESPONSE ANALYSIS OF CONTROL SYSTEMS 56
7 STABILITY ANALYSIS OF CONTROL SYSTEMS 79
8 COMPENSATION OF CONTROL SYSTEMS 137
9 INTRODUCTION TO STATE SPACE ANALYSIS OF CON-
TROL SYSTEMS 148
11 SOLUTION OF PROBLEMS USING COMPUTER 163
12 CLASSIFIED SOLVED EXAMPLES 202
3
7/26/2019 Linear Control System by B. S. Manke
5/252
List of Scilab Codes
Exa 1.6.1.i inverse laplace transform . . . . . . . . . . . . . . . . 13Exa 1.6.1.iiinverse laplace transform . . . . . . . . . . . . . . . . 13Exa 1.6.1.iiiinverse laplace transform . . . . . . . . . . . . . . . . 14Exa 1.6.1.ivinverse laplace transform . . . . . . . . . . . . . . . . 14Exa 1.6.1.vinverse laplace transform . . . . . . . . . . . . . . . . 15Exa 1.6.1.viprogram laplace transform. . . . . . . . . . . . . . . . 15Exa 1.6.2 solution of differential equation . . . . . . . . . . . . . 16Exa 1.6.3 solution of differential equation . . . . . . . . . . . . . 16Exa 1.6.4 solution of differential equation . . . . . . . . . . . . . 17Exa 1.6.5 initial value . . . . . . . . . . . . . . . . . . . . . . . . 17Exa 1.6.7 final value. . . . . . . . . . . . . . . . . . . . . . . . . 18Exa 1.6.8 steady state value . . . . . . . . . . . . . . . . . . . . 18Exa 1.6.9 initial values . . . . . . . . . . . . . . . . . . . . . . . 19
Exa 1.6.10 final value. . . . . . . . . . . . . . . . . . . . . . . . . 20Exa 2.4.1 pole zero plot . . . . . . . . . . . . . . . . . . . . . . . 21Exa 2.4.2 final value. . . . . . . . . . . . . . . . . . . . . . . . . 23Exa 3.2.1 Transfer Function . . . . . . . . . . . . . . . . . . . . 24Exa 3.2.2 Transfer Function . . . . . . . . . . . . . . . . . . . . 25Exa 3.2.3 Transfer Function . . . . . . . . . . . . . . . . . . . . 26Exa 3.2.4 Transfer Function . . . . . . . . . . . . . . . . . . . . 26Exa 3.2.5 Transfer Function . . . . . . . . . . . . . . . . . . . . 27Exa 3.2.6 Transfer Function . . . . . . . . . . . . . . . . . . . . 28Exa 3.2.7 Transfer Function . . . . . . . . . . . . . . . . . . . . 29Exa 3.2.8 Transfer Function . . . . . . . . . . . . . . . . . . . . 30
Exa 3.2.9 Transfer Function . . . . . . . . . . . . . . . . . . . . 31Exa 3.2.10 Transfer Function . . . . . . . . . . . . . . . . . . . . 32Exa 3.2.11 Transfer Function . . . . . . . . . . . . . . . . . . . . 33Exa 3.2.12 Transfer Function . . . . . . . . . . . . . . . . . . . . 33
4
7/26/2019 Linear Control System by B. S. Manke
6/252
Exa 3.2.13 Transfer Function . . . . . . . . . . . . . . . . . . . . 35
Exa 3.2.14 Transfer Function . . . . . . . . . . . . . . . . . . . . 36Exa 3.2.15 Transfer Function . . . . . . . . . . . . . . . . . . . . 36Exa 4.3.1 Overall Transmittance . . . . . . . . . . . . . . . . . . 38Exa 4.3.2 Overall Transmittance . . . . . . . . . . . . . . . . . . 39Exa 4.4.1 Closed Loop Transfer Function . . . . . . . . . . . . . 39Exa 4.4.2 Overall Gain . . . . . . . . . . . . . . . . . . . . . . . 40Exa 4.4.3 to find various signal flow graph parameter . . . . . . 40Exa 4.4.4 Transfer function using mason gain formula . . . . . . 41Exa 4.4.5 Transfer function using mason gain formula . . . . . . 42Exa 4.4.6 Transfer function using mason gain formula . . . . . . 43Exa 4.4.7 Transfer function using mason gain formula . . . . . . 44
Exa 4.4.8 Transfer function using mason gain formula . . . . . . 44Exa 4.4.9 Overall Transfer Function . . . . . . . . . . . . . . . . 45Exa 4.4.10 Transfer function using mason gain formula . . . . . . 46Exa 5.9.4 Calculate Reference Voltage Vr . . . . . . . . . . . . . 47Exa 5.9.5 Calculate Reference Voltage Vr . . . . . . . . . . . . . 48Exa 5.9.6 Calculate Gain of Amplifier Ka . . . . . . . . . . . . . 48Exa 5.9.7 Transfer Function of Generator . . . . . . . . . . . . . 49Exa 5.9.8 Overall Transfer Function of given System . . . . . . . 50Exa 5.9.9 Overall Transfer Function of given System . . . . . . . 50Exa 5.9.10 Overall Transfer Function of given System . . . . . . . 51
Exa 5.9.11 Overall Transfer Function of given System . . . . . . . 52Exa 5.9.12 Overall Transfer Function of given System . . . . . . . 53Exa 5.9.13 Overall Transfer Function of Two Phase ac Motor . . 53Exa 5.9.14 Transfer Function Of Motor . . . . . . . . . . . . . . . 54Exa 6.10.1 time response for step function . . . . . . . . . . . . . 56Exa 6.10.2 Time Response for unit Impulse and Step function . . 57Exa 6.10.3 Time Response for Unit Step Function . . . . . . . . . 58Exa 6.10.4 Time Response for Unit Step Function . . . . . . . . . 58Exa 6.10.5 Calculate Wn zeta Wd tp Mp. . . . . . . . . . . . . . 59Exa 6.10.6 Time Response . . . . . . . . . . . . . . . . . . . . . . 60Exa 6.10.7 determine factor by which K should be reduced . . . . 61
Exa 6.10.8 Determine Steady State Speed and Error . . . . . . . 62Exa 6.10.9 determine J f K . . . . . . . . . . . . . . . . . . . . . 63Exa 6.10.10Determine Transfer Function Wn zeta . . . . . . . . . 64Exa 6.10.11Determine Characterstics eq and Steady State Error . 66Exa 6.10.12determine WnWd zeta and steady state error . . . . . 67
5
7/26/2019 Linear Control System by B. S. Manke
7/252
Exa 6.10.13determine K ts tp and Mp. . . . . . . . . . . . . . . . 68
Exa 6.10.14determine Mp Ess and steady state value . . . . . . . 69Exa 6.10.16determine Wn zeta and M. . . . . . . . . . . . . . . . 70Exa 6.10.17determine Kp Kv and Ka . . . . . . . . . . . . . . . . 71Exa 6.10.18determine Kp Kv and Ka . . . . . . . . . . . . . . . . 72Exa 6.10.19determine steady state error. . . . . . . . . . . . . . . 73Exa 6.10.20determine steady state error and error coefficient . . . 74Exa 6.10.21determine steady state error and error coefficient . . . 75Exa 6.10.22determine voltage Er and change in terminalvoltage . 76Exa 6.10.23determine sensitivity wrt K and H . . . . . . . . . . . 77Exa 1.0 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 79Exa 2.0 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 79
Exa 3.0 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 82Exa 7.5.1 stability using Routh hurwitz criterion . . . . . . . . . 83Exa 7.5.2 stability using Routh hurwitz criterion . . . . . . . . . 83Exa 7.5.3 stability using Routh hurwitz criterion . . . . . . . . . 84Exa 7.5.4 stability using Routh hurwitz criterion . . . . . . . . . 85Exa 7.5.5 stability using Routh hurwitz criterion . . . . . . . . . 86Exa 7.5.6 stability using Routh hurwitz criterion . . . . . . . . . 87Exa 7.5.7.a stability using Routh hurwitz criterion . . . . . . . . . 88Exa 7.5.7.bvalue of K of characterstics equation . . . . . . . . . . 89Exa 7.5.8 value of K in terms of T1 and T2. . . . . . . . . . . . 90
Exa 7.17.1 stability using Nyquist criterion. . . . . . . . . . . . . 92Exa 7.17.2.istability using Nyquist criterion. . . . . . . . . . . . . 92Exa 7.17.2.iistability using Nyquist criterion. . . . . . . . . . . . . 95Exa 7.17.3 stability using Nyquist criterion. . . . . . . . . . . . . 98Exa 7.17.5 Phase Margin. . . . . . . . . . . . . . . . . . . . . . . 104Exa 7.17.7 stability using Nyquist criterion. . . . . . . . . . . . . 104Exa 7.17.9 gain margin and phase margin . . . . . . . . . . . . . 106Exa 7.17.18gain phase plot . . . . . . . . . . . . . . . . . . . . . . 108Exa 7.19.1 stability using bode plot . . . . . . . . . . . . . . . . . 108Exa 7.19.2 gain margin and phase margin . . . . . . . . . . . . . 110Exa 7.19.3 stability using bode plot . . . . . . . . . . . . . . . . . 111
Exa 7.24.1 root locus description . . . . . . . . . . . . . . . . . . 113Exa 7.24.2 root locus description . . . . . . . . . . . . . . . . . . 114Exa 7.24.3 root locus description . . . . . . . . . . . . . . . . . . 117Exa 7.24.4 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 120Exa 7.24.6 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 122
6
7/26/2019 Linear Control System by B. S. Manke
8/252
Exa 7.24.7 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 124
Exa 7.24.8 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 127Exa 7.24.9 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 129Exa 7.24.10Overall Transfer Function and Root Locus . . . . . . . 131Exa 7.24.11root locus . . . . . . . . . . . . . . . . . . . . . . . . . 133Exa 8.6.1 design suitable compensator. . . . . . . . . . . . . . . 137Exa 8.6.2 design phase lead compensator . . . . . . . . . . . . . 138Exa 8.6.3 design suitable compensator. . . . . . . . . . . . . . . 142Exa 9.8.1 Check for Contrallability of System. . . . . . . . . . . 148Exa 9.8.2 Check for Contrallability of System. . . . . . . . . . . 149Exa 9.9.1.a Check for Observability of System . . . . . . . . . . . 149Exa 9.9.1.bCheck for Observability of System . . . . . . . . . . . 150
Exa 9.10.4.aObtain State Matrix . . . . . . . . . . . . . . . . . . . 150Exa 9.10.4.bObtain State Matrix . . . . . . . . . . . . . . . . . . . 151Exa 9.10.5 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 151Exa 9.10.6 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 152Exa 9.10.7 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 152Exa 9.10.9 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 152Exa 9.10.10Obtain State Matrix . . . . . . . . . . . . . . . . . . . 153Exa 9.10.11Obtain Time Response. . . . . . . . . . . . . . . . . . 153Exa 9.10.12.iObtain Zero Input Response . . . . . . . . . . . . . . 154Exa 9.10.12.iiObtain Zero State Response. . . . . . . . . . . . . . . 155
Exa 9.10.13Obtain Time Response. . . . . . . . . . . . . . . . . . 156Exa 9.10.14Obtain Time Response using Diagonalization Process . 156Exa 9.10.15Obtain Time Response using Diagonalization Process . 157Exa 9.10.16Determine Transfer Matrix . . . . . . . . . . . . . . . 158Exa 9.10.17Determine Transfer Matrix . . . . . . . . . . . . . . . 159Exa 9.10.18Determine Transfer Matrix . . . . . . . . . . . . . . . 159Exa 9.10.20Check for Contrallability of System. . . . . . . . . . . 160Exa 9.10.21Check for Contrallability and Observability . . . . . . 160Exa 9.10.22Check for Contrallability and Observability . . . . . . 161Exa 11.1 pole zero Plot. . . . . . . . . . . . . . . . . . . . . . . 163Exa 11.2 transfer function . . . . . . . . . . . . . . . . . . . . . 163
Exa 11.3 transfer function . . . . . . . . . . . . . . . . . . . . . 165Exa 11.4 determine Wn zeta and Mp . . . . . . . . . . . . . . . 165Exa 11.5 time response for unit step function . . . . . . . . . . 166Exa 11.7 time response for unit step function . . . . . . . . . . 167Exa 11.8 time response for unit step function . . . . . . . . . . 168
7
7/26/2019 Linear Control System by B. S. Manke
9/252
Exa 11.9 time response for unit step function . . . . . . . . . . 169
Exa 11.10.acalculate tr Tp Mp. . . . . . . . . . . . . . . . . . . . 169Exa 11.10.bcalculate Td tr Tp Mp . . . . . . . . . . . . . . . . . . 170Exa 11.11 expression for unit step response . . . . . . . . . . . . 171Exa 11.12 unit step and impulse response . . . . . . . . . . . . . 172Exa 11.13 determine transfer function . . . . . . . . . . . . . . . 172Exa 11.14 determine Wn Wd Tp zeta and steady state error. . . 173Exa 11.15 determine Wn Wd zeta and steady state error. . . . . 174Exa 11.16 determine Kp Kv Ka. . . . . . . . . . . . . . . . . . . 175Exa 11.17 determine Kp Kv Ka. . . . . . . . . . . . . . . . . . . 176Exa 11.18 determine Kp Kv Ka. . . . . . . . . . . . . . . . . . . 176Exa 11.19 determine transfer function . . . . . . . . . . . . . . . 177
Exa 11.21.aroots of characterstics equation . . . . . . . . . . . . . 178Exa 11.21.bbode plot . . . . . . . . . . . . . . . . . . . . . . . . . 178Exa 11.22 gain margin and phase margin . . . . . . . . . . . . . 180Exa 11.24 stability using Nyquist criterion. . . . . . . . . . . . . 182Exa 11.25 stability using Nyquist criterion. . . . . . . . . . . . . 183Exa 11.26.i stability using Nyquist criterion. . . . . . . . . . . . . 185Exa 11.26.iistability using Nyquist criterion. . . . . . . . . . . . . 186Exa 11.27 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 188Exa 11.28 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 190Exa 11.29 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 191
Exa 11.30 root locus . . . . . . . . . . . . . . . . . . . . . . . . . 192Exa 11.31 design lead compensator . . . . . . . . . . . . . . . . . 193Exa 11.32 nicholas chart. . . . . . . . . . . . . . . . . . . . . . . 194Exa 11.33 obtain state matrix. . . . . . . . . . . . . . . . . . . . 198Exa 11.34 obtain state matrix. . . . . . . . . . . . . . . . . . . . 198Exa 11.35 obtain state matrix. . . . . . . . . . . . . . . . . . . . 199Exa 11.36 state transition matrix . . . . . . . . . . . . . . . . . . 199Exa 11.37 check for contrallability of system. . . . . . . . . . . . 200Exa 11.38 determine transfer function . . . . . . . . . . . . . . . 200Exa 11.39 determine transfer matrix . . . . . . . . . . . . . . . . 201Exa 12.1 Transfer Function . . . . . . . . . . . . . . . . . . . . 202
Exa 12.2 Transfer Function . . . . . . . . . . . . . . . . . . . . 203Exa 12.3 Transfer Function . . . . . . . . . . . . . . . . . . . . 203Exa 12.4 Transfer Function . . . . . . . . . . . . . . . . . . . . 204Exa 12.5 Transfer Function . . . . . . . . . . . . . . . . . . . . 205Exa 12.7 Determine Peak Time and Peak Overshoot . . . . . . 206
8
7/26/2019 Linear Control System by B. S. Manke
10/252
Exa 12.8 Time Response and Peak Overshoot . . . . . . . . . . 207
Exa 12.9 Determine Peak Overshoot . . . . . . . . . . . . . . . 207Exa 12.10 Determine Unit Step Response . . . . . . . . . . . . . 208Exa 12.11 Determine Unit Step and Unit Impulse Response . . . 209Exa 12.12 Determine Wn Wd zeta and steady state error . . . . 210Exa 12.13 Determine Wn Wd zeta and steady state error . . . . 210Exa 12.15 Stability Using Routh Hurwitz Criterion . . . . . . . . 211Exa 12.16 Stability Using Routh Hurwitz Criterion . . . . . . . . 212Exa 12.17 Stability Using Routh Hurwitz Criterion . . . . . . . . 213Exa 12.18 Stability Using Routh Hurwitz Criterion . . . . . . . . 214Exa 12.19 Stability Using Routh Hurwitz Criterion . . . . . . . . 215Exa 12.21 Determine Frequency of Oscillations . . . . . . . . . . 216
Exa 12.23.i Stability Using Nyquist Criterion . . . . . . . . . . . . 217Exa 12.23.iiStability Using Nyquist Criterion . . . . . . . . . . . . 218Exa 12.23.iiiStability Using Nyquist Criterion . . . . . . . . . . . . 221Exa 12.27 Gain and Phase Margin . . . . . . . . . . . . . . . . . 224Exa 12.33 Determine Close Loop Stability . . . . . . . . . . . . . 227Exa 12.42 Root Locus . . . . . . . . . . . . . . . . . . . . . . . . 229Exa 12.43 Root Locus and Value of K . . . . . . . . . . . . . . . 231Exa 12.44 Root Locus and Value of K . . . . . . . . . . . . . . . 233Exa 12.45 Root Locus and Value of K . . . . . . . . . . . . . . . 236Exa 12.46 Root Locus and Value of K . . . . . . . . . . . . . . . 238
Exa 12.48 Root Locus and Value of K . . . . . . . . . . . . . . . 240Exa 12.49 Root Locus and Value of K . . . . . . . . . . . . . . . 242Exa 12.50 Root Locus and Closed loop Transfer Function . . . . 243Exa 12.51 Root Locus and Gain and Phase Margin . . . . . . . . 245Exa 12.54 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 247Exa 12.55 Obtain State Matrix . . . . . . . . . . . . . . . . . . . 247Exa 12.56 Obtain State Transistion Matrix . . . . . . . . . . . . 248Exa 12.57 Obtain Time Response. . . . . . . . . . . . . . . . . . 249Exa 12.59 Obtain Time Response. . . . . . . . . . . . . . . . . . 249Exa 12.61 Obtain Transfer Matrix . . . . . . . . . . . . . . . . . 250AP 1 SERIES OF TWO FUNCTION. . . . . . . . . . . . . 251
AP 2 PARALLEL OF TWO FUNCTION . . . . . . . . . . 251
9
7/26/2019 Linear Control System by B. S. Manke
11/252
List of Figures
2.1 pole zero plot . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.1 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.2 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817.3 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827.4 stability using Nyquist criterion . . . . . . . . . . . . . . . . 917.5 stability using Nyquist criterion . . . . . . . . . . . . . . . . 937.6 stability using Nyquist criterion . . . . . . . . . . . . . . . . 947.7 stability using Nyquist criterion . . . . . . . . . . . . . . . . 967.8 stability using Nyquist criterion . . . . . . . . . . . . . . . . 977.9 stability using Nyquist criterion . . . . . . . . . . . . . . . . 997.10 stability using Nyquist criterion . . . . . . . . . . . . . . . . 1007.11 stability using Nyquist criterion . . . . . . . . . . . . . . . . 1027.12 Phase Margin . . . . . . . . . . . . . . . . . . . . . . . . . . 1037.13 stability using Nyquist criterion . . . . . . . . . . . . . . . . 1057.14 gain phase plot . . . . . . . . . . . . . . . . . . . . . . . . . 1077.15 stability using bode plot . . . . . . . . . . . . . . . . . . . . 1097.16 gain margin and phase margin . . . . . . . . . . . . . . . . . 1107.17 stability using bode plot . . . . . . . . . . . . . . . . . . . . 1127.18 root locus description . . . . . . . . . . . . . . . . . . . . . . 1137.19 root locus description . . . . . . . . . . . . . . . . . . . . . . 1157.20 root locus description . . . . . . . . . . . . . . . . . . . . . . 1187.21 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1207.22 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.23 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1257.24 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1277.25 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1307.26 Overall Transfer Function and Root Locus . . . . . . . . . . 1327.27 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
10
7/26/2019 Linear Control System by B. S. Manke
12/252
8.1 design suitable compensator . . . . . . . . . . . . . . . . . . 139
8.2 design suitable compensator . . . . . . . . . . . . . . . . . . 1408.3 design phase lead compensator. . . . . . . . . . . . . . . . . 1428.4 design phase lead compensator. . . . . . . . . . . . . . . . . 1438.5 design suitable compensator . . . . . . . . . . . . . . . . . . 1468.6 design suitable compensator . . . . . . . . . . . . . . . . . . 147
11.1 pole zero Plot . . . . . . . . . . . . . . . . . . . . . . . . . . 16411.2 bode plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17911.3 gain margin and phase margin . . . . . . . . . . . . . . . . . 18111.4 stability using Nyquist criterion . . . . . . . . . . . . . . . . 18211.5 stability using Nyquist criterion . . . . . . . . . . . . . . . . 184
11.6 stability using Nyquist criterion . . . . . . . . . . . . . . . . 18511.7 stability using Nyquist criterion . . . . . . . . . . . . . . . . 18711.8 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18911.9 root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19011.10root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19111.11root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19211.12design lead compensator . . . . . . . . . . . . . . . . . . . . 19511.13design lead compensator . . . . . . . . . . . . . . . . . . . . 19611.14nicholas chart . . . . . . . . . . . . . . . . . . . . . . . . . . 197
12.1 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 217
12.2 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 21912.3 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 22012.4 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 22212.5 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 22312.6 Stability Using Nyquist Criterion . . . . . . . . . . . . . . . 22512.7 Gain and Phase Margin . . . . . . . . . . . . . . . . . . . . 22612.8 Determine Close Loop Stability . . . . . . . . . . . . . . . . 22812.9 Root Locus . . . . . . . . . . . . . . . . . . . . . . . . . . . 22912.10Root Locus and Value of K . . . . . . . . . . . . . . . . . . 23212.11Root Locus and Value of K . . . . . . . . . . . . . . . . . . 23412.12Root Locus and Value of K . . . . . . . . . . . . . . . . . . 23612.13Root Locus and Value of K . . . . . . . . . . . . . . . . . . 23812.14Root Locus and Value of K . . . . . . . . . . . . . . . . . . 24012.15Root Locus and Value of K . . . . . . . . . . . . . . . . . . 24212.16Root Locus and Closed loop Transfer Function . . . . . . . . 244
11
7/26/2019 Linear Control System by B. S. Manke
13/252
12.17Root Locus and Gain and Phase Margin . . . . . . . . . . . 246
12
7/26/2019 Linear Control System by B. S. Manke
14/252
Chapter 1
INTRODUCTION
Scilab code Exa 1.6.1.i inverse laplace transform
1 // C ap ti on : i n v e r s e l a p l a c e t r a n s f o r m2 / / e xa m pl e 1 . 6 . 1 . ( i )3 / / p ag e 74 // F ( s ) = 1/( s ( s +1) )5 s = %s ;
6 s yms t ;
7 [ A ] = pfss ( 1 / ( ( s ) * ( s + 1 ) ) ) / / p a r t i a l f r a c t i o n o f F ( s )8 F 1 = i la p la c e ( A ( 1) , s , t)
9 F 2 = i la p la c e ( A ( 2) , s , t)
10 F = F 1 + F 2 ;
11 disp (F , f ( t )= ) // r e s u l t
Scilab code Exa 1.6.1.ii inverse laplace transform
1 // C ap ti on : i n v e r s e l a p l a c e t r a n s f o r m2 / / e xa m pl e 1 . 6 . 1 . ( i i )3 / / p ag e 74 // F( s )=s +6/( s ( s 2+4s +3) )
13
7/26/2019 Linear Control System by B. S. Manke
15/252
5 s = %s ;
6 s yms t ;7 [ A ] = pfss ( ( s + 6 ) / ( s * ( s ^ 2 + 4 * s + 3 ) ) ) // p a r t i a l f r a c t i o no f F ( s )
8 A ( 1 ) = 2 / s ;
9 F 1 = i la p la c e ( A ( 1) , s , t)
10 F 2 = i la p la c e ( A ( 2) , s , t)
11 F 3 = i la p la c e ( A ( 3) , s , t)
12 F = F 1 + F 2 + F 3 ;
13 disp (F , f ( t )= ) / / r e s u l t
Scilab code Exa 1.6.1.iii inverse laplace transform
1 // C ap ti on : i n v e r s e l a p l a c e t r a n s f o r m2 / / e x a mp l e 1 . 6 . 1 . ( i i i )3 / / p ag e 84 // F ( s ) = 1/( s 2+ 4s + 8)5 s = %s ;
6 s yms t ;
7 disp ( 1 / ( s ^ 2 + 4 * s + 8 ) , F ( s )= )
8 f = i l a p l a c e ( 1 / ( s ^ 2 + 4 * s + 8 ) , s , t )9 disp (f , f ( t )= ) // r e s u l t
Scilab code Exa 1.6.1.iv inverse laplace transform
1 // C ap ti on : i n v e r s e l a p l a c e t r a n s f o r m2 / / e xa m pl e 1 . 6 . 1 . ( i v )3 / / p ag e 8
4 // F( s )=s +2/( s 2+4s +6)5 s = %s ;
6 s yms t ;
7 disp ( ( s + 2 ) / ( s ^ 2 + 4 * s + 6 ) , F ( s )= )8 F = i l a p l a c e ( ( s + 2 ) / ( s ^ 2 + 4 * s + 6 ) , s , t )
14
7/26/2019 Linear Control System by B. S. Manke
16/252
9 disp (F , f ( t )= ) // r e s u l t
Scilab code Exa 1.6.1.v inverse laplace transform
1 // C ap ti on : i n v e r s e l a p l a c e t r a n s f o r m2 / / e xa m pl e 1 . 6 . 1 . ( v )3 / / p ag e 84 // F( s ) =5/( s ( s 2+4s +5) )5 s = %s ;
6 s yms t ;7 [ A ] = pfss ( 5 / ( s * ( s ^ 2 + 4 * s + 5 ) ) ) // p a r t i a l f r a c t i o n o f F( s )
8 F 1 = i l ap l ac e ( A ( 1) , s , t)
9 F 2 = i l ap l ac e ( A ( 2) , s , t)
10 F = F 1 + F 2 ;
11 disp (F , f ( t )= ) / / r e s u l t
Scilab code Exa 1.6.1.vi program laplace transform
1 / / C ap ti on : p r o g r a m l a p l a c e t r a n s f o r m2 / / e x a mp l e 1 . 6 . 1 . ( v )3 / / p ag e 94 / / t h i s p ro bl e m i s s o l ve d i n two p a r t s b ec au se i n
t h i s p ro bl em p f s s f u n c t i o n d on ot work . So , F i r s twe f i n d p a r t i a l f r a c t i o n u si ng method a s we do i n
maths and t h en s e co n dl y we f i n d i n v e r s e l a p l a c et r an s f or m a s u s u al .
5 / / p a r t i a l f r a c t i o n
6 s = % s7 s y ms t ;
8 n u m = ( s ^ 2 + 2 * s + 3 ) ;
9 d e n = ( s + 2 ) ^ 3 ;
10 g = syslin ( c , n u m / d e n ) ;
15
7/26/2019 Linear Control System by B. S. Manke
17/252
11 rd = roots ( d e n ) ;
12 [ n d k ]= factors ( g )13 a ( 3 ) = horner ( g * d ( 1 ) ^ 3 , r d ( 1 ) )
14 a ( 2 ) = horner ( derivat ( g * d ( 1 ) ^ 3 ) , r d ( 1 ) )
15 a ( 1 ) = horner ( derivat ( derivat ( g * d ( 1 ) ^ 3 ) ) , r d ( 1 ) )
16 // i n v e r s e l a p l a c e17 / / p a r t i a l f r a c t i o n w i l l be : a ( 1 ) / ( s +1)+a ( 2 ) / ( ( s +2)
2 )+a (3 ) /(( s+2) 3)18 F 1 = i la p la c e ( 1/ d ( 1) , s , t)
19 F 2 = i la p la c e ( - 2/ ( d (1 ) ^ 2) , s , t)
20 F 3 = i la p la c e ( 2 *1 . 5/ ( d ( 1) ^ 3 ) ,s , t )
21 F = F 1 + F 2 + F 3
22 disp (F , f ( t )= ) // r e s u l t
Scilab code Exa 1.6.2 solution of differential equation
1 // Cap tio n : s o l u t i o n o f d i f f e r e n t i a l eq ua ti on2 / / exa mp le 1 . 6 . 23 / / p ag e 94 // a f t e r t a ki n g l a p l a c e t r a ns f o r m and a p pl y i n g g i ve n
c o nd i ti o n , we g et :5 //X( s )=2s +5/( s ( s +4))6 s = % s ;
7 s y ms t
8 [ A ] = pfss ( ( 2 * s + 5 ) / ( s * ( s + 4 ) ) )
9 A ( 1 ) = 1 . 2 5 / s
10 F 1 = i l a p l ac e ( A ( 1 ) , s , t )
11 F 2 = i la p la c e ( A (2 ) ,s , t )
12 f = F 1 + F 2 ;
13 disp (f , f ( t )= ) / / r e s u l t
Scilab code Exa 1.6.3 solution of differential equation
16
7/26/2019 Linear Control System by B. S. Manke
18/252
1 // C a p t i o n : s o l u t i o n o f d i f f e r e n t i a l e q u a t i o n
2 / / exa mp le 1 . 6 . 33 / / p a ge 1 04 // a f t e r t a ki n g l a p l a c e t r a ns f o r m and a p pl y i n g g i ve n
c o nd i ti o n , we g et :5 //X( s ) =1/( s 2+2 s +2)6 s = % s ;
7 s y ms t
8 f = i l a pl a c e ( 1 /( s ^ 2 + 2 * s + 2 ) ,s , t ) ;
9 disp (f , f ( t )= ) / / r e s u l t
Scilab code Exa 1.6.4 solution of differential equation
1 // C a p t i o n : s o l u t i o n o f d i f f e r e n t i a l e q u a t i o n2 / / exa mp le 1 . 6 . 43 / / p a ge 1 04 // a f t e r t a ki n g l a p l a c e t r a ns f o r m and a p pl y i n g g i ve n
c o nd i ti o n , we g et :5 //Y( s ) =(6 s + 6) / ( ( s 1) ( s +2)( s +3) )6 s = % s ;
7 s y ms t8 [ A ] = pfss ( ( 6 * s + 6 ) / ( ( s - 1 ) * ( s + 2 ) * ( s + 3 ) ) )
9 F 1 = i la p la c e ( A (1 ) ,s , t )
10 F 2 = i la p la c e ( A (2 ) ,s , t )
11 F 3 = i la p la c e ( A (3 ) ,s , t )
12 F = F 1 + F 2 + F 3 ;
13 disp (F , f ( t )= ) / / r e s u l t
Scilab code Exa 1.6.5 initial value
1 // Ca pt io n : i n i t i a l v a l u e2 / / exa mp le 1 . 6 . 53 / / p a ge 1 1
17
7/26/2019 Linear Control System by B. S. Manke
19/252
4 // I ( s ) =(C s /( RCs+1) ) E( s )
5 // g iv en : E( s ) =100/s ,R=2 megaohm ,C=1 uF6 // so , I ( s ) = ( ( ( 110 6) s ) /( 2s +1 ) ) (1 00 / s )7 s y ms t
8 p = poly ( [0 1 0^ - 6 ] , s , c o e f f ) ;9 q = poly ( [1 2 ] , s , c o e f f ) ;
10 r = poly ( [0 1 ] , s , c o e f f ) ;11 F 1 = p / q ;
12 F 2 = 1 / r ;
13 F = F 1 * F 2
14 f = i l a p l a c e ( F , s , t ) ;
15 z = l i m i t ( f , t , 0 ) ; // i n i t i a l v a l u e t he or e m
16 z = d b l ( z ) ;17 disp (z , i (0 +)=)
Scilab code Exa 1.6.7 final value
1 / / C ap ti on : f i n a l v a l u e2 / / exa mp le 1 . 6 . 73 / / p a ge 1 2
4 //X( s ) =100/( s ( s 2+2 s + 5 0 ) )5 p = poly ( [ 1 0 0 ] , s , c o e f f ) ;6 q = poly ([0 50 2 1] , s , c o e f f ) ;7 F = p / q ;
8 s y ms s
9 x = s * F ;
10 y = l i m i t ( x , s , 0 ) ; // f i n a l v a lu e t he or em11 y = d b l ( y )
12 disp (y , x ( in f )= ) // r e s u l t
Scilab code Exa 1.6.8 steady state value
1 / / C ap ti on : s t e a d y s t a t e v a l u e
18
7/26/2019 Linear Control System by B. S. Manke
20/252
2 / / exa mp le 1 . 6 . 7
3 / / p a ge 1 24 //X( s )=s / ( s 2 ( s 2+6 s + 2 5 ) )5 p = poly ( [0 1 ] , s , c o e f f ) ;6 q = poly ( [ 0 0 2 5 6 1 ] , s , c o e f f ) ;7 F = p / q ;
8 s y ms s
9 x = s * F ;
10 y = l i m i t ( x , s , 0 ) ; // f i n a l v a lu e t he or em11 y = d b l ( y )
12 disp (y , x ( in f )= ) // r e s u l t
Scilab code Exa 1.6.9 initial values
1 // Ca pt io n : i n i t i a l v a l u e s2 / / exa mp le 1 . 6 . 73 / / p a ge 1 34 //F( s ) =(4 s +1) /( s 3+2 s )5 s = % s ;
6 s y ms t ;
7 F = ( 4 * s + 1 ) / ( s ^ 3 + 2 * s )8 f = i la pl ac e ( F ,s , t) ;
9 y = l i m i t ( f , t , 0 ) ; // i n i t i a l v a l u e t he or e m10 y = d b l ( y ) ;
11 disp (y , f (0+ )= )12 / / s i n c e F ( s )=s F ( s ) f (0+) where L( f ( t ) )=F ( s )=F113 F 1 = ( 4 * s + 1 ) / ( s ^ 2 + 2 )
14 f 1 = i l a pl a c e ( F1 , s , t ) ;
15 y 1 = l i m i t ( f 1 , t , 0 ) ; // i n i t i a l v a l u e t he or e m16 y 1 = d b l ( y 1 ) ;
17 disp ( y 1 , f pr i me (0+)= )18 / / s i n c e F ( s ) =( s 2 )F( s )s f (0+)f ( 0 + ) w he re L ( f ( t ) )=F ( s )=F2
19 F 2 = ( s - 8 ) / ( s ^ 2 + 2 )
20 f 2 = i l a pl a c e ( F2 , s , t ) ;
19
7/26/2019 Linear Control System by B. S. Manke
21/252
21 y 2 = l i m i t ( f 2 , t , 0 ) ; // i n i t i a l v a l u e t he or e m
22 y 2 = d b l ( y 2 ) ;23 disp ( y 2 , f d o u b l e p r i m e ( 0 +)= )
Scilab code Exa 1.6.10 final value
1 / / C ap ti on : f i n a l v a l u e2 / / exa mp le 1 . 6 . 1 03 / / p a ge 1 3
4 syms t s ;5 F = 4 / ( s ^ 2 + 2 * s )
6 x = s * F
7 x = s i m p l e ( x )
8 z = l i m i t ( x , s , 0 ) ; // f i n a l v a lu e t he or em9 z = d b l ( z ) ;
10 disp (z , f (0+ )= )
20
7/26/2019 Linear Control System by B. S. Manke
22/252
Chapter 2
TRANSFER FUNCTIONS
Scilab code Exa 2.4.1 pole zero plot
1 / / C ap ti on : p o l e z e r o P l o t2 / / exa mp le 2 . 4 . 13 / / p a ge 1 94 / / t r a n s f e r f u n c t i o n :G( s ) = ( 1 / 2 ( ( s 2+ 4) ( 1 + 2 . 5s ) ) /( ( s
2+2) ( 1 + 0 . 5s ) ) )5 s = % s ;
6 G = syslin ( c , ( 1 /2 * ( ( s ^ 2 + 4 ) * ( 1 + 2 . 5 * s ) ) / ( ( s ^ 2 + 2 )* ( 1 + 0 . 5 * s ) ) ) ) ;
7 disp (G , G( s )= ) ;8 x = plzr ( G )
9 xtitle ( po le z e r o c o n f i g u r a t i o n , R e a l p a r t ,I m g p a r t ) ;
10 / / v al ue a t s =211 a = 2 ;
12 g = ( 1 / 2 * ( ( a ^ 2 + 4 ) * ( 1 + 2 . 5 * a ) ) / ( ( a ^ 2 + 2 ) * ( 1 + 0 . 5 * a ) ) ) ;13 disp (g , G(2)= ) ;
21
7/26/2019 Linear Control System by B. S. Manke
23/252
Figure 2.1: pole zero plot
22
7/26/2019 Linear Control System by B. S. Manke
24/252
Scilab code Exa 2.4.2 final value
1 / / C ap ti on : f i n a l v a l u e2 / / exa mp le 2 . 4 . 23 / / p a ge 2 04 // r e f e r t o f i g . 2 . 4 . 2 g i v en on pa ge 205 // p o l e s a re l o c a t ed a t s =0,2 a n d 46 // z e r o a t s=37 s = % s ;
8 s y ms K ;
9 g = syslin ( c ,( ( s + 3 ) ) / ( s * ( s + 2 ) * ( s + 4 ) ) ) ; / / t r a n s f e rf u n c t i o n
10 G = K * g ; // t r a n s f e r f u n c ti o n11 disp (G , G( s )= ) ;12 //G( s ) = 3. 2 at s = 1;13 / / on s o l v i n g we f i n d K=1214 K = 1 2 ;
15 G = K * g ;
16 disp (G , G( s )= )
23
7/26/2019 Linear Control System by B. S. Manke
25/252
Chapter 3
BLOCK DIAGRAMS
Scilab code Exa 3.2.1 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 13 / / p a ge 3 24 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;
6 / / e x ec s e r i e s . s c e ;7 s yms G1 G2 G3 H1 ;
8 / / s h i f t i n g t a k e o f f p oi n t a f t e r b l o c k G2 t o ap o s i t i o n b e f o r e b lo ck G2
9 a = G 2 * H1 ;
10 b = p a r a l l e l ( G 2 , G 3 ) ;
11 / / s h i f t i n g t ak e o f f p o in t b e f o r e ( G2+G3 ) t o A f t e r (G2+G3)
12 c = a / b ;
13 m = 1 ;
14 d = b / ( 1 + m * b ) ;15 e = s e r i e s ( G 1 , d ) ;
16 y = ( e / ( 1 + c * e ) ) ;
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= ) ;
24
7/26/2019 Linear Control System by B. S. Manke
26/252
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.2 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 23 / / p a ge 3 44 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 s yms G1 G2 G3 H1 ;
8 / / s h i f t i n g t a k e o f f p oi nt b e f o r e b lo ck G1 t o ap o s i t i o n a f t e r b lo ck G1
9 a = G 1 * H 1 ;10 b = p a r a l l e l ( G 1 , G 2 ) ;
11 c = G 3 / . a
12 y = s e r i e s ( b , c ) ;
13 y = s i m pl e ( y ) ;
14 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:series.sce
25
7/26/2019 Linear Control System by B. S. Manke
27/252
Scilab code Exa 3.2.3 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 33 / / p a ge 3 54 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 G5 G6 H1 H2 ;
8 / / s h i f t t he t a k e o f p o in t p l ac e d b e f o r e G2 t ow ar dsr i g h t s i d e o f b lo ck G2
9 a = G 5 / G2 ;10 b = p a r a l l e l ( G 3 , G 4 ) ;
11 c = s e r i e s ( b , G 6 ) ;
12 d = p a r a l l e l ( a , c ) ;
13 e = s e r i e s ( G 1 , G 2 ) ;
14 l = s e r i e s ( H 1 , d ) ;
15 g = e / . H 2
16 y = g / ( 1 + g * l )
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.4 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 43 / / p a ge 3 6
26
7/26/2019 Linear Control System by B. S. Manke
28/252
4 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 H1 H2 ;
8 / / s h i f t t he t ak e o f f p o i nt p la c e d b e f o r e G1 t o a f t e rb l o c k G1
9 a = G 3 / G 1 ;
10 b = p a r a l l e l ( a , G 2 ) ;
11 / / s h i f t t he t ak e o f f p o i nt b e f o r e b l o ck b t o w a r d sr i g h t s i d e o f same b lo ck
12 c = 1 / b ;
13 d = s e r i e s ( H 1 , c ) ;14 e = s e r i e s ( G 1 , b ) ;
15 g = p a r a l l e l ( H 2 , d ) ;
16 y = e / ( 1 + e * g ) ;
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:series.sce
Scilab code Exa 3.2.5 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 53 / / p a ge 3 7
4 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o nwhi ch we a r e g oi ng t o u se h er e
5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 H1 H2 H3 ;
27
7/26/2019 Linear Control System by B. S. Manke
29/252
8 / / s h i f t t he t ak e o f f p o i nt p la c e d b e f o r e G3 t o a f t e r
b l o c k G39 a = H 3 / G 3 ;10 b = G 3 / . H 2 ;
11 c = s e r i e s ( G 2 , b ) ;
12 // s h i f t t he summing p o in t a f t e r b l oc k G1 t o b e f o r eb l o c k G1
13 d = a / G 1 ;
14 e = G 1 / . H 1 ;
15 f = s e r i e s ( e , c ) ;
16 y = f / ( 1 + f * d ) ;
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.6 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 63 / / p a ge 3 84 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 s yms G1 G2 G3 H1 ;
8 a = p a r a l l e l ( G 1 , G 3 ) ;9 b = G 2 / . H 1 ;
10 y = s e r i e s ( a , b ) ;
11 y = s i m pl e ( y ) ;
12 disp (y , C( s ) /R( s )= ) ;
28
7/26/2019 Linear Control System by B. S. Manke
30/252
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.7 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 73 / / p a ge 3 94 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 H1 H2 ;
8 / / s h i f t t he t ak e o f f p o i nt p la c e d b e f o r e G2 t o a f t e rb l o c k G2
9 a = G 2 * H 1 ;10 / / s h i f t t he t ak e o f f p o i nt p la c e d b e f o r e G2 t o a f t e r
b l oc k G1 and s h i f t t he summing p o i nt b e f o r eb l oc k G2 t o b e f o r e b l o c k G2
11 // i n t e r c ha n g e c o n s e c u t i v e summing p o i nt and s h i f tt h e t a ke o f f p oi nt p la ce d b e f o r e H2 t o a f t e rb l o c k H2
12 b = G 2 * H 2 ;
13 c = b * H 1 ;
14 d = p a r a l l e l ( G 3 , G 2 ) ;
15 e = 1 / . b16 f = s e r i e s ( d , e ) ;
17 g = G 1 / . a
18 h = s e r i e s ( g , f ) ;
19 y = h / ( 1 - h * c ) ;
29
7/26/2019 Linear Control System by B. S. Manke
31/252
20 y = s i m pl e ( y ) ;
21 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.8 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 83 / / p a ge 4 14 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 G5 H1 H2 ;
8 // s h i f t t he summing p o i nt b e f o r e b l oc k G5 t ow ar dsl e f t o f b l o c k G5
9 a = G 2 * G 5 ;
10 b = G 4 / . H 1 ;
11 c = s e r i e s ( G 5 , H 2 ) ;
12 d = s e r i e s ( b , G 3 ) ;
13 e = d / ( 1 + d * c ) ;
14 e = s i m p l e ( e )
15 f = p a r a l l e l ( G 1 , a ) ;
16 y = s e r i e s ( f , e ) ;
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= ) ;
check AppendixAP 2for dependency:
parallel.sce
30
7/26/2019 Linear Control System by B. S. Manke
32/252
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.9 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 93 / / p a ge 4 24 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 G5 H1 H2 H3 ;
8 / / s h i f t t he t ak e o f f p o i nt p la c e d b e f o r e G3 t o a f t e rb l o c k G3
9 a = G 5 / G 3 ;
10 b = G 1 / . H 1 ;
11 c = s e r i e s ( b , G 2 ) ;
12 d = G 3 / . H 2 ;
13 e = p a r a l l e l ( G 4 , a ) ;14 e = s i m p l e ( e ) ;
15 f = s e r i e s ( c , d ) ;
16 g = s e r i e s ( f , e ) ;
17 g = s i m p l e ( g ) ;
18 y = g / ( 1 + g * H 3 ) ;
19 y = s i m p l e ( y ) ;
20 disp (y , C( s ) /R( s )= ) ;
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
31
7/26/2019 Linear Control System by B. S. Manke
33/252
Scilab code Exa 3.2.10 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 1 03 / / p a ge 4 34 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;
6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 G5 H1 H2 H3 ;
8 a = p a r a l l e l ( G 3 , G 4 ) ;
9 / / s h i f t o f f t h e t a ke o f f p oi nt b e f o r e b lo ck a t oa f t e r b lo ck a
10 b = 1 / a ;
11 d = 1 ;
12 c = G 2 / ( 1 + G 2 * d ) ;
13 e = p a r a l l e l ( H 1 , b ) ;
14 f = s e r i e s ( c , a ) ;
15 g = s e r i e s ( H 2 , e ) ;
16 h = f / ( 1 + f * g ) ;
17 h = s i m p l e ( h ) ;
18 i = s e r i e s ( h , G 1 ) ;
19 y = i / ( 1 + i * H 3 ) ;
20 y = s i m p l e ( y ) ;
21 disp (y , C( s ) /R( s )= )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:series.sce
32
7/26/2019 Linear Control System by B. S. Manke
34/252
Scilab code Exa 3.2.11 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 1 13 / / p a ge 4 54 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 H1 H2 H3 ;
8 a = G 4 / . H 1 ;
9 // s h i f t t he summing p o i nt a f t e r b l o ck G3 t ow ar ds
l e f t o f b l o c k G310 b = G 2 / G 3 ;
11 c = s e r i e s ( a , G 3 ) ;
12 d = c / ( 1 + c * H 2 ) ;
13 d = s i m p l e ( d )
14 // s h i f t t he summing p o i nt b e f o r e b l oc k G1 t ow ar dsr i g h t o f b lo ck G1
15 e = G 1 * H 3 ;
16 f = d / ( 1 + d * e ) ;
17 f = s i m p l e ( f )
18 g = p a r a l l e l ( G 1 , b ) ;
19 g = s i m p l e ( g ) ;
20 y = s e r i e s ( g , f )
21 y = s i m pl e ( y ) ;
22 disp (y , C( s ) /R( s )= ) ;
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.12 Transfer Function
33
7/26/2019 Linear Control System by B. S. Manke
35/252
1 // C ap ti on : t r a n s f e r f u n c t i o n
2 / / exa mp le 3 . 2 . 1 23 / / p a ge 4 74 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 H1 H2 H3 ;
8 // s h i f t t he summing p o i nt b e f o r e b l oc k G1 t ow ar dsr i g h t o f b lo ck G1
9 // s h i f t t he summing p o i nt a f t e r b l o ck G3 t ow ar dsl e f t o f b l o c k G3
10 a = G 2 / G 111 b = H 3 / G 3 ;
12 c = G 1 / . H 1
13 d = G 3 / . H 2
14 e = s e r i e s ( G 4 , d )
15 // s h i f t t he summing p o i nt a f t e r b l o ck e t ow ar ds l e f to f b lo ck e
16 g = 1 / e
17 f = s e r i e s ( a , g ) ;
18 f = s i m p l e ( f )
19 h = p a r a l l e l ( f , 1 ) ;
20 h = s i m p l e ( h )
21 i = e / ( 1 + e * b ) ;
22 i = s i m p l e ( i )
23 j = s e r i e s ( c , h ) ;
24 y = s e r i e s ( j , i ) ;
25 y = s i m pl e ( y ) ;
26 disp (y , C( s ) /R( s )= ) ;
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
34
7/26/2019 Linear Control System by B. S. Manke
36/252
Scilab code Exa 3.2.13 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 1 33 / / p a ge 4 94 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;
6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 H1 H2 ;
8 // s h i f t t he summing p o i nt a f t e r b l o ck H2 t ow ar dsr i g h t o f b lo ck H2
9 // s h i f t t he summing p o i nt a f t e r b l o ck H1 t ow ar dsr i g h t o f b lo ck H2
10 a = H 1 * H 2
11 b = p a r a l l e l ( G 1 , G 2 )
12 c = G 4 / . a
13 d = s e r i e s ( G 3 , c )
14 e = d / ( 1 + d * H 2 ) ;
15 e = s i m p l e ( e )
16 f = s e r i e s ( b , e )
17 y = f / ( 1 + f * a ) ;
18 y = s i m pl e ( y ) ;
19 disp (y , C( s ) /R( s )= ) ;
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
35
7/26/2019 Linear Control System by B. S. Manke
37/252
Scilab code Exa 3.2.14 Transfer Function
1 // C ap ti on : t r a n s f e r f u n c t i o n2 / / exa mp le 3 . 2 . 1 43 / / p a ge 5 04 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 G3 G4 H1 H2 R D ;
8 a = p a r a l l e l ( G 1 , G 2 )
9 b = G 3 / . H 2
10 c = s e r i e s ( a , b )11 / / i n o r d e r t o d e t e r m i ne C( s ) /R( s ) c o n s i d e r D=012 d = s e r i e s ( c , G 4 ) ;
13 y = d / ( 1 + d * H 1 ) ;
14 y = s i m pl e ( y ) ;
15 disp (y , C( s ) /R( s )= )16 / / now c o n s i d e r R=0 f o r c a l c u l a t i n g C( s ) /D( s )17 e = s e r i e s ( c , H 1 )
18 z = G 4 / ( 1 + G 4 * e ) ;
19 z = s i m p l e ( z ) ;
20 disp (z ,C( s ) /D( s )=
) ;
21 x = ( y * R ) + ( z * D ) ;
22 x = s i m p l e ( x ) ;
23 printf ( t o t a l o ut pu t ) ;24 disp (x , C( s ) )
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 3.2.15 Transfer Function
36
7/26/2019 Linear Control System by B. S. Manke
38/252
1 // C ap ti on : t r a n s f e r f u n c t i o n
2 / / exa mp le 3 . 2 . 1 53 / / p a ge 5 24 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 / / e x ec p a r a l l e l . s c e ;6 / / e x ec s e r i e s . s c e ;7 syms G1 G2 H1 H2 H3 D1 D2 R ;
8 a = G 2 / . H 2
9 b = a / ( 1 + a * H 3 ) ;
10 b = s i m p l e ( b )
11 / / i n o r d e r t o d e t e r m i n e C ( s ) / R( s ) c o n s i d e r D1 =0 , D2=0
12 c = s e r i e s ( b , G 1 )13 y = c / ( 1 + c * H 1 ) ;
14 y = s i m p l e ( y )
15 disp (y , C( s ) /R( s ) ) ;16 / / now c o n s i d e r R=0 ,D2=0 f o r c a l c u l a t i n g C( s ) / D1 ( s )17 d = s e r i e s ( G 1 , H 1 ) ;
18 z = b / ( 1 + b * d ) ;
19 z = s i m p l e ( z )
20 disp (z , D1( s ) /R( s ) ) ;21 / / now c o n s i d e r R=0 ,D1=0 f o r c a l c u l a t i n g C( s ) / D2 ( s )22 e = G 1 * ( - H 1 ) ;
23 f = s e r i e s ( b , e ) ;
24 x = f / ( 1 + f ) ;
25 x = s i m p l e ( x ) ;
26 disp (x , D2( s ) /R( s ) ) ;27 o u t = ( y * R ) + ( z * D 1 ) + ( x * D 2 ) ;
28 o u t = s i m p l e ( o u t ) ;
29 disp ( o u t , C( s ) ) ;
check AppendixAP 2for dependency:
parallel.sce
check AppendixAP 1for dependency:
series.sce
37
7/26/2019 Linear Control System by B. S. Manke
39/252
Chapter 4
SIGNAL FLOW GRAPHS
Scilab code Exa 4.3.1 Overall Transmittance
1 / / C ap ti on : o v e r a l l t r a n s m i t t a n c e2 / / exa mp le 4 . 3 . 13 / / p a ge 6 34 sy ms G1 G2 H1 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 L 1 = - G 1 * H 1 ;
8 L 2 = - G 2 * H 1 ;
9 P 1 = G 1 ;
10 P 2 = G 2 ;
11 D 1 = 1 ;
12 D 2 = 1 ;
13 D = 1 - ( L 1 + L 2 ) ;
14 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
15 Y = s i m p l e ( Y )16 disp (Y , C( s ) /R( s )= )
38
7/26/2019 Linear Control System by B. S. Manke
40/252
Scilab code Exa 4.3.2 Overall Transmittance
1 / / C ap ti on : o v e r a l l t r a n s m i t t a n c e2 / / exa mp le 4 . 3 . 23 / / p a ge 6 44 sy ms G1 G2 H1 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 P 1 = G 1 ;
8 P 2 = G 2 ;
9 L 1 = - G 1 * H 1 ;10 D 1 = 1 ;
11 D 2 = 1 ;
12 D = 1 - ( L 1 ) ;
13 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
14 Y = s i m p l e ( Y ) ;
15 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.1 Closed Loop Transfer Function
1 // C ap ti on : c l o s e d l o o p t r a n s f e r f u n c t i o n2 / / exa mp le 4 . 4 . 13 / / p a ge 6 44 s yms G1 G2 G3 H1 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 P 1 = G 1 * G 3 ;8 P 2 = G 2 * G 3 ;
9 L 1 = - G 3 * H 1 ;
10 D 1 = 1 ;
11 D 2 = 1 ;
39
7/26/2019 Linear Control System by B. S. Manke
41/252
12 D = 1 - ( L 1 ) ;
13 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;14 Y = s i m p l e ( Y )
15 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.2 Overall Gain
1 / / C ap ti on : o v e r a l l g a i n2 / / exa mp le 4 . 4 . 2
3 / / p a ge 6 54 syms a b c d e f g h5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o p
by L1 , L2 a nd s o o n6
7 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
8 P 1 = a * b * c * d ;
9 P 2 = a * g ;
10 L 1 = f ;
11 L 2 = c * e ;
12 L 3 = d * h ;13 / / n o n to u ch i ng l o o p s a r e L1L2 , L1L314 L 1 L 2 = L 1 * L 2 ;
15 L 1 L 3 = L 1 * L 3 ;
16 D 1 = 1 ;
17 D 2 = 1 - L 2 ;
18 D = 1 - ( L 1 + L 2 + L 3 ) + ( L 1 L 2 + L 1 L 3 ) ;
19 D = s i m p l e ( D ) ;
20 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
21 Y = s i m p l e ( Y ) ;
22 disp (Y , x 5 / x 1 ) ;
Scilab code Exa 4.4.3 to find various signal flow graph parameter
40
7/26/2019 Linear Control System by B. S. Manke
42/252
1 / / C a p t i o n :
t o f i n d v a r i o u s s i g n a l f l o w g r a p h p a r a m e t e r2 / / exa mp le 4 . 4 . 33 / / p a ge 6 64 syms a b c d e f g h ij
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 / / s i x i n d ep e nd e n t p at h8 P 1 = a * b * d
9 P 2 = e * f * h
10 P 3 = a * j * h11 P 4 = e * i * d
12 P 5 = - e * i * c * j * h
13 P 6 = - a * j * g * i * d
14 // 3 INDIVIDUAL LOOPS15 L 1 = - b * c
16 L 2 = - f * g
17 L 3 = - i * c * j * g
18 //NON TOUCHING LOOPS19 L 1 L 2 = L 1 * L 2
20 //PATH FACTORS21 D 3 = 1 ; D 4 = 1 ; D 5 = 1 ; D 6 = 1
22 D 1 = 1 - L 2
23 D 2 = 1 - L 1
24 //GRAPH DETERMINANT25 D = 1 - ( L 1 + L 2 + L 3 ) + ( L 1 L 2 ) ;
26 D = s i m p l e ( D )
27 disp (D , g r a p h d e t e r m i n a n t= )
Scilab code Exa 4.4.4 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
41
7/26/2019 Linear Control System by B. S. Manke
43/252
2 / / exa mp le 4 . 4 . 4
3 / / p a ge 6 74 s yms G1 G2 G3 H1 ;5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o p
by L1 , L2 a nd s o o n6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra ph
d e t e r m in a n t by D7 P 1 = G 1 * G 2 * 1 ;
8 P 2 = G 1 * G 3 ;
9 L 1 = G 2 * ( - 1 ) ;
10 L 2 = G 3 * ( - 1 ) ;
11 L 3 = - G 1 * G 2 * H 1
12 D 1 = 1 ;13 D 2 = 1 ;
14 D = 1 - ( L 1 + L 2 + L 3 ) ;
15 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
16 Y = s i m p l e ( Y ) ;
17 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.5 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
2 / / exa mp le 4 . 4 . 53 / / p a ge 6 84 syms G1 G2 G3 H1 H2 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 P 1 = G 1 * G 2 ;8 P 2 = G 1 * G 3 ;
9 L 1 = - G 2 * H 2 ;
10 L 2 = - G 1 * G 2 * H 1 ;
11 L 3 = G 1 * G 3 * ( - H 2 ) * G 2 * ( - H 1 ) ;
42
7/26/2019 Linear Control System by B. S. Manke
44/252
12 L 3 = s i m p l e ( L 3 )
13 D 1 = 1 ;14 D 2 = 1 ;
15 D = 1 - ( L 1 + L 2 + L 3 ) ;
16 D = s i m p l e ( D )
17 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
18 Y = s i m p l e ( Y ) ;
19 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.6 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
2 / / exa mp le 4 . 4 . 63 / / p a ge 6 94 syms G1 G2 G3 G4 H1 H2 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 / / t o f i n d C/R c o n s i d e r D=08 P 1 = G 1 * G 3 * G 4 ;
9 P 2 = G 2 * G 3 * G 4 ;
10 L 1 = - G 3 * H 1 ;
11 L 2 = - G 1 * G 3 * G 4 * H 2 ;
12 L 3 = - G 2 * G 3 * G 4 * H 2 ;
13 D 1 = 1 ;
14 D 2 = 1 ;
15 D = 1 - ( L 1 + L 2 + L 3 ) ;
16 D = s i m p l e ( D )
17 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;18 Y = s i m p l e ( Y ) ;
19 disp (Y , C( s ) /R( s )= )
43
7/26/2019 Linear Control System by B. S. Manke
45/252
Scilab code Exa 4.4.7 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
2 / / exa mp le 4 . 4 . 73 / / p a ge 7 04 s yms G1 G2 G3 H1 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra phd e t e r m in a n t by D
7 P 1 = G 1 * G 3 * G 4 ;
8 P 2 = G 1 * ( - G 2 ) ;
9 L 1 = G 3 * G 4 * ( - 1 ) ;
10 L 2 = G 1 * G 3 * H 1 * ( - 1 ) ;
11 L 3 = G 1 * G 3 * H 1 * ( - 1 ) ;
12 L 4 = G 1 * ( - G 2 ) * ( - 1 ) * G 3 * H 1 * ( - 1 ) ;
13 L 5 = G 1 * ( - G 2 ) * ( - 1 ) * G 3 * H 1 * ( - 1 ) ;
14 L 4 = s i m p l e ( L 4 ) ;
15 L 5 = s i m p l e ( L 5 ) ;16 D 1 = 1 ;
17 D 2 = 1 ;
18 D = 1 - ( L 1 + L 2 + L 3 + L 4 + L 5 ) ;
19 D = s i m p l e ( D )
20 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
21 Y = s i m p l e ( Y ) ;
22 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.8 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
44
7/26/2019 Linear Control System by B. S. Manke
46/252
2 / / exa mp le 4 . 4 . 8
3 / / p a ge 7 04 syms G1 G2 G3 G4 G5 H1 H2 ;5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o p
by L1 , L2 a nd s o o n6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra ph
d e t e r m in a n t by D7 P 1 = G 1 * G 2 * G 4 ;
8 P 2 = G 2 * G 3 * G 5 ;
9 P 3 = G 3 ;
10 L 1 = - G 4 * H 1 ;
11 L 2 = - G 2 * G 4 * H 2 ;
12 L 3 = - G 2 * G 5 * H 2 ;13 D 1 = 1 ;
14 D 2 = 1 ;
15 D 3 = 1 - L 1 ;
16 D = 1 - ( L 1 + L 2 + L 3 ) ;
17 D = s i m p l e ( D )
18 Y = ( P 1 * D 1 + P 2 * D 2 + P 3 * D 3 ) / D ;
19 Y = s i m p l e ( Y ) ;
20 disp (Y , C( s ) /R( s )= )
Scilab code Exa 4.4.9 Overall Transfer Function
1 // C ap ti on : o v e r a l l t r a n s f e r f u n c t i o n2 / / exa mp le 4 . 4 . 93 / / p a ge 7 14 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 exec p a r a l l e l . s c e ;
6 exec s e r i e s . s c e ;7 syms G1 G2 G3 G4 H5 H1 H2 ;
8 / / s h i f t t h e SUMMING p o i n t l o c s t e d a f t e r G3 t o wa r d sl e f t o f b l o c k G3
9 a = G 2 / . H 1 ;
45
7/26/2019 Linear Control System by B. S. Manke
47/252
10 b = G 5 / G 3 ;
11 c = p a r a l l e l ( a , b ) ;12 c = s i m p l e ( c ) ;
13 d = G 3 / . H 2 ;
14 e = s e r i e s ( G 1 , c ) ;
15 f = s e r i e s ( e , d ) ;
16 y = s e r i e s ( G 4 , f ) ;
17 y = s i m pl e ( y ) ;
18 disp (y , C( s ) /R( s )= )
Scilab code Exa 4.4.10 Transfer function using mason gain formula
1 / / C ap ti on : t r a n s f e r f u n c t i o n u s i n g m a s o n s g a i n f o r m u l a
2 / / exa mp le 4 . 4 . 1 03 / / p a ge 7 24 syms G1 G2 G3 G4 G5 H1 H2 ;
5 / / f o rw a rd p at h d en o te d by P1 , P2 and s o on and l o o pby L1 , L2 a nd s o o n
6 / / p at h f a c t o r by D1 , D2 a nd s o on and g ra ph
d e t e r m in a n t by D7 P 1 = G 1 * G 2 * G 3 * G 4 ;
8 P 2 = G 1 * G 5 * G 4 ;
9 L 1 = - G 2 * H 1 ;
10 L 2 = - G 3 * H 2 ;
11 D 1 = 1 ;
12 D 2 = 1 ;
13 D = 1 - ( L 1 + L 2 ) ;
14 D = s i m p l e ( D )
15 Y = ( P 1 * D 1 + P 2 * D 2 ) / D ;
16 Y = s i m p l e ( Y ) ;17 disp (Y , C( s ) /R( s )= )
46
7/26/2019 Linear Control System by B. S. Manke
48/252
Chapter 5
MODELLING A CONTROL
SYSTEM
Scilab code Exa 5.9.4 Calculate Reference Voltage Vr
1 // C ap ti on : c a l c u l a t e r e f e r e n c e v o l t a g e V r2 / / ex am pl e 5 . 9 . 43 / / p a ge 1 024 exec s e r i e s . s c e ;
5 A =2 // a m p l i f i e r6 K = 1 0 // m o t o r f i e l d7 N = 1 0 0 // sp eed8 t g = 0 . 1 / / t a c h o g e n e r a t o r9 a = s e r i e s ( A , K ) ;
10 b = a / . t g ;
11 disp (b , N/Vr= ) ;12 // s i n c e N= 10013 V r = N * ( 1 / b ) ;
14 disp ( V r , r e f e r e n c e v o l t a g e = ) ;
check AppendixAP 1for dependency:
series.sce
47
7/26/2019 Linear Control System by B. S. Manke
49/252
Scilab code Exa 5.9.5 Calculate Reference Voltage Vr
1 // C ap ti on : c a l c u l a t e r e f e r e n c e v o l t a g e V r2 / / ex am pl e 5 . 9 . 53 / / p a ge 1 024 exec s e r i e s . s c e ;
5 V t = 2 5 0 / / o u t p u t v o l t a g e6 R f = 1 0 0 // f i e l d w i n d i n g r e s i s t a n c e7 K g = 5 0 0 / / g e n e r a t o r c o n s t a n t8 A =2 // a m p l i f i e r9 V f = 0 . 4 //
f r a c t i o n o f o u t p u t v o l t a g e c o m p a r e d w i t h r e f e r e n c e v o l t a g e
10 a = 1 / R f ;
11 b = s e r i e s ( A , a ) ;
12 c = s e r i e s ( b , K g ) ;
13 d = c / . V f ;
14 disp (d , Vt/Vr= ) ;15 / / s i n c e Vt =25 016 V r = V t * ( 1 / d ) ;
17 disp ( V r , r e f e r e n c e v o l t a g e = ) ;
check AppendixAP 1for dependency:
series.sce
Scilab code Exa 5.9.6 Calculate Gain of Amplifier Ka
1 // C ap ti on : c a l c u l a t e g a i n o f a m p l i f i e r K a2 / / ex am pl e 5 . 9 . 63 / / p a ge 1 03
4 / / s t e a d y s t a t e e q u a t i o n s : E i=Vt+ I l Ra and Vt= I l Rl5 / / w he re Vt=o u t p u t v o l t a g e , R l= l o a d r e s i s t a n c e , Ra=
a r m a t u r e r e s i s t a n c e , I l =l o a d c u r r e n t ,6 syms Rl Ra Ka Er e ;
7 E i = 4 5 0 ;
48
7/26/2019 Linear Control System by B. S. Manke
50/252
8 I f = 1 . 5 ; // f i e l d c u r r e n t
9 K g = E i / I f ; // g e n e r a t o r e m f c o n s t a n t10 V t = 4 0 0 ;11 / / f r om s t e d y s t a t e e q . we g e t : Vt / E i=Rl / ( R l+Ra )12 a = R l / ( R l + R a ) ;
13 a = V t / E i ;
14 c = ( K g * a ) ;
15 G = ( K a * c ) ;
16 H = 0 . 1 ;
17 // t r a n s f e r f u nc t i o n r e l a t i n g e r r o e e and t h er e f e r e n c e v o l t a g e Er i s e / Er =1/(1+GH)
18 b = e / E r ;
19 b = 1 / ( 1 + G * H ) ;20 e = V t * H * .0 2 ; // s i n c e a l l o w a b l e e r r o r i s 2%21 E r = ( V t * H ) + e ;
22 // s i n c e e / E r =1/( 1+GH) , on p u t t i n g v a l u e o f e , Er , Gand H and s o l v i n g we g e t
23 K a = 1 . 8 9 ;
24 disp ( K a , g a i n o f a m p l i f i e r K a = ) ;
Scilab code Exa 5.9.7 Transfer Function of Generator
1 // C ap ti on : t r a n s f e r f u n c t i o n o f g e n e r a t o r2 / / ex am pl e 5 . 9 . 73 / / p a ge 1 054 syms E Vf Kg R L
5 s = % s ;
6 / / g e n e r a t o r f i e l d c o n s t a n t K g =d e l t a ( e ) / d e l t a ( I f )7 K g = 5 0 / 2 ;
8 L = 2 ; // f i e l d i n d u c t a n c e
9 R = 2 0 0 ; // f i e l d r e s i s t a n c e10 / / t r a n s f e r f u n c t i o n i s g i v e n by : E/ Vf =(Kg/R+s L )11 a = K g / ( R + s * L ) ;
12 disp (a , E( s ) / Vf ( s )= ) ;
49
7/26/2019 Linear Control System by B. S. Manke
51/252
Scilab code Exa 5.9.8 Overall Transfer Function of given System
1 // C a p t i o n : o v e r a l l t r a n s f e r f u n c t i o n o f g i v e n s y s t e m2 / / ex am pl e 5 . 9 . 83 / / p a ge 1 054 syms Rf Ra Kb Jm Lf La Kg Kt Jl s
5 R f = 1 0 0 0 ; // f i e l d r e s i s t a n c e6 L f = 1 0 0 ; // f i e l d i n d u c t a n c7 K g = 1 0 0 0 ; // g e n e r a t o r f i e l d c o n s t a n t8 R a = 2 0 ; // a r m a t u r e r e s i s t a n c e9 L a = 0 . 1 ; / / a r m a t u r e i n d u c t a n c e
10 K t = 1 . 2 ; // m o t o r t o r q u e c o n s t11 K b = 1 . 2 ; / / m o t o r b a c k e m f c o n s t12 J l = 0 . 0 0 0 0 3 ; / / m o m e n t o f i n e r t i a13 J m = 0 . 0 0 0 0 2 ; // c o e f f o f v i s c o u s f r i c t i o n14 a = K t / ( R a + s * L a ) ;
15 b = 1 / ( ( J m + J l ) * s ) ;
16 c = ( a * b ) ;
17 d = c / ( 1 + c * K b ) ;
18 e = K g / ( R f + s * L f ) ;19 f = ( d * e ) ;
20 f = s i m p l e ( f )
21 disp (f , wss ( s ) /Vf ( s )= ) ;22
23 // s t ea d y s t a t e v a lu e24 disp ( u nd er s t ea d y s t a t e c o n di t i o n , on p u t ti n g s =0
i n e x p r e s s i o n f , we g e t : )25 disp ( V f = 1. 2 w s s )
Scilab code Exa 5.9.9 Overall Transfer Function of given System
1 // C a p t i o n : o v e r a l l t r a n s f e r f u n c t i o n o f g i v e n s y s t e m
50
7/26/2019 Linear Control System by B. S. Manke
52/252
2 / / ex am pl e 5 . 9 . 9
3 / / p a ge 1 074 syms Ka Ke Kt J f N1 N25 s = % s ;
6 K e = 1 0 ; // e r r o r d e t e c t o r g a i n7 K a = 1 0 0 ; // a m p l i f i e r t r a n s c o n d u c t a n c e8 K t = . 0 0 0 5 ; // m o t o r t o r q u e c o n s t9 J = . 0 0 0 0 1 2 5 ; / / m o m e n t o f i n e r t i a
10 f = . 0 0 0 5 ; // c o e f f o f v i s c o u s f r i c t i o n11 g = N 1 / N 2 ;
12 g = 1 / 2 0 ;
13 a = ( K a * K e ) ;
14 b = ( a * K t ) ;15 c = 1 / ( J * s ^ 2 + f * s ) ;
16 d = ( c * b ) ;
17 e = ( g * d ) ;
18 h = e / ( 1 + e ) ;
19 disp (h , C( s ) /R( s )= ) ; / / r e s u l t
Scilab code Exa 5.9.10 Overall Transfer Function of given System
1 // C a p t i o n : o v e r a l l t r a n s f e r f u n c t i o n o f g i v e n s y s t e m2 / / ex am pl e 5 . 9 . 1 03 / / p a ge 1 084 syms Ra Kt Jm fm Kb
5 / / w he re Ra= a r m a t u r e r e s i s t a n c e ; Kt=m o t o r t o r q u e c o n s t ; Jm=m o m e n t o f i n e r t i a ; fm=c o e f f o f v i s c o u s f r i c t i o n ; Kb=m o t o r b a c k e m f c o n s t
6 s = % s ;
7 a = K t / ( s * R a * ( s * J m + f m ) ) ;8 a = s i m p l e ( a ) ;
9 b = s * K b ;
10 c = a / ( 1 + a * b ) ;
11 c = s i m p l e ( c ) ;
51
7/26/2019 Linear Control System by B. S. Manke
53/252
12 disp (c , Q( s ) /V( s )= ) ; // o v e r a l l t r a n s f e r f u n c t i o n
13 K t = 0 . 1 8 3 ; K b = 0 . 1 8 3 ; R a = 4 . 8 ; J m = . 0 0 4 ; f m = 0 . 0 0 1 5 ;14 a = K t / ( s * R a * ( s * J m + f m ) ) ;
15 b = s * K b ;
16 c = a / ( 1 + a * b ) ;
17 disp (c , Q( s ) /V( s )= ) ; //o v e r a l l t r a n s f e r f u n c t i o n a f t e r s u b s t i t u t i n gv a l ue i n a bo ve e q ua t i on
Scilab code Exa 5.9.11 Overall Transfer Function of given System
1 / / C a p t i o n :o v e r a l l t r a n s f e r f u n c t i o n o f p o s i t i o n a l c o n t r o l s y s t e m
2 / / ex am pl e 5 . 9 . 1 13 / / p a ge 1 094 syms Ka Ke Kb Kt Jeq feq Ra N1 N2
5 / / wh er e Ka= a m p l i f i e r g a i n ; Ke= e r r o r d e t e c t o r g a i n ;Kb=m o t o r b a c k e m f c o n s t ; Kt=m o t o r t o r q u e c o n s t ;Ra=a r m a t u r e r e s i s t a n c e ; J eq=m o m e n t o f i n e r t i a ;
f e q= c o e f f o f v i s c o u s f r i c t i o n ;6 s = % s ;
7 K t = . 0 0 0 1 ; R a = 0 . 2 ; J e q = . 0 0 0 1 ; f e q = . 0 0 0 5 ; K a = 1 0 ; K e = 2 ; K b
= 0 . 0 0 0 1 ; f = 0 . 1 ;
8 a = ( K a * K e ) ; // i n s e r i e s9 b = K t / ( s * R a * ( J e q * s + f e q ) ) ;
10 c = b / ( 1 + b * s * K b ) ;
11 d = ( a * c ) ; // i n s e r i e s12 f = 0 . 1 ;
13 g = ( d * f ) ; // i n s e r i e s
14 h = g / ( 1 + g ) ;15 disp (h , C( s ) /R( s )= ) ; //o v e r a l l t r a n s f e r f u n c t i o n a f t e r s u b s t i t u t i n gv a l ue i n a bo ve e q ua t i on
52
7/26/2019 Linear Control System by B. S. Manke
54/252
Scilab code Exa 5.9.12 Overall Transfer Function of given System
1 // C a p t i o n : o v e r a l l t r a n s f e r f u n c t i o n o f g i v e n s y s t e m2 / / ex am pl e 5 . 9 . 1 23 / / p a ge 1 114 s yms Ka Ke Kf Rf Lf Jeq feq N1 N2
5 / / wh er e Ka= a m p l i f i e r g a i n ; Ke= e r r o r d e t e c t o r g a i n ;Kf=mo to r to rq ue co n st ; Rf=f i e l d r e s i s t a n c e ; Lf=f i e l d i n d u c t a n c e Jeq=m o m e n t o f i n e r t ia ; f e q=c o e f f o f v i s c o u s f r i c t i o n ;
6 s = % s ;
7 d = N 1 / N 2 ;
8 K a = 1 0; K e =8 ; K f = 0. 0 5; R f =5 ; L f = 0. 25 ; J eq = 0 . 05 ; f eq
= 0. 07 5; d = 0. 1;
9 a = ( K a * K e ) ;
10 b = K f / ( R f + s * L f ) ;
11 c = 1 / ( s * ( J e q * s + f e q ) ) ;
12 g = ( b * c ) // i n s e r i e s13 h = ( g * a ) // i n s e r i e s
14 i = ( h * d ) // i n s e r i e s15 j = i / ( 1 + i ) ;
16 disp (j , C( s ) /R( s )= ) ;
Scilab code Exa 5.9.13 Overall Transfer Function of Two Phase ac Motor
1 / / C a p t i o n :o v e r a l l t r a n s f e r f u n c t i o n o f t w o p h a s e a c m o t o r
2 / / ex am pl e 5 . 9 . 1 33 / / p a ge 1 134 s yms Ka K Ktg Jeq feq N1 N2 m
5 / / wh er e Ka= a m p l i f i e r g a i n ; Ktg=t a c h o m e t e r g a i n c o n s tJ eq=m o m e n t o f i n e r t i a ; f e q=
53
7/26/2019 Linear Control System by B. S. Manke
55/252
c o e f f o f v i s c o u s f r i c t i o n ;
6 s = % s ;7 / / from t o rq u e c h a r a c t e r s t i c s m and K a re d et er mi ne d8 K a = 2 0; K = 0 . 0 0 12 ; K tg = 0 . 2 ; J eq = 0 . 0 0 0 1 5; f eq = 0 . 0 0 0 1; m
= - 0 . 0 0 0 3 ;
9 a = K / ( J e q * s + ( f e q - m ) ) ;
10 b = N 1 / N 2 ;
11 b = 0 . 1 ;
12 c = ( K a * a ) // i n s e r i e s13 d = ( c * b ) // i n s e r i e s14 e = d / ( 1 + K t g * d ) ;
15 disp (e , C( s ) /R( s )= ) ; // o v e r a l l t r a n s f e r f u n c t i o n
Scilab code Exa 5.9.14 Transfer Function Of Motor
1 // C ap ti on : t r a n s f e r f u n c t i o n o f m o t o r2 / / ex am pl e 5 . 9 . 1 43 / / p a ge 1 144 syms Kt Kb Ra La J
5 / / w he re Ka= a m p l i f i e r g a i n ; Kt=m o t o r t o r q u e c o n s t ; Ra
=a r m a t u r e r e s i s t a n c e ; La=a r m a t u r e i n d u c t o r ; J=m o m e n t o f i n e r t i a
6 s = % s ;
7 / / s i n c e t h e r e a r e two i n p u t s Va ( s ) a nd T l ( s ) . I f Va ( s )i s h el d a t f i x e d v a lu e t h e n o nl y e f f e c t o f Tl ( s )i s c o n s i d e r e d and Va ( s ) i s t a ke n a s Z er o .
8 a = ( K t * K b ) / ( R a + s * L a )
9 b = 1 / J * s
10 c = b / ( 1 + b * a ) ;
11 disp ( - c , Wm( s ) / Tl ( s )=) ; // n e g at i v e s i g n i n d i c a t e s
t ha t an i n c r e a s e i n Tl d e c r e a s e s Wm12 K b = 9 . 5 5 ; K t = 9 . 5 5 ; R a = 0 . 7 5 ; L a = 0 . 0 0 5 ; J = 5 0 ;13 a = ( K t * K b ) / ( R a + s * L a )
14 b = 1 / ( J ) * ( 1 / ( s ) )
15 c = b / ( 1 + b * a ) ;
54
7/26/2019 Linear Control System by B. S. Manke
56/252
16 disp ( - c , Wm( s ) / Tl ( s )=) ; // a f t e r p u tt i ng v a l ue s
55
7/26/2019 Linear Control System by B. S. Manke
57/252
Chapter 6
TIME RESPONSE ANALYSIS
OF CONTROL SYSTEMS
Scilab code Exa 6.10.1 time response for step function
1 // C ap ti on : t i m e r e s p o n s e f o r s t e p f u n c t i o n2 / / ex am pl e 6 . 1 0 . 13 / / p a ge 1 704 // we h ave d e f i ne d p a r a l l e l and s e r i e s f u nc t i o n
whi ch we a r e g oi ng t o u se h er e5 exec p a r a l l e l . s c e ;
6 exec s e r i e s . s c e ;
7 s = % s ;
8 s y ms t ;
9 a = 4 / ( s * ( s + 4 ) )
10 b = s + 1 . 2
11 c = s + 0 . 8
12 d = a / ( 1 + a )
13 e = p a r a l l e l ( b , c )
14 f = d / . e ;15 disp (f , C( s ) /R( s )= ) ; // t r a n s f e r f u n c t i o n16 / / s i n c e i n p u t : r ( t ) = 2 , s o R ( s ) =2/ s ; / /
s t e p f u n c t i o n o f m a g n i t u d e 217 g = f * ( 2 / s ) ;
56
7/26/2019 Linear Control System by B. S. Manke
58/252
18 disp (g , C( s )= ) ;
19 [ A ] = pfss ( 8 / ( s * ( s + 2 ) * ( s + 6 ) ) )20 F = i l a p l a c e ( ( 8 / ( s * ( s + 2 ) * ( s + 6 ) ) ) , s , t ) ;
21 disp (F , t i m e r e s p o n s e f o r s t e p f u n c t i o n o f m a g n i t u d e 2 , f (t )= )
Scilab code Exa 6.10.2 Time Response for unit Impulse and Step function
1 / / C a p t i o n :t i m e r e s p o n s e f o r u n i t i m p u l s e a n d s t e p f u n c t i o n2 / / ex am pl e 6 . 1 0 . 23 / / p a ge 1 714 //G( s ) =(4 s + 1 ) / 4( s 2 ) ;H( s ) =1;5 clc ;
6 s = % s ;
7 s y ms t ;
8 G = ( 4 * s + 1 ) / ( 4 * ( s ^ 2 ) ) //G( s )9 b = 1 ;
10 a = G / . ( b ) ;
11 disp (a , C( s ) /R( s )= ) ;12 / / f o r u n i t i m p u l s e r e s p o n s e R( s ) =1 ; s o C( s )=a ;13 disp ( f o r u n i t i m p u l s e r e s p o n s e R( s ) =1 ; s o C( s )=a ;
)
14 disp (a , C( s )= ) ;15 c = i l a p l a c e ( a , s , t ) ;
16 disp (c , c ( t )= ) ;17 / / f o r u n i t s t e p r e s p o n s e R( s ) =1/ s18 disp ( f o r u n i t s t e p r e s p o n s e R( s ) =1/ s , s o ) ;19 d = a * ( 1 / s ) ;
20 disp (d , C( s )= ) ;21 e = i l a p l a c e ( d , s , t ) ;22 disp (e , c ( t )= ) ;
57
7/26/2019 Linear Control System by B. S. Manke
59/252
Scilab code Exa 6.10.3 Time Response for Unit Step Function
1 // C ap ti on : t i m e r e s p o n s e f o r u n i t s t e p f u n c t i o n2 / / ex am pl e 6 . 1 0 . 33 / / p a ge 1 724 //G( s ) =2/( s ( s +3)5 clc ;
6 s = % s ;
7 s y ms t ;
8 G = 2 / ( s * ( s + 3 ) ) //G( s )9 b = 1 ;
10 a = G / . ( b ) ;
11 disp (a , C( s ) /R( s )= ) ;12 disp ( f o r u n i t s t e p r e s p o n s e R( s ) =1/ s ) ;13 d = a * ( 1 / s ) ;
14 disp (d , C( s )= ) ;15 e = i l a p l a c e ( d , s , t ) ;
16 disp (e , c ( t )= ) ;
Scilab code Exa 6.10.4 Time Response for Unit Step Function
1 // C ap ti on : t i m e r e s p o n s e f o r u n i t s t e p f u n c t i o n2 / / ex am pl e 6 . 1 0 . 43 / / p a ge 1 724 s = % s ;
5 s y ms t ;
6 a = ( s + 4 ) ;
7 b = 1 / ( s * ( s + 2 ) ) ;8 c = ( a * b ) ; // i n s e r i e s9 d = 0 . 5 ;
10 e = c / . d
11 f = 1 ;
58
7/26/2019 Linear Control System by B. S. Manke
60/252
12 g = e / . f ;
13 disp (g , C( s ) /R( s )= ) ;14 disp ( f o r u n i t s t e p r e s p on s e R( s ) =1/ s , s o ) ;15 h = g * ( 1 / s ) ;
16 disp (h , C( s )= ) ;17 [ A ] = pfss ( h ) ;
18 A ( 1 ) = ( 1 / s )
19 F 1 = i l a p l a c e ( A ( 1 ) , s , t )
20 / /A ( 2 ) c a n b e w r i t t e n a s : A ( 2 ) =a 1+a 221 a 1 = - 1 / ( 4 * ( 6 + 3 . 5 * s + s ^ 2 ) ) ;
22 a 2 = ( - ( s + 1 . 7 5 ) / ( 6 + 3 . 5 * s + s ^ 2 ) ) ;
23 F 2 = i l a p l a c e ( a 1 , s , t ) ;
24 F 3 = i l a p l a c e ( a 2 , s , t ) ;25 / / now m u l t i p l y i n g b y t h e i r c o e f f i c i e n t26 F 1 = ( 2 / 3 ) * F 1 ;
27 F 2 = ( 1 / 6 ) * F 2 ;
28 F 3 = ( 2 / 3 ) * F 3 ;
29 / / a f t e r a d di n g F1 , F2 and F3 and s i m p l y f y i n g we g e tt im e r e s p o n s e w hi ch i s d en o te d by c ( t )
30 disp ( c ( t ) =((2(%e(1. 75t ) ( 2c o s ( 1 . 7 1 t )0.29s i n( 1 . 7 1t ) ) ) ) /3 ) ; / / t i m e r e s p o n s e
Scilab code Exa 6.10.5 Calculate Wn zeta Wd tp Mp
1 // Capt ion : cal cul at e Wn , zet a ,Wd, tp ,Mp2 / / ex am pl e 6 . 1 0 . 53 / / p a ge 1 744 // gi v e n G( s ) = 20/( s + 1) ( s +2)5 clc ;
6 s = % s ;
7 G = syslin ( c , [ 2 0 / (( s + 1 ) * ( s + 5 ) ) ] ) / /G( s ) : t r a n s f e rf u n c ti o n i n f or wa rd pat h8 H = 1 ; // b ackward p ath t r a n s f e r f u n c t i o n9 a = G / . H // c l o se d l oo p t r a n s f e r f u nc t i o n
10 b = denom ( a )
59
7/26/2019 Linear Control System by B. S. Manke
61/252
11 c = coeff ( b )
12 //Wn 2=c ( 1 , 1 )13 Wn = sqrt ( c ( 1 , 1 ) ) / / n a t u r a l f r e q u e n c y14 disp ( W n , na t u r a l f r e q ue nc y , Wn= )15 // 2z e t a Wn=c (1 , 2 )16 z e t a = c ( 1 , 2 ) / ( 2 * W n ) / / da mp ing r a t i o17 disp ( z e t a , d a mp in g r a t i o , z e t a = )18 W d = W n * sqrt ( 1 - z e t a ^ 2 ) / / damped f r e q u e n c y19 disp ( W d , damping ra t io ,Wd= )20 T p = % p i / W d / / p ea k t i me21 disp ( T p , peak time , Tp= )22 M p = ( exp ( - ( z e t a * % p i ) / sqrt ( 1 - z e t a ^ 2 ) ) ) * 1 0 0 //max.
o v e r s h o o t23 disp ( M p , max ov er sh oo t ,Mp= )24 t = ( 2 * % p i ) / ( W n * sqrt ( 1 - z e t a ^ 2 ) ) / / p e r i o d o f o s c i l l a t i o n25 disp (t , t im e a t w hi ch f i r s t o v e r s h o o t o c c u r s= )26 disp (t , p e r i od o f o s c i l l a t i o n , t= )27 t s = 4 / ( z e t a * W n ) // s e t t l i n g t im e28 disp ( t s , s e t t l i n g t im e , t s = )29 N = W d / ( 2 * % p i ) * t s //no . of o s c i l l a t i o n s com ple ted
b e f o r e r e a c h i ng s te ad y s t a t e30 disp (N , n o . o f o s c i l l a t i o n s c o m p l e t e d b e f o r e
r e a c h i n g s t e a d y s t a t e , N=)
Scilab code Exa 6.10.6 Time Response
1 / / C a pt i on : t i m e r e s p o n s e2 / / ex am pl e 6 . 1 0 . 63 / / p a ge 1 744 / / Kt=t o r q u e c o n s t a n t , J=moment o f i n e r t i a , f =c o e f f . o f
v i s c o u s f r i c t i o n5 clc ;6 syms Kt J f t
7 s = % s ;
8 K t = 3 6 0 , J = 1 0 , f = 6 0
60
7/26/2019 Linear Control System by B. S. Manke
62/252
9 b = 1 / ( J * s ^ 2 + f * s ) ;
10 G = ( K t * b ) // i n s e r i e s11 H = 1 ; // b ackward p ath t r a n s f e r f u n c t i o n12 c l = G / . H ; // c l o s e d l o o p t r a n s f e r f u n c t i o n13 d = denom ( c l ) / 1 0 ; / / t a k i n g 1 0 common f r om n u m e r a t o r a nd
d en om in at or f o r s i m p l y f y i n gc l o s e d l o o p t r a n s f e r f u n c t i o n
14 f = numer ( c l ) / 1 0 ;
15 C L = f / d ; //c l o s e d l o o p t r a n s f e r f u n c t i o n a f t e r s i m p l i f y i n g
16 printf ( o v e r a l l t r a n s f e r f u nc t i o n= \n ) ;17 disp ( C L , C( s ) /R( s )= ) ;
18 // gi ve n R( s ) =(50( %pi /1 80) ) (1 / s ) ;19 R = ( 5 0 * ( % p i / 1 8 0 ) ) * ( 1 / s ) ;
20 C = R * C L ;
21 e = coeff ( d )
22 //Wn 2=e ( 1 , 1 )23 Wn = sqrt ( e ( 1 , 1 ) ) / / n a t u r a l f r e q u e n c y24 // 2z e t a Wn=c (1 , 2 )25 z e t a = e ( 1 , 2 ) / ( 2 * W n ) / / da mp ing r a t i o26 / / c ( t ) : t i m e r e s p o n s e e x p r e s s i o n27 c = ( 5 * % p i / 1 8 ) * ( 1 - ( exp ( - z e t a * W n * t ) * sin ( W n * sqrt ( 1 - z e t a
^ 2 ) * t + atan ( sqrt ( 1 - z e t a ^ 2 ) / z e t a ) ) ) / sqrt ( 1 - z e t a ^ 2 ) )
;
28 c = f l o a t ( c )
29 disp (c , c ( t )= )
Scilab code Exa 6.10.7 determine factor by which K should be reduced
1 / / c a p t i o n :
d e t er m i n e f a c t o r b y w h i c h K s h o u l d b e r e d u c e d2 / / ex am pl e 6 . 1 0 . 73 / / p a ge 1 754 s yms T K / /K=f o r w a r d p a t h g a i n , T= t i m e c o n s t a n t5 s = % s ;
61
7/26/2019 Linear Control System by B. S. Manke
63/252
6 G = K / ( s * ( s * T + 1 ) ) ;
7 G = s i m p l e ( G ) ;8 printf ( t h e f o r w a r d p a t h t r a n s f e r f u n c t i o n : \n ) ;9 disp (G , G( s )= ) ;
10 H = 1 ; // b ackward p ath t r a n s f e r f u n c t i o n11 C L = G / . H ;
12 C L = s i m p l e ( C L ) ;
13 printf ( t h e o v e r l a l l t r a n s f e r f u n c t i o n : \n ) ;14 disp ( C L , C( s ) /R( s )= ) ;15 printf ( t h e c h a r a c t e r s t i c e q u a t i o n i s :\ n ) ;16 disp ( s 2+ s /T+K/T=0) ;17 / / f r o m c h a r . e q . we g e t Wn 2=K/T a nd 2z e t a Wn=1/
Top Related