Difference between revisions of "Multiple subsystems"
(Created page with '{|border="1" width=100% ! width=20% | Visual Cue ! width=60% | Narration |- | Show first slide | We can also build systems from multiple subsystems. Any pair of subsystems can b…') |
(No difference)
|
Latest revision as of 16:07, 24 December 2012
Visual Cue | Narration |
---|---|
Show first slide |
We can also build systems from multiple subsystems. Any pair of subsystems can be connected either in series, or in parallel, or in feedback. Scilab offers ways to handle all these configurations intuitively. |
Let us use the systems <math>\frac{1}{s}</math> and gain <math>2</math> in these various configurations. First, we define them: | |
S1 = syslin('c', 1/s) S2 = 2 |
We can obtain the transfer function of the two systems when connected in series by simply multiplying the individual transfer functions. |
Series = S1*S2 |
We can obtain the transfer function of the two systems when connection in parallel by simply adding the individual transfer functions. |
Parallel = S1+S2 |
We can check the root locus of this system: |
evans(S1 + S2) |
We see the pole at the origin and the zero at -0.5, as expected. If we want to obtain the transfer function of the two systems when connected in feedback, we use the slash-dot operator. |
Feedback = S1/.S2 |
Note that this is slash-dot, not dot-slash as in element-wise division of vectors. Also, note that if you try to use a number right after the dot, like the gain directly: |
Feedback = S1/.2 |
Scilab considers this to be a polynomial divided by the number 0.2, which in this case is 5 by s. If you wish to use a number right after the dot and do not want the dot to be considered as a decimal point, you need to separate them by a space like this: |
Feedback = S1/. 2 |
or using brackets like this: |
Feedback = S1/.(2) |
We can verify that this is indeed the correct feedback system by checking using the familiar notation: |
<math> G_{feedback}(s) = \frac{G(s)}{1 + G(s) H(s)} </math> |
|
Feedback2 = S1/(1+S1*S2) |
END |