Difference between revisions of "Other system representations"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{|border="1" width=100% ! width=20% | Visual Cue ! width=60% | Narration |- | Show first slide | As we mentioned in the first tutorial, the variable 'z' is already available to …')
 
(No difference)

Latest revision as of 16:05, 24 December 2012

Visual Cue Narration

Show first slide

As we mentioned in the first tutorial, the variable 'z' is already available to us as a symbolic constant, so we needn't use the poly function to define it. It can be defined simply as:

   z = %z

We now define a first order discrete time system:

   a = 0.1
   DTSystem = syslin('d', a*z/(z - (1-a)))

We use the same 'syslin' function as before. This time, we specify the domain to be discrete time, instead of continuous time.

Here, we have to define the input specifically, as against using the 'step' word for continuous time simulation. We define a step for 50 points.

   u = ones(1, 50);

The function we have to use to simulate this system is the 'flts' function.

   y = flts(u, DTSystem);
   plot(y)

This is the step response to the transfer function <math>\frac{0.1}{z - 0.9}</math>

We can plot the Bode plot just as we did for the continuous time system:

   bode(DTSystem, 0.001, 1)

Similarly, we can view the root locus:

   evans(DTSystem)

We can also discretize a continuous time system using the dscr function. Let us discretize the system 'SimpleSys' from the first tutorial with a sampling period of 0.1.

   dscr(SimpleSys, 0.1)

We see that the system is returned in its state space representation. We can convert this to a transfer function representation in discrete time using the ss2tf function:

   SimpleSysDiscr = ss2tf(dscr(SimpleSys, 0.1)) 

We will see in the next tutorial, how to define and use state space representations of a system.

We can simulate this system:

   t = [0: 0.1: 10];
   u = ones(t);
   y = flts(u, SimpleSysDiscr);
   plot(t, y)

END

Contributors and Content Editors

Gyan