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

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| Border=1 || Time || Narration |- | 00.01 |Dear Friends, |- | 00.02 | Welcome to the Spoken Tutorial on ''' “Discrete Time System” ''' |- | 00.07 | In this Tutorial …')
 
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  ''' “Discrete Time System” '''
 
| Welcome to the Spoken Tutorial on  ''' “Discrete Time System” '''
  
 
|-
 
|-
| 00.07
+
| 00:07
 
| In this Tutorial we will learn to
 
| In this Tutorial we will learn to
  
 
|-
 
|-
|00.09
+
|00:09
 
|Convert between ''' state space and transfer function''' descriptions   
 
|Convert between ''' state space and transfer function''' descriptions   
  
  
 
|-
 
|-
|00.14
+
|00:14
 
|Define a ''' discrete time system and plot its step response '''
 
|Define a ''' discrete time system and plot its step response '''
  
  
 
|-
 
|-
| 00.20
+
| 00:20
 
| ''' Discretize a continuous time system'''  
 
| ''' Discretize a continuous time system'''  
  
 
|-
 
|-
|00.23
+
|00:23
 
|I am using ''' Ubuntu 12.04''' operating system and  ''' Scilab 5.3.3''' for demonstation  
 
|I am using ''' Ubuntu 12.04''' operating system and  ''' Scilab 5.3.3''' for demonstation  
  
  
 
|-
 
|-
| 00.31
+
| 00:31
 
|To practise this tutorial, you should have basic knowledge of ''' Scilab.'''
 
|To practise this tutorial, you should have basic knowledge of ''' Scilab.'''
  
 
|-
 
|-
| 00.36
+
| 00:36
 
| If not, please refer to the Scilab tutorials available on  ''' spoken-tutorial.org '''  
 
| If not, please refer to the Scilab tutorials available on  ''' spoken-tutorial.org '''  
  
 
|-
 
|-
|00.44
+
|00:44
 
| ''' state space model'''
 
| ''' state space model'''
  
 
|-
 
|-
|00.46
+
|00:46
 
|'''x dot is equal to A x plus B u'''
 
|'''x dot is equal to A x plus B u'''
  
 
|-
 
|-
| 00.49
+
| 00:49
 
| ''' y is equal to c x plus D u'''
 
| ''' y is equal to c x plus D u'''
  
 
|-
 
|-
| 00.52
+
| 00:52
 
| is specified by ''' sys three is equal to syslin into bracket into quotes c comma A comma B comma C comma D close bracket'''
 
| is specified by ''' sys three is equal to syslin into bracket into quotes c comma A comma B comma C comma D close bracket'''
  
 
|-
 
|-
|01.05
+
|01:05
 
|for prespecified ''' matrices A, B, C and D''' of suitable sizes.  
 
|for prespecified ''' matrices A, B, C and D''' of suitable sizes.  
  
Line 67: Line 67:
  
 
|-
 
|-
|01.11
+
|01:11
 
| Start ''' Scilab''' on your computer  
 
| Start ''' Scilab''' on your computer  
  
 
|-
 
|-
  
|01.15
+
|01:15
  
 
|Type '''sys three is equal to syslin into bracket into quotes c comma four comma three comma six comma nine close bracket and press Enter. '''  
 
|Type '''sys three is equal to syslin into bracket into quotes c comma four comma three comma six comma nine close bracket and press Enter. '''  
Line 78: Line 78:
 
|-
 
|-
  
|01.32
+
|01:32
  
 
|'''Press enter to continue the display.'''
 
|'''Press enter to continue the display.'''
Line 84: Line 84:
 
|-
 
|-
  
|01.35
+
|01:35
 
|This is an example for  '''single state, Single Input Single Output'''
 
|This is an example for  '''single state, Single Input Single Output'''
  
Line 90: Line 90:
 
|-
 
|-
  
| 01.40
+
| 01:40
  
 
|The output will have matrices  ''' A, B, C and D and initial state x zero'''
 
|The output will have matrices  ''' A, B, C and D and initial state x zero'''
Line 97: Line 97:
 
|-
 
|-
  
| 01.49
+
| 01:49
 
|Type '''clc ''' to clear the '''console'''
 
|Type '''clc ''' to clear the '''console'''
  
 
|-
 
|-
  
|01.52
+
|01:52
  
 
|Define for example matrices ''' A, B, C, D''' on '''Scilab console''' as you see  
 
|Define for example matrices ''' A, B, C, D''' on '''Scilab console''' as you see  
Line 108: Line 108:
  
 
|-
 
|-
|02.00
+
|02:00
 
|''' A is equal to open square bracket two space three semicolon four space five close square bracket'''
 
|''' A is equal to open square bracket two space three semicolon four space five close square bracket'''
 
   
 
   
 
|-
 
|-
  
|02.09
+
|02:09
  
 
|'''Press enter'''
 
|'''Press enter'''
Line 120: Line 120:
 
|-
 
|-
  
|02.11
+
|02:11
  
 
|''' B is equal to open square bracket one semicolon two close the square bracket'''  
 
|''' B is equal to open square bracket one semicolon two close the square bracket'''  
Line 127: Line 127:
  
 
|-
 
|-
|02.17
+
|02:17
 
|'''Press enter '''
 
|'''Press enter '''
  
 
|-
 
|-
  
| 02.19
+
| 02:19
 
|''' C is equal to open square bracket minus three space minus six close the square bracket'''   
 
|''' C is equal to open square bracket minus three space minus six close the square bracket'''   
  
 
|-
 
|-
  
|02.27
+
|02:27
  
 
|And '''Press enter'''
 
|And '''Press enter'''
Line 143: Line 143:
 
|-
 
|-
  
|02.30
+
|02:30
  
 
| ''' D is equal to two '''
 
| ''' D is equal to two '''
Line 149: Line 149:
 
|-
 
|-
  
|02.33
+
|02:33
  
 
| '''Press Enter'''
 
| '''Press Enter'''
Line 155: Line 155:
 
|-
 
|-
  
| 02.35
+
| 02:35
  
 
|Let us substitute these matrices in the previous command  
 
|Let us substitute these matrices in the previous command  
Line 161: Line 161:
  
 
|-
 
|-
| 02.39
+
| 02:39
 
|''' sys four is equal to sys lin into brackets into quotes c comma A comma B comma C comma D close the bracket and press enter'''
 
|''' sys four is equal to sys lin into brackets into quotes c comma A comma B comma C comma D close the bracket and press enter'''
 
   
 
   
Line 167: Line 167:
  
 
|-
 
|-
|02.57
+
|02:57
 
| You will get the following output.  
 
| You will get the following output.  
  
  
 
|-
 
|-
|03.00
+
|03:00
 
| Press enter to continue the display.   
 
| Press enter to continue the display.   
  
  
 
|-
 
|-
| 03.03
+
| 03:03
 
|The output will have ''' matrices A B C D and initial state x zero ''' as you see
 
|The output will have ''' matrices A B C D and initial state x zero ''' as you see
  
 
|-
 
|-
| 03.11
+
| 03:11
 
|Check whether '''poles''' of ''' sys4''' are same as '''eigenvalues''' of '''A .'''  
 
|Check whether '''poles''' of ''' sys4''' are same as '''eigenvalues''' of '''A .'''  
  
Line 187: Line 187:
  
 
|-
 
|-
| 03.17
+
| 03:17
 
|For this you can use '''p l z r function''' and the '''spec function'''  
 
|For this you can use '''p l z r function''' and the '''spec function'''  
  
 
|-
 
|-
| 03.23
+
| 03:23
 
|The ''' s s two t f''' command can be used to obtain a '''transfer function of a state-space system sys S S. '''
 
|The ''' s s two t f''' command can be used to obtain a '''transfer function of a state-space system sys S S. '''
  
 
|-
 
|-
|03.33
+
|03:33
 
|Type on your '''Scilab Console''' '''clc to clear it'''
 
|Type on your '''Scilab Console''' '''clc to clear it'''
  
 
|-
 
|-
  
| 03.37
+
| 03:37
  
 
|And then ''' type sys capital T capital F is equal to s s two t f into bracket sys four close the  bracket ''' and  
 
|And then ''' type sys capital T capital F is equal to s s two t f into bracket sys four close the  bracket ''' and  
 
|-
 
|-
  
| 03.50
+
| 03:50
 
|'''Press enter'''
 
|'''Press enter'''
  
Line 211: Line 211:
 
|-
 
|-
  
|03.52
+
|03:52
  
 
|You see this output  
 
|You see this output  
Line 217: Line 217:
 
|-
 
|-
  
| 03.54
+
| 03:54
 
| It is in the form ''' sys TF equal to ss two tf into bracket sys of SS'''
 
| It is in the form ''' sys TF equal to ss two tf into bracket sys of SS'''
  
 
|-
 
|-
  
| 04.01
+
| 04:01
  
 
|Use '''ss two tf''' function for '''sys three''' defined earlier  
 
|Use '''ss two tf''' function for '''sys three''' defined earlier  
Line 229: Line 229:
 
|-
 
|-
  
| 04.07
+
| 04:07
  
 
| '''sys T F''' is a new variable for which ''' 'denom' command''' is applicable. '''
 
| '''sys T F''' is a new variable for which ''' 'denom' command''' is applicable. '''
 
|-
 
|-
  
| 04.12
+
| 04:12
  
 
| It is not applicable to '''sys four''' as it is in '''state space form'''  
 
| It is not applicable to '''sys four''' as it is in '''state space form'''  
Line 240: Line 240:
 
|-
 
|-
  
|04.18
+
|04:18
  
 
||Solve the following exercise  
 
||Solve the following exercise  
Line 247: Line 247:
 
|-
 
|-
  
|04.20
+
|04:20
  
 
|Find a ''' state space realization''' of the '''second order transfer function''' defined below  
 
|Find a ''' state space realization''' of the '''second order transfer function''' defined below  
Line 253: Line 253:
 
|-
 
|-
  
| 04.26
+
| 04:26
  
 
|Use ''' t f two s s''' command  
 
|Use ''' t f two s s''' command  
Line 261: Line 261:
 
|-
 
|-
  
| 04.30
+
| 04:30
  
 
|For the new ''' system''' in '''state space form, say sys S S''', check if the eigenvalues of the matrix A and the poles of the '''transfer function G of s''' are the same.  
 
|For the new ''' system''' in '''state space form, say sys S S''', check if the eigenvalues of the matrix A and the poles of the '''transfer function G of s''' are the same.  
Line 268: Line 268:
 
|-
 
|-
  
| 04.43
+
| 04:43
  
 
|Use the '''A, B, C, D matrices''' of the ''' system sys S S ''' to obtain the ''' transfer function'''   
 
|Use the '''A, B, C, D matrices''' of the ''' system sys S S ''' to obtain the ''' transfer function'''   
 
|-
 
|-
  
| 04.53
+
| 04:53
  
 
|check if the answer is the original one.  
 
|check if the answer is the original one.  
 
|-
 
|-
  
| 04.56
+
| 04:56
  
 
|We now define a ''' discrete time system.'''
 
|We now define a ''' discrete time system.'''
Line 285: Line 285:
 
|-
 
|-
  
| 05.00
+
| 05:00
  
 
|It is customary to use ''' ’z’ ''' for the variable in the '''numerator and denominator polynomials.'''
 
|It is customary to use ''' ’z’ ''' for the variable in the '''numerator and denominator polynomials.'''
Line 292: Line 292:
 
|-
 
|-
  
| 05.07
+
| 05:07
  
 
|Recall that the variable ''' ’z’''' has a shortcut  
 
|Recall that the variable ''' ’z’''' has a shortcut  
Line 298: Line 298:
 
|-
 
|-
  
| 05.11
+
| 05:11
  
 
|Instead of ''' z is equal to poly into bracket zero comma inside quotes z :'''  use ''' z is equal to percentage z'''
 
|Instead of ''' z is equal to poly into bracket zero comma inside quotes z :'''  use ''' z is equal to percentage z'''
Line 305: Line 305:
 
|-
 
|-
  
| 05.21
+
| 05:21
  
 
|Go to '''Scilab console.'''  
 
|Go to '''Scilab console.'''  
Line 312: Line 312:
 
|-
 
|-
  
|05.23
+
|05:23
  
 
|Type '''clc to clear'''  
 
|Type '''clc to clear'''  
Line 318: Line 318:
 
|-
 
|-
  
| 05.26
+
| 05:26
  
 
|Type ''' z is equal to percentage z.'''  
 
|Type ''' z is equal to percentage z.'''  
Line 324: Line 324:
 
|-
 
|-
  
| 05.29
+
| 05:29
  
 
| And '''press enter'''
 
| And '''press enter'''
Line 331: Line 331:
 
|-
 
|-
  
| 05.31
+
| 05:31
  
 
|We now define a first order discrete time system  
 
|We now define a first order discrete time system  
Line 337: Line 337:
 
|-
 
|-
  
| 05.35
+
| 05:35
  
 
|On the  ''' Scilab Console''' type
 
|On the  ''' Scilab Console''' type
  
 
|-
 
|-
| 05.39
+
| 05:39
 
| ''' D T System is equal to syslin into bracket into quotes small d comma z divided by inside bracket z minus zero point five close the bracket close outer bracket . '''
 
| ''' D T System is equal to syslin into bracket into quotes small d comma z divided by inside bracket z minus zero point five close the bracket close outer bracket . '''
  
 
|-
 
|-
| 05.59
+
| 05:59
 
|''' Press enter'''
 
|''' Press enter'''
  
 
|-
 
|-
  
| 06.02
+
| 06:02
  
 
|We use the  ''' ’syslin’ '''function for this
 
|We use the  ''' ’syslin’ '''function for this
Line 359: Line 359:
 
|-
 
|-
  
| 06.05
+
| 06:05
  
 
| This time, we specify the ''' domain to be discrete time,''' instead of '''continuous time.'''
 
| This time, we specify the ''' domain to be discrete time,''' instead of '''continuous time.'''
Line 367: Line 367:
 
|-
 
|-
  
| 06.13
+
| 06:13
  
 
| For checking the ''' step response,''' we have to define the '''input''' explicitly as '''ones,'''  
 
| For checking the ''' step response,''' we have to define the '''input''' explicitly as '''ones,'''  
Line 374: Line 374:
 
|-
 
|-
  
| 06.19
+
| 06:19
  
 
|for example, for '''50 points.'''  
 
|for example, for '''50 points.'''  
Line 380: Line 380:
 
|-
 
|-
  
| 06.22
+
| 06:22
  
 
| Type on the ''' Scilab Console'''
 
| Type on the ''' Scilab Console'''
Line 387: Line 387:
 
|-
 
|-
  
| 06.25
+
| 06:25
  
 
|''' u is equal to ones into bracket one comma fifty close the bracket put a semicolon'''
 
|''' u is equal to ones into bracket one comma fifty close the bracket put a semicolon'''
Line 394: Line 394:
 
|-
 
|-
  
| 06.36
+
| 06:36
  
 
|And '''Press enter'''
 
|And '''Press enter'''
Line 401: Line 401:
 
|-
 
|-
  
| 06.38
+
| 06:38
  
 
|Instead of '''csim,'''  we have to use the '''’flts’''' function to '''simulate this system.'''  
 
|Instead of '''csim,'''  we have to use the '''’flts’''' function to '''simulate this system.'''  
Line 407: Line 407:
 
|-
 
|-
  
| 06.45
+
| 06:45
  
 
|Type  on the '''Scilab Console '''
 
|Type  on the '''Scilab Console '''
Line 413: Line 413:
 
|-
 
|-
  
| 06.48
+
| 06:48
  
 
|'''clc to clear the console'''
 
|'''clc to clear the console'''
Line 419: Line 419:
 
|-
 
|-
  
| 06.51
+
| 06:51
  
 
|''' y is equal to f l t s  into bracket u comma D T System close the bracket put a  semi colon'''
 
|''' y is equal to f l t s  into bracket u comma D T System close the bracket put a  semi colon'''
Line 425: Line 425:
 
|-
 
|-
  
| 07.02
+
| 07:02
  
 
|And ''' Press enter'''
 
|And ''' Press enter'''
Line 431: Line 431:
 
|-
 
|-
  
| 07.05
+
| 07:05
  
 
|Now type ''' plot of y and  press Enter '''
 
|Now type ''' plot of y and  press Enter '''
Line 439: Line 439:
 
|-
 
|-
  
| 07.11
+
| 07:11
  
 
|The output will be plotted.  
 
|The output will be plotted.  
Line 445: Line 445:
 
|-
 
|-
  
| 07.14
+
| 07:14
  
 
|Close the graphic window  
 
|Close the graphic window  
Line 452: Line 452:
 
|-
 
|-
  
| 07.17
+
| 07:17
  
 
|It is helpful to '''discretize''' a given '''continuous time system.'''  
 
|It is helpful to '''discretize''' a given '''continuous time system.'''  
Line 458: Line 458:
 
|-
 
|-
  
| 07.21
+
| 07:21
  
 
|This is done using the '''dscr function.'''  
 
|This is done using the '''dscr function.'''  
Line 464: Line 464:
 
|-
 
|-
  
| 07.25
+
| 07:25
  
 
|Let us define a continuous system ''' s is equal to percent s''' and
 
|Let us define a continuous system ''' s is equal to percent s''' and
Line 470: Line 470:
 
|-
 
|-
  
| 07.32
+
| 07:32
  
 
|'''sys G is equal to syslin into bracket into quotes c comma two divided by into bracket s square plus two multiplied by s plus nine close bracket close outer bracket and press enter '''
 
|'''sys G is equal to syslin into bracket into quotes c comma two divided by into bracket s square plus two multiplied by s plus nine close bracket close outer bracket and press enter '''
Line 478: Line 478:
 
|-
 
|-
  
| 07.56
+
| 07:56
  
 
|Let us '''discretize the system sys G''' with a '''sampling period of zero point one.'''  
 
|Let us '''discretize the system sys G''' with a '''sampling period of zero point one.'''  
Line 484: Line 484:
 
|-
 
|-
  
| 08.04
+
| 08:04
  
 
|On the '''  Console''' type ''' clc to clear''' and then type
 
|On the '''  Console''' type ''' clc to clear''' and then type
Line 490: Line 490:
 
|-
 
|-
  
| 08.08
+
| 08:08
  
 
|''' sys five is equal to d s c r into bracket sys G comma zero point one close the bracket and then press Enter'''
 
|''' sys five is equal to d s c r into bracket sys G comma zero point one close the bracket and then press Enter'''
Line 496: Line 496:
 
|-
 
|-
  
| 08.25
+
| 08:25
  
 
|''' Press enter to continue display'''
 
|''' Press enter to continue display'''
Line 502: Line 502:
 
|-
 
|-
  
| 08.28
+
| 08:28
  
 
|As you see ''' system is discretized as A B C D matrices and inital state x zero'''
 
|As you see ''' system is discretized as A B C D matrices and inital state x zero'''
 
|-
 
|-
  
| 08.38
+
| 08:38
  
 
|Notice that we obtain the ''' discretized system in the state space representation.'''  
 
|Notice that we obtain the ''' discretized system in the state space representation.'''  
 
|-
 
|-
  
| 08.44
+
| 08:44
  
 
|We can convert this to a '''transfer function representation in discrete time''' using ''' s s to t f''' function  
 
|We can convert this to a '''transfer function representation in discrete time''' using ''' s s to t f''' function  
Line 520: Line 520:
 
|-
 
|-
  
| 08.54
+
| 08:54
  
 
|For this go to  the ''' Scilab Console Window'''
 
|For this go to  the ''' Scilab Console Window'''
Line 526: Line 526:
 
|-
 
|-
  
| 08.58
+
| 08:58
  
 
|''' Type clc and clear it'''
 
|''' Type clc and clear it'''
 
|-
 
|-
  
| 09.01
+
| 09:01
  
 
|'''Now type sys six is equal to s s two t f into bracket sys five comma zero point one close the brackets and press enter '''
 
|'''Now type sys six is equal to s s two t f into bracket sys five comma zero point one close the brackets and press enter '''
Line 537: Line 537:
 
|-
 
|-
  
| 09.18
+
| 09:18
  
 
|The output gives the transfer function.  
 
|The output gives the transfer function.  
 
|-
 
|-
  
| 09.22
+
| 09:22
  
 
| In this tutorial we have learnt to:  
 
| In this tutorial we have learnt to:  
Line 549: Line 549:
 
|-
 
|-
  
| 09.24
+
| 09:24
  
 
|Convert between '''state space and transfer function descriptions'''
 
|Convert between '''state space and transfer function descriptions'''
 
|-
 
|-
  
| 09.28
+
| 09:28
  
 
|Define a ''' discrete time system and plot its step response'''
 
|Define a ''' discrete time system and plot its step response'''
Line 560: Line 560:
 
|-
 
|-
  
| 09.33
+
| 09:33
  
 
|'''Discretize a continuous time system.'''
 
|'''Discretize a continuous time system.'''
Line 566: Line 566:
  
 
|-
 
|-
|09.36
+
|09:36
 
| Watch the video available at the following link
 
| Watch the video available at the following link
  
 
|-
 
|-
  
| 09.39
+
| 09:39
  
 
| It summarises the Spoken Tutorial project  
 
| It summarises the Spoken Tutorial project  
Line 579: Line 579:
 
|-
 
|-
  
|09.43
+
|09:43
  
 
||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 585: Line 585:
 
|-
 
|-
  
|09.47
+
|09:47
  
 
||The spoken tutorial project Team
 
||The spoken tutorial project Team
Line 591: Line 591:
 
|-
 
|-
  
|09.49
+
|09:49
  
 
||Conducts workshops using spoken tutorials  
 
||Conducts workshops using spoken tutorials  
Line 598: Line 598:
 
|-
 
|-
  
|09.52
+
|09:52
  
 
||Gives certificates to those who pass an online test  
 
||Gives certificates to those who pass an online test  
Line 605: Line 605:
 
|-
 
|-
  
|09.56
+
|09:56
  
 
||For more information, please write to contact@spoken-tutorial.org  
 
||For more information, please write to contact@spoken-tutorial.org  
Line 612: Line 612:
 
|-
 
|-
  
|10.04
+
|10:04
  
 
|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 620: Line 620:
 
|-
 
|-
  
| 10.08
+
| 10:08
  
 
| 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.  
 
|-
 
|-
  
| 10.15
+
| 10:15
  
 
|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 631: Line 631:
 
|-
 
|-
  
| 10.27
+
| 10:27
  
 
|This is Anuradha Amruthkar from IIT Bombay signing off.
 
|This is Anuradha Amruthkar from IIT Bombay signing off.
Line 637: Line 637:
 
|-
 
|-
  
|10.31
+
|10:31
  
 
| Thank you for joining Good Bye.
 
| Thank you for joining Good Bye.

Revision as of 11:08, 11 July 2014

Time Narration
00:01 Dear Friends,
00:02 Welcome to the Spoken Tutorial on “Discrete Time System”
00:07 In this Tutorial we will learn to
00:09 Convert between state space and transfer function descriptions


00:14 Define a discrete time system and plot its step response


00:20 Discretize a continuous time system
00:23 I am using Ubuntu 12.04 operating system and Scilab 5.3.3 for demonstation


00:31 To practise this tutorial, you should have basic knowledge of Scilab.
00:36 If not, please refer to the Scilab tutorials available on spoken-tutorial.org
00:44 state space model
00:46 x dot is equal to A x plus B u
00:49 y is equal to c x plus D u
00:52 is specified by sys three is equal to syslin into bracket into quotes c comma A comma B comma C comma D close bracket
01:05 for prespecified matrices A, B, C and D of suitable sizes.


01:11 Start Scilab on your computer
01:15 Type sys three is equal to syslin into bracket into quotes c comma four comma three comma six comma nine close bracket and press Enter.
01:32 Press enter to continue the display.
01:35 This is an example for single state, Single Input Single Output


01:40 The output will have matrices A, B, C and D and initial state x zero


01:49 Type clc to clear the console
01:52 Define for example matrices A, B, C, D on Scilab console as you see


02:00 A is equal to open square bracket two space three semicolon four space five close square bracket
02:09 Press enter


02:11 B is equal to open square bracket one semicolon two close the square bracket


02:17 Press enter
02:19 C is equal to open square bracket minus three space minus six close the square bracket
02:27 And Press enter
02:30 D is equal to two
02:33 Press Enter
02:35 Let us substitute these matrices in the previous command


02:39 sys four is equal to sys lin into brackets into quotes c comma A comma B comma C comma D close the bracket and press enter


02:57 You will get the following output.


03:00 Press enter to continue the display.


03:03 The output will have matrices A B C D and initial state x zero as you see
03:11 Check whether poles of sys4 are same as eigenvalues of A .


03:17 For this you can use p l z r function and the spec function
03:23 The s s two t f command can be used to obtain a transfer function of a state-space system sys S S.
03:33 Type on your Scilab Console clc to clear it
03:37 And then type sys capital T capital F is equal to s s two t f into bracket sys four close the bracket and
03:50 Press enter


03:52 You see this output
03:54 It is in the form sys TF equal to ss two tf into bracket sys of SS
04:01 Use ss two tf function for sys three defined earlier


04:07 sys T F is a new variable for which 'denom' command is applicable.
04:12 It is not applicable to sys four as it is in state space form
04:18 Solve the following exercise


04:20 Find a state space realization of the second order transfer function defined below
04:26 Use t f two s s command


04:30 For the new system in state space form, say sys S S, check if the eigenvalues of the matrix A and the poles of the transfer function G of s are the same.


04:43 Use the A, B, C, D matrices of the system sys S S to obtain the transfer function
04:53 check if the answer is the original one.
04:56 We now define a discrete time system.


05:00 It is customary to use ’z’ for the variable in the numerator and denominator polynomials.


05:07 Recall that the variable ’z’ has a shortcut
05:11 Instead of z is equal to poly into bracket zero comma inside quotes z : use z is equal to percentage z


05:21 Go to Scilab console.


05:23 Type clc to clear
05:26 Type z is equal to percentage z.
05:29 And press enter


05:31 We now define a first order discrete time system
05:35 On the Scilab Console type
05:39 D T System is equal to syslin into bracket into quotes small d comma z divided by inside bracket z minus zero point five close the bracket close outer bracket .
05:59 Press enter
06:02 We use the ’syslin’ function for this


06:05 This time, we specify the domain to be discrete time, instead of continuous time.


06:13 For checking the step response, we have to define the input explicitly as ones,


06:19 for example, for 50 points.
06:22 Type on the Scilab Console


06:25 u is equal to ones into bracket one comma fifty close the bracket put a semicolon


06:36 And Press enter


06:38 Instead of csim, we have to use the ’flts’ function to simulate this system.
06:45 Type on the Scilab Console
06:48 clc to clear the console
06:51 y is equal to f l t s into bracket u comma D T System close the bracket put a semi colon
07:02 And Press enter
07:05 Now type plot of y and press Enter


07:11 The output will be plotted.
07:14 Close the graphic window


07:17 It is helpful to discretize a given continuous time system.
07:21 This is done using the dscr function.
07:25 Let us define a continuous system s is equal to percent s and
07:32 sys G is equal to syslin into bracket into quotes c comma two divided by into bracket s square plus two multiplied by s plus nine close bracket close outer bracket and press enter


07:56 Let us discretize the system sys G with a sampling period of zero point one.
08:04 On the Console type clc to clear and then type
08:08 sys five is equal to d s c r into bracket sys G comma zero point one close the bracket and then press Enter
08:25 Press enter to continue display
08:28 As you see system is discretized as A B C D matrices and inital state x zero
08:38 Notice that we obtain the discretized system in the state space representation.
08:44 We can convert this to a transfer function representation in discrete time using s s to t f function


08:54 For this go to the Scilab Console Window
08:58 Type clc and clear it
09:01 Now type sys six is equal to s s two t f into bracket sys five comma zero point one close the brackets and press enter
09:18 The output gives the transfer function.
09:22 In this tutorial we have learnt to:


09:24 Convert between state space and transfer function descriptions
09:28 Define a discrete time system and plot its step response
09:33 Discretize a continuous time system.


09:36 Watch the video available at the following link
09:39 It summarises the Spoken Tutorial project


09:43 If you do not have good bandwidth, you can download and watch it
09:47 The spoken tutorial project Team
09:49 Conducts workshops using spoken tutorials


09:52 Gives certificates to those who pass an online test


09:56 For more information, please write to contact@spoken-tutorial.org


10:04 Spoken Tutorial Project is a part of the Talk to a Teacher project


10:08 It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.
10:15 More information on this mission is available at spoken-tutorial.org/NMEICT-Intro
10:27 This is Anuradha Amruthkar from IIT Bombay signing off.
10:31 Thank you for joining Good Bye.

Contributors and Content Editors

Gaurav, PoojaMoolya, Sandhya.np14