Difference between revisions of "Scilab/C4/Control-systems/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 1: Line 1:
 
{| Border=1
 
{| Border=1
  
|| Time
+
|'''Time'''
  
|| Narration
+
|'''Narration'''
  
 
|-
 
|-
| 00.01
+
| 00:01
 
|Dear Friends,  
 
|Dear Friends,  
  
 
|-
 
|-
| 00.02
+
| 00:02
 
| Welcome to the spoken tutorial on ''' “Advanced Control of Continuous Time systems” '''|
 
| Welcome to the spoken tutorial on ''' “Advanced Control of Continuous Time systems” '''|
  
 
|-
 
|-
| 00.09
+
| 00:09
 
| At the end of this tutorial, you will learn how to
 
| At the end of this tutorial, you will learn how to
  
 
|-
 
|-
|00.12
+
|00:12
 
|Define a continuous time system: second and higher order  
 
|Define a continuous time system: second and higher order  
  
  
 
|-
 
|-
|00.17
+
|00:17
 
|Plot response to '''step''' and sine inputs  
 
|Plot response to '''step''' and sine inputs  
  
  
 
|-
 
|-
| 00.20
+
| 00:20
 
|Do a '''Bode plot'''  
 
|Do a '''Bode plot'''  
  
 
|-
 
|-
|00.22
+
|00:22
 
|Study '''numer''' and ''' denom Scilab functions'''  
 
|Study '''numer''' and ''' denom Scilab functions'''  
  
  
 
|-
 
|-
| 00.26
+
| 00:26
 
|Plot ''' poles''' and '''zeros''' of a system  
 
|Plot ''' poles''' and '''zeros''' of a system  
  
 
|-
 
|-
| 00.30
+
| 00:30
 
| To record this tutorial, I am using  
 
| To record this tutorial, I am using  
  
 
|-
 
|-
|00.33
+
|00:33
 
|'''Ubuntu 12.04'''  as the operating system with
 
|'''Ubuntu 12.04'''  as the operating system with
  
 
|-
 
|-
|00.36
+
|00:36
 
|'''Scilab 5.3.3''' version  
 
|'''Scilab 5.3.3''' version  
  
 
|-
 
|-
| 00.40
+
| 00:40
 
| Before practising this tutorial, a learner should have basic knowledge of '''Scilab''' and '''control systems.'''   
 
| Before practising this tutorial, a learner should have basic knowledge of '''Scilab''' and '''control systems.'''   
  
 
|-
 
|-
| 00.48
+
| 00:48
 
| For '''Scilab,''' please refer to the '''Scilab tutorials''' available on the '''Spoken Tutorial website.'''  
 
| For '''Scilab,''' please refer to the '''Scilab tutorials''' available on the '''Spoken Tutorial website.'''  
  
 
|-
 
|-
|00.55
+
|00:55
 
|In this tutorial, I will describe how to define '''second-order linear system.'''  
 
|In this tutorial, I will describe how to define '''second-order linear system.'''  
  
 
|-
 
|-
|01.02
+
|01:02
 
| So, first we have to define '''complex domain variable 's'.'''  
 
| So, first we have to define '''complex domain variable 's'.'''  
  
 
|-
 
|-
  
|01.08
+
|01:08
  
 
|Let us switch to the ''' Scilab console window. '''
 
|Let us switch to the ''' Scilab console window. '''
Line 76: Line 76:
 
|-
 
|-
  
|01.11
+
|01:11
 
|Here type ''' s equal to poly open paranthesis zero comma open single quote s close single quote close paranthesis''' , press '''Enter.'''  
 
|Here type ''' s equal to poly open paranthesis zero comma open single quote s close single quote close paranthesis''' , press '''Enter.'''  
  
Line 83: Line 83:
 
|-
 
|-
  
| 01.25
+
| 01:25
  
 
|The output is  ''' 's'. '''   
 
|The output is  ''' 's'. '''   
Line 90: Line 90:
 
|-
 
|-
  
| 01.27
+
| 01:27
 
|There is another way to define ''' 's' ''' as '''continuous time complex variable. '''
 
|There is another way to define ''' 's' ''' as '''continuous time complex variable. '''
  
 
|-
 
|-
  
|01.32
+
|01:32
  
 
|On the '''console''' window, type:  
 
|On the '''console''' window, type:  
Line 102: Line 102:
 
|-
 
|-
  
|01.35
+
|01:35
  
 
| ''' s equal to percentage s''',  press '''Enter.'''  
 
| ''' s equal to percentage s''',  press '''Enter.'''  
Line 109: Line 109:
  
 
|-
 
|-
|01.41
+
|01:41
 
|Let us study the ''' syslin Scilab command.'''  
 
|Let us study the ''' syslin Scilab command.'''  
 
   
 
   
 
|-
 
|-
  
|01.44
+
|01:44
  
 
|Use the '''Scilab''' function ''' ’syslin’ ''' to define the continuous time system.  
 
|Use the '''Scilab''' function ''' ’syslin’ ''' to define the continuous time system.  
Line 121: Line 121:
 
|-
 
|-
  
|01.51
+
|01:51
  
 
||''' G of s is equal to 2 over 9 plus 2 s plus s square'''
 
||''' G of s is equal to 2 over 9 plus 2 s plus s square'''
Line 128: Line 128:
  
 
|-
 
|-
|01.58
+
|01:58
 
|Use ''' csim'''  with '''step''' option, to obtain ''' the step response''' and then plot the step response.  
 
|Use ''' csim'''  with '''step''' option, to obtain ''' the step response''' and then plot the step response.  
  
Line 134: Line 134:
 
|-
 
|-
  
| 02.06
+
| 02:06
 
|Let us switch to the '''Scilab console''' window.  
 
|Let us switch to the '''Scilab console''' window.  
  
 
|-
 
|-
  
|02.09
+
|02:09
  
 
||Here type:''' sys capital G equal to syslin open paranthesis open single quote c close single quote comma two divide by open paranthesis s square plus two asterik s plus nine close paranthesis close paranthesis '''
 
||Here type:''' sys capital G equal to syslin open paranthesis open single quote c close single quote comma two divide by open paranthesis s square plus two asterik s plus nine close paranthesis close paranthesis '''
Line 145: Line 145:
 
|-
 
|-
  
|02.32
+
|02:32
  
 
| Here '''c''' is used  as we are defining a continuous time system.  
 
| Here '''c''' is used  as we are defining a continuous time system.  
Line 151: Line 151:
 
|-
 
|-
  
|02.38
+
|02:38
  
 
| Press '''Enter'''
 
| Press '''Enter'''
Line 157: Line 157:
 
|-
 
|-
  
| 02.40
+
| 02:40
  
 
||The output is linear second order system represented by  
 
||The output is linear second order system represented by  
Line 163: Line 163:
  
 
|-
 
|-
| 02.44
+
| 02:44
 
|'''2 over 9 plus 2 s plus s square'''  
 
|'''2 over 9 plus 2 s plus s square'''  
 
   
 
   
Line 169: Line 169:
  
 
|-
 
|-
|02.49
+
|02:49
 
| Then type ''' t equal to zero colon zero point one colon ten semicolon'''  
 
| Then type ''' t equal to zero colon zero point one colon ten semicolon'''  
  
Line 175: Line 175:
  
 
|-
 
|-
|02.57
+
|02:57
 
| Press '''Enter.'''  
 
| Press '''Enter.'''  
  
  
 
|-
 
|-
| 02.59
+
| 02:59
 
|Then type  ''' y one is equal to c sim open paranthesis open single quote step close single quote comma t comma sys capital G close the paranthesis semicolon'''  
 
|Then type  ''' y one is equal to c sim open paranthesis open single quote step close single quote comma t comma sys capital G close the paranthesis semicolon'''  
  
 
|-
 
|-
| 03.15
+
| 03:15
 
|Press '''Enter. '''
 
|Press '''Enter. '''
  
Line 190: Line 190:
  
 
|-
 
|-
| 03.17
+
| 03:17
 
|Then type ''' plot open paranthesis t comma y one close paranthesis semicolon'''  
 
|Then type ''' plot open paranthesis t comma y one close paranthesis semicolon'''  
  
 
|-
 
|-
| 03.24
+
| 03:24
 
|Press ''' Enter.'''
 
|Press ''' Enter.'''
  
 
|-
 
|-
|03.26
+
|03:26
 
|The output will display the ''' step response of the given second order system.'''
 
|The output will display the ''' step response of the given second order system.'''
  
 
|-
 
|-
|03.33
+
|03:33
 
|Let us study the ''' Second Order system response for sine input.'''  
 
|Let us study the ''' Second Order system response for sine input.'''  
  
Line 208: Line 208:
 
|-
 
|-
  
| 03.39
+
| 03:39
  
 
|''' Sine inputs''' can easily be given as inputs to a  ''' second order system to a continuous time system.'''  
 
|''' Sine inputs''' can easily be given as inputs to a  ''' second order system to a continuous time system.'''  
Line 214: Line 214:
 
|-
 
|-
  
| 03.47
+
| 03:47
 
|Let us switch to the '''Scilab console''' window.
 
|Let us switch to the '''Scilab console''' window.
  
Line 220: Line 220:
 
|-
 
|-
  
|03.51
+
|03:51
  
 
|| Type ''' U two is equal to sine open paranthesis t close paranthesis semicolon'''  
 
|| Type ''' U two is equal to sine open paranthesis t close paranthesis semicolon'''  
Line 226: Line 226:
 
|-
 
|-
  
| 03.59
+
| 03:59
 
| Press ''' Enter. '''
 
| Press ''' Enter. '''
  
Line 233: Line 233:
 
|-
 
|-
  
| 04.01
+
| 04:01
  
 
|Then type ''' y two is equal to c sim open paranthesis u two comma t comma sys capital G close the bracket semicolon '''
 
|Then type ''' y two is equal to c sim open paranthesis u two comma t comma sys capital G close the bracket semicolon '''
Line 241: Line 241:
 
|-
 
|-
  
| 04.15
+
| 04:15
  
 
| Press ''' Enter'''
 
| Press ''' Enter'''
Line 247: Line 247:
 
|-
 
|-
  
|04.17
+
|04:17
  
 
||Here we are using ''' sysG, the continuous time second order system''' we had defined earlier.  
 
||Here we are using ''' sysG, the continuous time second order system''' we had defined earlier.  
Line 254: Line 254:
 
|-
 
|-
  
|04.25
+
|04:25
  
 
|'Then type '''plot open paranthesis t comma open square bracket u two semicolon y two close square bracket close paranthesis '''
 
|'Then type '''plot open paranthesis t comma open square bracket u two semicolon y two close square bracket close paranthesis '''
Line 261: Line 261:
 
|-
 
|-
  
| 04.39
+
| 04:39
  
 
|Make sure that you place a '''semicolon''' between '''u2''' and '''y2''' because '''u2''' and '''y2''' are row vectors of the same size.  
 
|Make sure that you place a '''semicolon''' between '''u2''' and '''y2''' because '''u2''' and '''y2''' are row vectors of the same size.  
Line 270: Line 270:
 
|-
 
|-
  
| 04.50
+
| 04:50
  
 
|'Press '''Enter.'''  
 
|'Press '''Enter.'''  
Line 277: Line 277:
 
|-
 
|-
  
| 04.52
+
| 04:52
  
 
| This plot shows the '''response of the system''' to a '''step input''' and '''sine input.''' It is called the '''response plot. '''
 
| This plot shows the '''response of the system''' to a '''step input''' and '''sine input.''' It is called the '''response plot. '''
Line 283: Line 283:
 
|-
 
|-
  
| 05.01
+
| 05:01
  
 
|'''Response Plot''' plots both the input and the output on the same graph.  
 
|'''Response Plot''' plots both the input and the output on the same graph.  
Line 289: Line 289:
 
|-
 
|-
  
| 05.06
+
| 05:06
  
 
|As expected, the output is also a ''' sine wave,''' and  
 
|As expected, the output is also a ''' sine wave,''' and  
Line 296: Line 296:
 
|-
 
|-
  
| 05.11
+
| 05:11
  
 
|there is a '''phase lag''' between the input and output
 
|there is a '''phase lag''' between the input and output
Line 302: Line 302:
 
|-
 
|-
  
| 05.15
+
| 05:15
  
 
|'''Amplitude''' is different for the input and the output, as it is being passed through a '''transfer''' function.  
 
|'''Amplitude''' is different for the input and the output, as it is being passed through a '''transfer''' function.  
Line 310: Line 310:
 
|-
 
|-
  
| 05.23
+
| 05:23
  
 
|This is a typical '''under-damped''' example.  
 
|This is a typical '''under-damped''' example.  
Line 317: Line 317:
 
|-
 
|-
  
|05.26
+
|05:26
  
 
|Let us plot ''' bode plot of 2 over 9 plus 2 s plus s square'''
 
|Let us plot ''' bode plot of 2 over 9 plus 2 s plus s square'''
Line 323: Line 323:
 
|-
 
|-
  
| 05.32
+
| 05:32
  
 
|Please note command ''''f r e q'''' is a '''Scilab''' command for '''frequency response.'''
 
|Please note command ''''f r e q'''' is a '''Scilab''' command for '''frequency response.'''
Line 329: Line 329:
 
|-
 
|-
  
| 05.39
+
| 05:39
  
 
| Do not use '''f r e q as a variable !!'''  
 
| Do not use '''f r e q as a variable !!'''  
Line 336: Line 336:
 
|-
 
|-
  
| 05.44
+
| 05:44
  
 
|Open the ''' Scilab console''' and type  
 
|Open the ''' Scilab console''' and type  
 
|-
 
|-
  
| 05.47
+
| 05:47
  
 
|''' f r is equal to open square bracket zero point zero one colon zero point one colon ten close square bracket semicolon. '''
 
|''' f r is equal to open square bracket zero point zero one colon zero point one colon ten close square bracket semicolon. '''
Line 347: Line 347:
  
 
|-
 
|-
| 06.00
+
| 06:00
 
| Press '''Enter. '''
 
| Press '''Enter. '''
  
 
|-
 
|-
| 06.03
+
| 06:03
 
|The '''frequency''' is in '''Hertz.'''  
 
|The '''frequency''' is in '''Hertz.'''  
  
 
|-
 
|-
  
| 06.06
+
| 06:06
  
 
|Then type '''bode open paranthesis sys capital G comma fr close paranthesis '''
 
|Then type '''bode open paranthesis sys capital G comma fr close paranthesis '''
Line 364: Line 364:
 
|-
 
|-
  
| 06.15
+
| 06:15
  
 
| and press ''Enter.'''  
 
| and press ''Enter.'''  
Line 372: Line 372:
 
|-
 
|-
  
| 06.17
+
| 06:17
  
 
| The '''bode plot''' is shown  
 
| The '''bode plot''' is shown  
Line 378: Line 378:
 
|-
 
|-
  
| 06.20
+
| 06:20
  
 
| Let us define another system.  
 
| Let us define another system.  
Line 385: Line 385:
 
|-
 
|-
  
| 06.23
+
| 06:23
  
 
|We have an ''' over-damped system p equal to s square plus nine s plus nine '''
 
|We have an ''' over-damped system p equal to s square plus nine s plus nine '''
Line 392: Line 392:
 
|-
 
|-
  
| 06.32
+
| 06:32
  
 
| Let us plot '''step response''' for this system.  
 
| Let us plot '''step response''' for this system.  
Line 399: Line 399:
 
|-
 
|-
  
| 06.36
+
| 06:36
  
 
|Switch to '''Scilab console. '''
 
|Switch to '''Scilab console. '''
Line 405: Line 405:
 
|-
 
|-
  
| 06.38
+
| 06:38
  
 
|Type this on your ''' console.'''  
 
|Type this on your ''' console.'''  
Line 411: Line 411:
 
|-
 
|-
  
| 06.40
+
| 06:40
  
 
|''' p is equal to s square plus nine asterik s plus nine'''
 
|''' p is equal to s square plus nine asterik s plus nine'''
Line 417: Line 417:
 
|-
 
|-
  
| 06.47
+
| 06:47
  
 
|and then press ''' Enter. '''
 
|and then press ''' Enter. '''
Line 423: Line 423:
 
|-
 
|-
  
| 06.49
+
| 06:49
  
 
|Then type this on your ''' console.'''  
 
|Then type this on your ''' console.'''  
Line 429: Line 429:
 
|-
 
|-
  
| 06.51
+
| 06:51
  
 
|''' sys two is equal to syslin open paranthesis open single quote c close single quote comma nine divided by p close paranthesis '''
 
|''' sys two is equal to syslin open paranthesis open single quote c close single quote comma nine divided by p close paranthesis '''
Line 435: Line 435:
 
|-
 
|-
  
| 07.04
+
| 07:04
  
 
|and press ''' Enter.'''
 
|and press ''' Enter.'''
Line 441: Line 441:
 
|-
 
|-
  
| 07.07
+
| 07:07
  
 
|Then type '''t equal to zero colon zero point one colon ten semicolon '''
 
|Then type '''t equal to zero colon zero point one colon ten semicolon '''
Line 447: Line 447:
 
|-
 
|-
  
| 07.14
+
| 07:14
  
 
|Press ''' Enter.'''  
 
|Press ''' Enter.'''  
Line 454: Line 454:
 
|-
 
|-
  
| 07.17
+
| 07:17
  
 
|''' y is equal to c sim open paranthesis open single quote step close single quote comma t comma sys two close the paranthesis semicolon'''
 
|''' y is equal to c sim open paranthesis open single quote step close single quote comma t comma sys two close the paranthesis semicolon'''
Line 460: Line 460:
 
|-
 
|-
  
| 07.31
+
| 07:31
  
 
|Press '''Enter'''.
 
|Press '''Enter'''.
Line 466: Line 466:
 
|-
 
|-
  
| 07.33
+
| 07:33
  
 
|Then type ''' plot open paranthesis t comma y close paranthesis'''
 
|Then type ''' plot open paranthesis t comma y close paranthesis'''
Line 472: Line 472:
 
|-
 
|-
  
| 07.39
+
| 07:39
  
 
|Press ''' Enter.'''
 
|Press ''' Enter.'''
Line 478: Line 478:
 
|-
 
|-
  
| 07.41
+
| 07:41
  
 
|The ''' response plot for over damped system is shown.'''  
 
|The ''' response plot for over damped system is shown.'''  
Line 484: Line 484:
 
|-
 
|-
  
| 07.46
+
| 07:46
  
 
|To find the ''' roots of p'''  type this on your '''console - '''
 
|To find the ''' roots of p'''  type this on your '''console - '''
Line 490: Line 490:
 
|-
 
|-
  
| 07.49
+
| 07:49
  
 
|''' Roots of p''' and press '''Enter.'''  
 
|''' Roots of p''' and press '''Enter.'''  
Line 497: Line 497:
 
|-
 
|-
  
| 07.54
+
| 07:54
  
 
|These '''roots''' are the poles of the system '''sys two'''
 
|These '''roots''' are the poles of the system '''sys two'''
Line 503: Line 503:
 
|-
 
|-
  
| 07.59
+
| 07:59
  
 
|The '''roots or poles''' of the system are shown.  
 
|The '''roots or poles''' of the system are shown.  
Line 509: Line 509:
 
|-
 
|-
  
| 08.02
+
| 08:02
  
 
|Please plot '''Step response''' for this system along similar lines, as for '''over damped system. '''
 
|Please plot '''Step response''' for this system along similar lines, as for '''over damped system. '''
Line 515: Line 515:
 
|-
 
|-
  
| 08.11
+
| 08:11
  
 
|'''G of s is equal to 2 over 9 plus 6 s plus s square''' which is a '''critically damped system'''
 
|'''G of s is equal to 2 over 9 plus 6 s plus s square''' which is a '''critically damped system'''
Line 521: Line 521:
 
|-
 
|-
  
| 08.20
+
| 08:20
  
 
|Then '''G of s is equal to two over 9 plus s square''' which is an '''undamped system'''
 
|Then '''G of s is equal to two over 9 plus s square''' which is an '''undamped system'''
Line 527: Line 527:
 
|-
 
|-
  
| 08.28
+
| 08:28
  
 
|'''G of s is equal to 2 over 9 minus 6 s plus s square''' which is an '''unstable system'''
 
|'''G of s is equal to 2 over 9 minus 6 s plus s square''' which is an '''unstable system'''
Line 533: Line 533:
 
|-
 
|-
  
| 08.36
+
| 08:36
  
 
|Check '''response to sinusoidal inputs''' for all the cases and '''plot bode plot''' too.  
 
|Check '''response to sinusoidal inputs''' for all the cases and '''plot bode plot''' too.  
Line 539: Line 539:
 
|-
 
|-
  
| 08.45
+
| 08:45
  
 
|Switch to ''' Scilab console. ;'''
 
|Switch to ''' Scilab console. ;'''
Line 545: Line 545:
 
|-
 
|-
  
| 08.48
+
| 08:48
  
 
|For a general '''transfer function''', the numerator and denominator can be specified separately.
 
|For a general '''transfer function''', the numerator and denominator can be specified separately.
Line 551: Line 551:
 
|-
 
|-
  
| 08.55
+
| 08:55
  
 
| Let me show you how.  
 
| Let me show you how.  
Line 558: Line 558:
 
|-
 
|-
  
| 08.57
+
| 08:57
  
 
|Type on  '''console'''
 
|Type on  '''console'''
Line 564: Line 564:
 
|-
 
|-
  
| 08.59
+
| 08:59
  
 
|''' sys three is equal to syslin open paranthesis open single quote c close single quote comma s plus six comma s square plus six asterik s plus nineteen close paranthesis'''
 
|''' sys three is equal to syslin open paranthesis open single quote c close single quote comma s plus six comma s square plus six asterik s plus nineteen close paranthesis'''
Line 570: Line 570:
 
|-
 
|-
  
| 09.19
+
| 09:19
  
 
|Press '''Enter'''  
 
|Press '''Enter'''  
Line 577: Line 577:
 
|-
 
|-
  
| 09.21
+
| 09:21
  
 
|Another way of defining a system, is to type  
 
|Another way of defining a system, is to type  
Line 583: Line 583:
 
|-
 
|-
  
| 09.24
+
| 09:24
  
 
|'''g is equal to open paranthesis s plus six close paranthesis divided by open paranthesis s square plus six asterik s plus nineteen close paranthesis'''
 
|'''g is equal to open paranthesis s plus six close paranthesis divided by open paranthesis s square plus six asterik s plus nineteen close paranthesis'''
Line 590: Line 590:
 
|-
 
|-
  
| 09.40
+
| 09:40
  
 
|Press '''Enter.'''
 
|Press '''Enter.'''
Line 597: Line 597:
 
|-
 
|-
  
| 09.42
+
| 09:42
  
 
|Then type this on your '''console'''
 
|Then type this on your '''console'''
Line 603: Line 603:
 
|-
 
|-
  
| 09.44
+
| 09:44
  
 
|'''sys four is equal to syslin open paranthesis open single quote c close single quote comma g close paranthesis '''
 
|'''sys four is equal to syslin open paranthesis open single quote c close single quote comma g close paranthesis '''
Line 609: Line 609:
 
|-
 
|-
  
| 09.55
+
| 09:55
  
 
|Press '''Enter.'''
 
|Press '''Enter.'''
Line 615: Line 615:
 
|-
 
|-
  
| 09.58
+
| 09:58
  
 
|Both ways, we get the same output;  
 
|Both ways, we get the same output;  
Line 622: Line 622:
 
|-
 
|-
  
| 10.01
+
| 10:01
  
 
|'''six plus s over 19 plus six s plus s square '''
 
|'''six plus s over 19 plus six s plus s square '''
Line 629: Line 629:
 
|-
 
|-
  
| 10.07
+
| 10:07
  
 
|The variable '''’sys’ is of type ’rational’. '''
 
|The variable '''’sys’ is of type ’rational’. '''
Line 635: Line 635:
 
|-
 
|-
  
| 10.10
+
| 10:10
  
 
|Its numerator and denominator can be extracted by various ways.  
 
|Its numerator and denominator can be extracted by various ways.  
Line 641: Line 641:
 
|-
 
|-
  
| 10.16
+
| 10:16
  
 
|'''Sys of two , numer of sys or numer of g''' gives the numerator.  
 
|'''Sys of two , numer of sys or numer of g''' gives the numerator.  
Line 648: Line 648:
 
|-
 
|-
  
| 10.22
+
| 10:22
  
 
|The denominator can be calculated using '''sys(3) or denom of sys functions. '''
 
|The denominator can be calculated using '''sys(3) or denom of sys functions. '''
Line 655: Line 655:
 
|-
 
|-
  
| 10.30
+
| 10:30
  
 
|The poles and zeros of the system can be plotted using p l z r function.  
 
|The poles and zeros of the system can be plotted using p l z r function.  
Line 661: Line 661:
 
|-
 
|-
  
| 10.37
+
| 10:37
  
 
|The syntax is p l z r of sys  
 
|The syntax is p l z r of sys  
Line 668: Line 668:
 
|-
 
|-
  
| 10.41
+
| 10:41
  
 
|The plot shows x for poles and circles for zeros.  
 
|The plot shows x for poles and circles for zeros.  
Line 675: Line 675:
 
|-
 
|-
  
| 10.46
+
| 10:46
  
 
|Switch to Scilab console.
 
|Switch to Scilab console.
Line 681: Line 681:
 
|-
 
|-
  
| 10.48
+
| 10:48
  
 
|Type this on your Scilab console.  
 
|Type this on your Scilab console.  
Line 687: Line 687:
 
|-
 
|-
  
| 10.50
+
| 10:50
  
 
|sys three open paranthesis two close paranthesis  
 
|sys three open paranthesis two close paranthesis  
Line 694: Line 694:
 
|-
 
|-
  
| 10.55
+
| 10:55
  
 
|Press Enter.
 
|Press Enter.
Line 700: Line 700:
 
|-
 
|-
  
| 10.56
+
| 10:56
  
 
|This gives the numerator of the rational function 'sys three' that is 6 + s  
 
|This gives the numerator of the rational function 'sys three' that is 6 + s  
Line 707: Line 707:
 
|-
 
|-
  
| 11.03
+
| 11:03
  
 
|Otherwise, you can type  
 
|Otherwise, you can type  
Line 714: Line 714:
 
|-
 
|-
  
| 11.05
+
| 11:05
  
 
|numer open paranthesis sys three close paranthesis.
 
|numer open paranthesis sys three close paranthesis.
Line 720: Line 720:
 
|-
 
|-
  
| 11.11
+
| 11:11
  
 
|Press Enter
 
|Press Enter
Line 726: Line 726:
 
|-
 
|-
  
| 11.13
+
| 11:13
  
 
|The numerator of system three is shown.  
 
|The numerator of system three is shown.  
Line 732: Line 732:
 
|-
 
|-
  
| 11.17
+
| 11:17
  
 
|To get the denominator, type  
 
|To get the denominator, type  
Line 738: Line 738:
 
|-
 
|-
  
| 11.19
+
| 11:19
  
 
|sys three open paranthesis three close paranthesis. Press Enter.  
 
|sys three open paranthesis three close paranthesis. Press Enter.  
Line 745: Line 745:
 
|-
 
|-
  
| 11.26
+
| 11:26
  
 
|The denominator of the function is shown.  
 
|The denominator of the function is shown.  
Line 751: Line 751:
 
|-
 
|-
  
| 11.30
+
| 11:30
  
 
|You can also type denom open paranthesis sys three close paranthesis.
 
|You can also type denom open paranthesis sys three close paranthesis.
Line 757: Line 757:
 
|-
 
|-
  
| 11.36
+
| 11:36
  
 
|Press Enter.  
 
|Press Enter.  
Line 764: Line 764:
 
|-
 
|-
  
| 11.38
+
| 11:38
  
 
|Then type p l z r open paranthesis sys three close paranthesis.
 
|Then type p l z r open paranthesis sys three close paranthesis.
Line 770: Line 770:
 
|-
 
|-
  
| 11.44
+
| 11:44
  
 
|Press Enter.  
 
|Press Enter.  
Line 776: Line 776:
 
|-
 
|-
  
| 11.47
+
| 11:47
  
 
|The output graph plots the poles and zeros.  
 
|The output graph plots the poles and zeros.  
Line 782: Line 782:
 
|-
 
|-
  
| 11.50
+
| 11:50
  
 
|It shows cross and circle' for poles and zeros of the system respectively.  
 
|It shows cross and circle' for poles and zeros of the system respectively.  
Line 789: Line 789:
 
|-
 
|-
  
| 11.58
+
| 11:58
  
 
|It is plotted on the complex plane.  
 
|It is plotted on the complex plane.  
Line 796: Line 796:
 
|-
 
|-
  
| 12.01
+
| 12:01
  
 
|In this tutorial, we have learnt how to:  
 
|In this tutorial, we have learnt how to:  
Line 802: Line 802:
 
|-
 
|-
  
| 12.03
+
| 12:03
  
 
|Define a system by its transfer function.  
 
|Define a system by its transfer function.  
Line 808: Line 808:
 
|-
 
|-
  
| 12.08
+
| 12:08
  
 
|Plot step and sinusoidal responses.  
 
|Plot step and sinusoidal responses.  
Line 814: Line 814:
 
|-
 
|-
  
| 12.11
+
| 12:11
  
 
|Extract poles and zeros of a transfer function.  
 
|Extract poles and zeros of a transfer function.  
Line 820: Line 820:
  
 
|-
 
|-
|12.15
+
|12:15
 
| Watch the video available at the following link
 
| Watch the video available at the following link
  
 
|-
 
|-
  
| 12.19
+
| 12:19
  
 
| It summarises the Spoken Tutorial project  
 
| It summarises the Spoken Tutorial project  
Line 833: Line 833:
 
|-
 
|-
  
|12.22
+
|12:22
  
 
||If you do not have good bandwidth, you can download and watch it  
 
||If you do not have good bandwidth, you can download and watch it  
Line 839: Line 839:
 
|-
 
|-
  
|12.27
+
|12:27
  
 
||The spoken tutorial project Team
 
||The spoken tutorial project Team
Line 845: Line 845:
 
|-
 
|-
  
|12.29
+
|12:29
  
 
||Conducts workshops using spoken tutorials  
 
||Conducts workshops using spoken tutorials  
Line 852: Line 852:
 
|-
 
|-
  
|12.32
+
|12:32
  
 
||Gives certificates to those who pass an online test  
 
||Gives certificates to those who pass an online test  
Line 859: Line 859:
 
|-
 
|-
  
|12.36
+
|12:36
  
 
||For more details, please write to contact@spoken-tutorial.org  
 
||For more details, please write to contact@spoken-tutorial.org  
Line 866: Line 866:
 
|-
 
|-
  
|12.43
+
|12:43
  
 
|Spoken Tutorial Project is a part of the Talk to a Teacher project  
 
|Spoken Tutorial Project is a part of the Talk to a Teacher project  
Line 874: Line 874:
 
|-
 
|-
  
| 12.47
+
| 12:47
  
 
| It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.  
 
| It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.  
 
|-
 
|-
  
| 12.55
+
| 12:55
  
 
|More information on this mission is available at spoken-tutorial.org/NMEICT-Intro
 
|More information on this mission is available at spoken-tutorial.org/NMEICT-Intro
Line 885: Line 885:
 
|-
 
|-
  
| 13.06
+
| 13:06
  
 
|This is Ashwini Patil signing off.
 
|This is Ashwini Patil signing off.
Line 891: Line 891:
 
|-
 
|-
  
|13.08
+
|13:08
  
 
| Thank you for joining Good Bye.
 
| Thank you for joining Good Bye.

Revision as of 10:57, 11 July 2014

Time Narration
00:01 Dear Friends,
00:02
00:09 At the end of this tutorial, you will learn how to
00:12 Define a continuous time system: second and higher order


00:17 Plot response to step and sine inputs


00:20 Do a Bode plot
00:22 Study numer and denom Scilab functions


00:26 Plot poles and zeros of a system
00:30 To record this tutorial, I am using
00:33 Ubuntu 12.04 as the operating system with
00:36 Scilab 5.3.3 version
00:40 Before practising this tutorial, a learner should have basic knowledge of Scilab and control systems.
00:48 For Scilab, please refer to the Scilab tutorials available on the Spoken Tutorial website.
00:55 In this tutorial, I will describe how to define second-order linear system.
01:02 So, first we have to define complex domain variable 's'.
01:08 Let us switch to the Scilab console window.
01:11 Here type s equal to poly open paranthesis zero comma open single quote s close single quote close paranthesis , press Enter.


01:25 The output is 's'.


01:27 There is another way to define 's' as continuous time complex variable.
01:32 On the console window, type:


01:35 s equal to percentage s, press Enter.


01:41 Let us study the syslin Scilab command.
01:44 Use the Scilab function ’syslin’ to define the continuous time system.


01:51 G of s is equal to 2 over 9 plus 2 s plus s square


01:58 Use csim with step option, to obtain the step response and then plot the step response.


02:06 Let us switch to the Scilab console window.
02:09 Here type: sys capital G equal to syslin open paranthesis open single quote c close single quote comma two divide by open paranthesis s square plus two asterik s plus nine close paranthesis close paranthesis
02:32 Here c is used as we are defining a continuous time system.
02:38 Press Enter
02:40 The output is linear second order system represented by


02:44 2 over 9 plus 2 s plus s square


02:49 Then type t equal to zero colon zero point one colon ten semicolon


02:57 Press Enter.


02:59 Then type y one is equal to c sim open paranthesis open single quote step close single quote comma t comma sys capital G close the paranthesis semicolon
03:15 Press Enter.


03:17 Then type plot open paranthesis t comma y one close paranthesis semicolon
03:24 Press Enter.
03:26 The output will display the step response of the given second order system.
03:33 Let us study the Second Order system response for sine input.


03:39 Sine inputs can easily be given as inputs to a second order system to a continuous time system.
03:47 Let us switch to the Scilab console window.


03:51 Type U two is equal to sine open paranthesis t close paranthesis semicolon
03:59 Press Enter.


04:01 Then type y two is equal to c sim open paranthesis u two comma t comma sys capital G close the bracket semicolon


04:15 Press Enter
04:17 Here we are using sysG, the continuous time second order system we had defined earlier.


04:25 'Then type plot open paranthesis t comma open square bracket u two semicolon y two close square bracket close paranthesis


04:39 Make sure that you place a semicolon between u2 and y2 because u2 and y2 are row vectors of the same size.



04:50 'Press Enter.


04:52 This plot shows the response of the system to a step input and sine input. It is called the response plot.
05:01 Response Plot plots both the input and the output on the same graph.
05:06 As expected, the output is also a sine wave, and


05:11 there is a phase lag between the input and output
05:15 Amplitude is different for the input and the output, as it is being passed through a transfer function.


05:23 This is a typical under-damped example.


05:26 Let us plot bode plot of 2 over 9 plus 2 s plus s square
05:32 Please note command 'f r e q' is a Scilab command for frequency response.
05:39 Do not use f r e q as a variable !!


05:44 Open the Scilab console and type
05:47 f r is equal to open square bracket zero point zero one colon zero point one colon ten close square bracket semicolon.


06:00 Press Enter.
06:03 The frequency is in Hertz.
06:06 Then type bode open paranthesis sys capital G comma fr close paranthesis


06:15 and press Enter.'


06:17 The bode plot is shown
06:20 Let us define another system.


06:23 We have an over-damped system p equal to s square plus nine s plus nine


06:32 Let us plot step response for this system.


06:36 Switch to Scilab console.
06:38 Type this on your console.
06:40 p is equal to s square plus nine asterik s plus nine
06:47 and then press Enter.
06:49 Then type this on your console.
06:51 sys two is equal to syslin open paranthesis open single quote c close single quote comma nine divided by p close paranthesis
07:04 and press Enter.
07:07 Then type t equal to zero colon zero point one colon ten semicolon
07:14 Press Enter.


07:17 y is equal to c sim open paranthesis open single quote step close single quote comma t comma sys two close the paranthesis semicolon
07:31 Press Enter.
07:33 Then type plot open paranthesis t comma y close paranthesis
07:39 Press Enter.
07:41 The response plot for over damped system is shown.
07:46 To find the roots of p type this on your console -
07:49 Roots of p and press Enter.


07:54 These roots are the poles of the system sys two
07:59 The roots or poles of the system are shown.
08:02 Please plot Step response for this system along similar lines, as for over damped system.
08:11 G of s is equal to 2 over 9 plus 6 s plus s square which is a critically damped system
08:20 Then G of s is equal to two over 9 plus s square which is an undamped system
08:28 G of s is equal to 2 over 9 minus 6 s plus s square which is an unstable system
08:36 Check response to sinusoidal inputs for all the cases and plot bode plot too.
08:45 Switch to Scilab console. ;
08:48 For a general transfer function, the numerator and denominator can be specified separately.
08:55 Let me show you how.


08:57 Type on console
08:59 sys three is equal to syslin open paranthesis open single quote c close single quote comma s plus six comma s square plus six asterik s plus nineteen close paranthesis
09:19 Press Enter


09:21 Another way of defining a system, is to type
09:24 g is equal to open paranthesis s plus six close paranthesis divided by open paranthesis s square plus six asterik s plus nineteen close paranthesis


09:40 Press Enter.


09:42 Then type this on your console
09:44 sys four is equal to syslin open paranthesis open single quote c close single quote comma g close paranthesis
09:55 Press Enter.
09:58 Both ways, we get the same output;


10:01 six plus s over 19 plus six s plus s square


10:07 The variable ’sys’ is of type ’rational’.
10:10 Its numerator and denominator can be extracted by various ways.
10:16 Sys of two , numer of sys or numer of g gives the numerator.


10:22 The denominator can be calculated using sys(3) or denom of sys functions.


10:30 The poles and zeros of the system can be plotted using p l z r function.
10:37 The syntax is p l z r of sys


10:41 The plot shows x for poles and circles for zeros.


10:46 Switch to Scilab console.
10:48 Type this on your Scilab console.
10:50 sys three open paranthesis two close paranthesis


10:55 Press Enter.
10:56 This gives the numerator of the rational function 'sys three' that is 6 + s


11:03 Otherwise, you can type


11:05 numer open paranthesis sys three close paranthesis.
11:11 Press Enter
11:13 The numerator of system three is shown.
11:17 To get the denominator, type
11:19 sys three open paranthesis three close paranthesis. Press Enter.


11:26 The denominator of the function is shown.
11:30 You can also type denom open paranthesis sys three close paranthesis.
11:36 Press Enter.


11:38 Then type p l z r open paranthesis sys three close paranthesis.
11:44 Press Enter.
11:47 The output graph plots the poles and zeros.
11:50 It shows cross and circle' for poles and zeros of the system respectively.


11:58 It is plotted on the complex plane.


12:01 In this tutorial, we have learnt how to:
12:03 Define a system by its transfer function.
12:08 Plot step and sinusoidal responses.
12:11 Extract poles and zeros of a transfer function.


12:15 Watch the video available at the following link
12:19 It summarises the Spoken Tutorial project


12:22 If you do not have good bandwidth, you can download and watch it
12:27 The spoken tutorial project Team
12:29 Conducts workshops using spoken tutorials


12:32 Gives certificates to those who pass an online test


12:36 For more details, please write to contact@spoken-tutorial.org


12:43 Spoken Tutorial Project is a part of the Talk to a Teacher project


12:47 It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.
12:55 More information on this mission is available at spoken-tutorial.org/NMEICT-Intro
13:06 This is Ashwini Patil signing off.
13:08 Thank you for joining Good Bye.

Contributors and Content Editors

Devraj, Gaurav, PoojaMoolya, Sandhya.np14