Difference between revisions of "Scilab/C4/Control-systems/English"
(Created page with ''''Title of script''': Advanced Control Systems '''Author: Manas, Shamika''' '''Keywords: control, continuous time, response''' {| style="border-spacing:0;" ! <center>Visua…') |
Nancyvarkey (Talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
− | {| | + | {|border=1 |
! <center>Visual Cue</center> | ! <center>Visual Cue</center> | ||
! <center>Narration</center> | ! <center>Narration</center> | ||
Line 13: | Line 13: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 1''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 1''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Dear | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Dear friends, welcome to the spoken tutorial on “'''Advanced Control of Continuous Time systems'''” |
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 2,3-Learning Objective Slide''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 2,3-Learning Objective Slide''' | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| At the end of this tutorial, you will learn how to: | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| At the end of this tutorial, you will learn how to: | ||
− | + | #Define a continuous time system: second and higher order | |
− | + | #Plot response to '''step''' and '''sine''' inputs | |
− | + | #Do a '''Bode plot''' | |
− | + | #Study '''numer''' and '''denom Scilab functions''' | |
− | + | #Plot '''poles''' and '''zeros''' of a system | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 4-System Requirement slide''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 4-System Requirement slide''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| To record this tutorial, I am using '''Ubuntu 12.04''' as the operating system | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| To record this tutorial, I am using |
+ | *'''Ubuntu 12.04''' as the operating system and | ||
+ | * '''Scilab 5.3.3''' version | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5- Prerequisite slide | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5- Prerequisite slide | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Before practising this tutorial, a learner should have basic knowledge of '''Scilab and control systems. ''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Before practising this tutorial, a learner should have basic knowledge of '''Scilab''' and '''control systems. ''' |
− | For | + | For '''Scilab''', please refer to the '''Scilab''' tutorials available on the '''Spoken Tutorial '''website. |
|- | |- | ||
Line 50: | Line 42: | ||
− | So, first we have to define '''complex domain variable s'''. | + | So, first we have to define '''complex domain variable 's''''. |
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to the Scilab Console Window and type: | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to the Scilab Console Window and type: | ||
− | '''s | + | '''s = poly(0, ’s’)''' |
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab console''' window. |
Here type: | Here type: | ||
Line 68: | Line 60: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Display the output polynomial | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Display the output polynomial | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The output is '''s'''. | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The output is ''''s''''. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| On the console window type: | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| On the console window type: | ||
− | s | + | s = %s |
and press '''Enter'''. | and press '''Enter'''. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| There is another way to define ''''s'''' as '''continuous time complex variable''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| There is another way to define ''''s'''' as '''continuous time complex variable'''. |
− | On the ''' | + | On the '''console '''window, type: |
'''s equal to percentage s''' | '''s equal to percentage s''' | ||
Line 89: | Line 78: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 7''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 7''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us study the''' syslin Scilab command''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us study the''' syslin Scilab command'''. |
− | Use the '''Scilab''' function ’'''syslin'''’ to define the continuous time system | + | Use the '''Scilab''' function ’'''syslin'''’ to define the continuous time system. |
Line 97: | Line 86: | ||
− | Use '''csim''' with '''step''' option to obtain the '''step response''' and then ''' | + | Use '''csim''' with '''step''' option, to obtain the '''step response''' and then plot the '''step response. ''' |
|- | |- | ||
Line 103: | Line 92: | ||
sysG <nowiki>=</nowiki> syslin(’c’,2/(sˆ2+2*s+9)) | sysG <nowiki>=</nowiki> syslin(’c’,2/(sˆ2+2*s+9)) | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab console''' window. |
Here type: | Here type: | ||
Line 111: | Line 100: | ||
− | ''' | + | Here '''c''' is used, (because) as we are defining a continuous time system. |
− | ''' | + | Press '''Enter'''. |
|- | |- | ||
Line 130: | Line 119: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Then type | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Then type | ||
− | '''t equal to zero colon zero point one colon ten | + | '''t equal to zero colon zero point one colon ten semicolon''' |
Press '''Enter'''. | Press '''Enter'''. | ||
Line 137: | Line 126: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Then type | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Then type | ||
− | y1 | + | y1 = csim(’step’, t, sysG); |
Press Enter. | Press Enter. | ||
Line 163: | Line 152: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Display the output generated | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Display the output generated | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The output will display the '''step response''' of the given second order system. | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The output will display the '''step response''' of the given '''second order system.''' |
|- | |- | ||
Line 169: | Line 158: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us study the '''Second Order system response for sine input'''. | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us study the '''Second Order system response for sine input'''. | ||
− | '''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 178: | Line 167: | ||
Press Enter. | Press Enter. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us switch to the '''Scilab console''' window. |
Type | Type | ||
− | '''U two is equal to sine open paranthesis t close paranthesis | + | '''U two is equal to sine open paranthesis t close paranthesis semicolon''' |
Line 195: | Line 184: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Then type''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Then type''' | ||
− | '''y two is equal to | + | '''y two is equal to c sim open paranthesis u two comma t comma sys capital G close the bracket semicolon''' |
− | ''' | + | Press '''Enter.''' |
Line 212: | Line 201: | ||
− | Make sure that you place a ''' | + | Make sure that you place a '''semicolon''' between '''u2''' and '''y2''' because '''u2''' and '''y2''' are row vectors of the same size. |
Line 218: | Line 207: | ||
− | 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'''. |
|- | |- | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 9 | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 9''' |
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Response Plot''' plots both the input and the output on the same graph. | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Response Plot''' plots both the input and the output on the same graph. | ||
Line 227: | Line 216: | ||
* the output is also a '''sine wave''', and | * the output is also a '''sine wave''', and | ||
− | * there is a '''phase lag | + | * there is a '''phase lag''' between the input and output |
− | + | ||
− | + | ||
− | + | ||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 10''' | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| | ||
+ | * '''Amplitude''' is different for the input and the output, as it is being passed through a '''transfer''' function. | ||
+ | * This is a typical '''under-damped''' example. | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 11''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 11''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us plot '''bode plot''' of 2 over 9 plus 2 s plus s square | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us plot '''bode plot''' of '''2 over 9 plus 2 s plus s square''' |
Line 241: | Line 232: | ||
Do not use '''f r e q''' as a '''variable''' !! | Do not use '''f r e q''' as a '''variable''' !! | ||
− | |||
− | |||
− | |||
|- | |- | ||
Line 251: | Line 239: | ||
Press Enter. | Press Enter. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Open the '''Scilab | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Open the '''Scilab console''' and type |
Line 274: | Line 262: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 12''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 12''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us define another system | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us define another system. |
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''' | ||
− | Let us plot '''step response''' for this system | + | Let us plot '''step response''' for this system. |
|- | |- | ||
Line 286: | Line 274: | ||
Press Enter. | Press Enter. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Switch to Scilab console | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Switch to '''Scilab console'''. |
− | Type this on your '''Scilab | + | Type this on your '''Scilab console'''. |
Line 300: | Line 288: | ||
Press Enter. | Press Enter. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Then type this on your ''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Then type this on your '''console'''. |
'''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 310: | Line 298: | ||
Then type | Then type | ||
− | '''t equal to zero colon zero point one colon ten | + | '''t equal to zero colon zero point one colon ten semicolon''' |
− | ''' | + | Press '''Enter.''' |
Line 318: | Line 306: | ||
− | ''' | + | Press '''Enter.''' |
− | Then type''' plot open paranthesis t comma y close paranthesis | + | Then type''' plot open paranthesis t comma y close paranthesis''' |
− | ''' | + | Press '''Enter.''' |
− | The '''response plot for over damped system''' is shown. | + | |
+ | |||
+ | The '''response plot''' for '''over damped system''' is shown. | ||
|- | |- | ||
Line 332: | Line 322: | ||
and press Enter. | and press Enter. | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| To find the '''roots of p '''type this on your on '''Scilab | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| To find the '''roots of p '''type this on your on '''Scilab console''' - |
'''Roots of p''' | '''Roots of p''' | ||
Line 339: | Line 329: | ||
− | These '''roots are the poles''' of the system '''sys two''' | + | These '''roots''' are the '''poles''' of the system '''sys two''' |
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Display the output''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Display the output''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The '''roots or poles''' of the system are shown | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The '''roots or poles''' of the system are shown. |
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 13, 14''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 13, 14''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Please plot '''Step response''' for this system | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Please plot '''Step response''' for this system along similar lines, as for '''over damped system'''. |
− | + | ||
− | + | ||
− | along similar lines as for '''over damped system'''. | + | |
Line 365: | Line 352: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Switch to the Scilab Console Window and type''' this on your '''Scilab Console''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | '''Switch to the Scilab Console Window and type''' this on your '''Scilab Console''' | ||
--> '''sys3 <nowiki>=</nowiki> syslin(’c’,s+6,sˆ2+6*s+19)''' and press '''Enter''' | --> '''sys3 <nowiki>=</nowiki> syslin(’c’,s+6,sˆ2+6*s+19)''' and press '''Enter''' | ||
+ | |||
+ | |||
+ | |||
Line 376: | Line 378: | ||
− | --> '''g | + | --> '''g = (s+6)/(sˆ2+6*s+19)''' and press '''Enter''' |
− | |||
− | |||
− | |||
− | |||
− | + | Then type this on your '''Scilab Console''' | |
− | |||
− | + | --> '''sys4 <nowiki>=</nowiki> syslin(’c’,g)''' and press '''Enter''' | |
− | |||
− | |||
− | ''' | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Switch to '''Scilab console'''. |
− | + | For a general '''transfer function''', the numerator and denominator can be specified separately. Let me show you how. | |
− | ''' | + | Type on your '''console''' |
− | + | '''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''' | |
+ | Press '''Enter''' | ||
− | |||
− | + | Another way of defining a system, is to type | |
+ | '''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''' | ||
− | + | Press '''Enter.''' | |
− | + | ||
− | + | ||
− | + | Then type this on your '''console''' | |
− | ''' | + | '''sys four is equal to syslin open paranthesis open single quote c close single quote comma g close paranthesis''' |
− | + | Press '''Enter.''' | |
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Both ways, we get the same output; | ||
+ | '''six plus s over 19 plus six s plus s square''' | ||
+ | |||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 15''' | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The variable ’'''sys'''’ is of type ’'''rational'''’. | ||
+ | |||
+ | Its numerator and denominator can be extracted by various ways. | ||
+ | |||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 16''' | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| | ||
+ | |||
+ | '''Sys of two , numer of sys '''or '''numer of g '''gives the numerator. | ||
+ | The denominator can be calculated using '''sys(3)''' or '''denom of sys functions'''. | ||
|- | |- | ||
Line 446: | Line 457: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to '''Scilab''' and type |
− | + | ||
--> '''sys3(2)''' and press '''Enter''' | --> '''sys3(2)''' and press '''Enter''' | ||
− | |||
− | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Switch to '''Scilab console.''' | |
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Switch to '''Scilab ''' | + | |
− | Type this on your '''Scilab | + | Type this on your '''Scilab console'''. |
'''sys three open paranthesis two close paranthesis''' | '''sys three open paranthesis two close paranthesis''' | ||
− | Press | + | Press '''Enter.''' |
+ | |||
+ | This gives the numerator of the '''rational function 'sys three'''' that is '''6 + s''' | ||
+ | |||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Type '''numer(sys3)''' >> Press '''Enter''' | ||
+ | |||
− | |||
− | Otherwise you can type | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Otherwise, you can type |
'''numer open paranthesis sys three close paranthesis''' | '''numer open paranthesis sys three close paranthesis''' | ||
− | The | + | The numerator of '''sys three''' is shown. |
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Type''' sys3(3)''' >> Press '''Enter''' | ||
− | |||
− | |||
− | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| To get the denominator, type | |
− | + | '''sys three open paranthesis three close paranthesis. Press '''Enter.''' | |
− | Then type '''p l z r open paranthesis sys three close paranthesis. Press | + | The denominator of the function is shown. |
+ | |||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"|Type | ||
+ | |||
+ | '''denom(sys3) ''' >> Press '''Enter'''. | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"|You can also type '''denom open paranthesis sys three close paranthesis.''' | ||
+ | |||
+ | Press '''Enter.''' | ||
+ | |||
+ | |- | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"|Type | ||
+ | |||
+ | '''plzr(sys3)''' >> Press '''Enter'''. | ||
+ | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"|Then type '''p l z r open paranthesis sys three close paranthesis.''' | ||
+ | |||
+ | Press '''Enter.''' | ||
|- | |- | ||
Line 490: | Line 519: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The '''output graph''' plots the '''poles and zeros'''. | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The '''output graph''' plots the '''poles and zeros'''. | ||
− | 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. |
It is plotted on the '''complex plane'''. | It is plotted on the '''complex plane'''. | ||
Line 496: | Line 525: | ||
|- | |- | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 18''' | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Slide 18''' | ||
− | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| In this tutorial we have learnt how to: | + | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| In this tutorial, we have learnt how to: |
* Define a system by its '''transfer''' function. | * Define a system by its '''transfer''' function. | ||
* Plot '''step and sinusoidal responses'''. | * Plot '''step and sinusoidal responses'''. | ||
* Extract '''poles and zeros''' of a '''transfer''' function. | * Extract '''poles and zeros''' of a '''transfer''' function. | ||
− | |||
− | |||
|- | |- | ||
Line 518: | Line 545: | ||
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Watch the video available at the following link | | style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Watch the video available at the following link | ||
* It summarises the Spoken Tutorial project | * It summarises the Spoken Tutorial project | ||
− | * 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 |
− | + | ||
− | + | ||
Latest revision as of 14:50, 3 February 2014
Title of script: Advanced Control Systems
Author: Manas, Shamika
Keywords: control, continuous time, response
|
|
---|---|
Slide 1 | Dear friends, welcome to the spoken tutorial on “Advanced Control of Continuous Time systems” |
Slide 2,3-Learning Objective Slide | At the end of this tutorial, you will learn how to:
|
Slide 4-System Requirement slide | To record this tutorial, I am using
|
Slide 5- Prerequisite slide | Before practising this tutorial, a learner should have basic knowledge of Scilab and control systems.
|
Slide 6 | In this tutorial, I will describe how to define second-order linear system.
|
Switch to the Scilab Console Window and type:
s = poly(0, ’s’) |
Let us switch to the Scilab console window.
Here type:
|
Display the output polynomial | The output is 's'. |
On the console window type:
s = %s and press Enter. |
There is another way to define 's' as continuous time complex variable.
On the console window, type: s equal to percentage s and press Enter. |
Slide 7 | Let us study the syslin Scilab command.
Use the Scilab function ’syslin’ to define the continuous time system.
|
Switch to the Scilab Console Window and type:
sysG = syslin(’c’,2/(sˆ2+2*s+9)) |
Let us switch to the Scilab console window.
Here type:
|
Display the output generated | The output is linear second order system represented by
2 over 9 plus 2 s plus s square |
Type:
t=0:0.1:10; Press Enter. |
Then type
t equal to zero colon zero point one colon ten semicolon Press Enter. |
Then type
y1 = csim(’step’, t, sysG); Press Enter. |
Then type
|
Then type
plot(t, y1); Press Enter. |
Then type
plot open paranthesis t comma y one close paranthesis semicolon
|
Display the output generated | The output will display the step response of the given second order system. |
Slide 8 | Let us study the Second Order system response for sine input.
Sine inputs can easily be given as inputs to a second order system to a continuous time system. |
Switch to the Scilab Console Window and type this on your Scilab Console
Press Enter. |
Let us switch to the Scilab console window.
U two is equal to sine open paranthesis t close paranthesis semicolon
|
Type y2 = csim(u2, t, sysG);
|
Then type
y two is equal to c sim open paranthesis u two comma t comma sys capital G close the bracket semicolon
|
Type plot(t, [u2; y2])
Press Enter. |
Then type
plot open paranthesis t comma open square bracket u two semicolon y two close square bracket close paranthesis
|
Slide 9 | Response Plot plots both the input and the output on the same graph.
As expected,
|
Slide 10 |
|
Slide 11 | Let us plot bode plot of 2 over 9 plus 2 s plus s square
Do not use f r e q as a variable !! |
Switch to the Scilab console and type
fr = [0.01:0.1:10]; // Hertz Press Enter. |
Open the Scilab console and type
Press Enter.
|
Type bode(sysG, fr) and press Enter. | Then type
bode open paranthesis sys capital G comma fr close paranthesis and press Enter.
|
Slide 12 | Let us define another system.
We have an over-damped system p equal to s square plus nine s plus nine Let us plot step response for this system. |
Switch to the Scilab console and type
p=s^2 +9*s+9 Press Enter. |
Switch to Scilab console.
Type this on your Scilab console.
|
Type sys2 = syslin('c', 9/p)
Press Enter. |
Then type this on your console.
sys two is equal to syslin open paranthesis open single quote c close single quote comma nine divided by p close paranthesis
t equal to zero colon zero point one colon ten semicolon Press Enter.
The response plot for over damped system is shown. |
roots(p)
and press Enter. |
To find the roots of p type this on your on Scilab console -
Roots of p and press Enter.
|
Display the output | The roots or poles of the system are shown. |
Slide 13, 14 | Please plot Step response for this system along similar lines, as for over damped system.
|
Switch to the Scilab Console Window and type this on your Scilab Console
Alternatively: Type this on your Console
Then type this on your Scilab Console
--> sys4 = syslin(’c’,g) and press Enter
|
Switch to Scilab console.
Press Enter
|
Both ways, we get the same output;
six plus s over 19 plus six s plus s square | |
Slide 15 | The variable ’sys’ is of type ’rational’.
Its numerator and denominator can be extracted by various ways. |
Slide 16 |
Sys of two , numer of sys or numer of g gives the numerator. The denominator can be calculated using sys(3) or denom of sys functions. |
Slide 17 | The poles and zeros of the system can be plotted using p l z r function.
The syntax is p l z r of sys The plot shows x for poles and circles for zeros. |
Switch to Scilab and type
--> sys3(2) and press Enter
|
Switch to Scilab console.
sys three open paranthesis two close paranthesis
This gives the numerator of the rational function 'sys three' that is 6 + s |
Type numer(sys3) >> Press Enter
|
Otherwise, you can type
numer open paranthesis sys three close paranthesis The numerator of sys three is shown. |
Type sys3(3) >> Press Enter
|
To get the denominator, type
sys three open paranthesis three close paranthesis. Press Enter.
|
Type
denom(sys3) >> Press Enter. |
You can also type denom open paranthesis sys three close paranthesis.
Press Enter. |
Type
plzr(sys3) >> Press Enter. |
Then type p l z r open paranthesis sys three close paranthesis.
Press Enter. |
Display output | The output graph plots the poles and zeros.
It shows cross and circle' for poles and zeros of the system respectively. It is plotted on the complex plane. |
Slide 18 | In this tutorial, we have learnt how to:
|
Show Slide 19
Title: About the Spoken Tutorial Project
|
* Watch the video available at the following link
|
Show Slide 20
Title: Spoken Tutorial Workshops The Spoken Tutorial Project Team
|
The Spoken Tutorial Project Team
|
Show Slide
Title: Acknowledgement 21
|
* Spoken Tutorial Project is a part of the Talk to a Teacher project
|
On previous slide | This is Ashwini Patil signing off. Thank you for joining. |