Description Usage Arguments Details Value See Also Examples
connect
is used to form a state-space model of a system from its block diagram.
1 |
sysapp |
A state-space system containing several appended systems returned from the |
q |
Matrix that specifies the interconnections of the block diagram. Each row specifies a connection. The first element of each row is the number of the block. The other following elements of each row specify where the block gets its summing inputs, with negative elements used to indicate minus inputs to the summing junction. For example: cbind(2,1,3) means that block 2 has an input from block 1 and block 3 |
inputs |
A column matrix specifying the inputs of the resulting aggregate system |
outputs |
A column matrix specifying the outputs of the resulting aggregate system |
connect
This function requires calling the append
function to group a set of unconnected dynamics system
in one system object. It then uses the q
matrix to determine the interconnections between the systems
and finally specifies the inputs and outputs for the new aggregate system.
This approach helps to realize a block diagram as a single system on which further analysis could be performed.
See examples below.
Returns the interconnected system, returned as either a state-space model
append
series
parallel
feedback
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | a1 <- rbind(c(0, 0), c(1,-3))
b1 <- rbind(-2,0)
c1 <- cbind(0,-1)
d <- as.matrix(0)
a2 <- as.matrix(-5)
b2 <- as.matrix(5)
c2 <- as.matrix(1)
d2 <- as.matrix(0)
sysa1 <- ss(a1, b1, c1, d)
sysa2 <- ss(a2, b2, c2, d2)
al <- append(sysa1, sysa2)
connect(al, cbind(2,1,0), cbind(1,2), cbind(1,2))
## OR
connect(append(sysa1, sysa2), cbind(2,1,0), cbind(1), cbind(2))
## Not run:
cbind(2,1,0) means that block 2 has an input from block 1 and block 0 (which doesnt exist)
cbind(1) means that block 1 is the input of the system, and cbind(2) means block 2 is the
output of the system.
if we replace cbind(2) with cbind(1,2), this means that the system has two outputs from
block 1 and 2
i.e. \code{connect(append(sysa1, sysa2), cbind(2,1,0), cbind(1), cbind(1,2))}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.