selectsys {control}R Documentation

Select/Remove Subsystem in State-space Model

Description

selectsys extracts a subsystem from a larger state-space system. removesys removes specified inputs, outputs, and state from a state-space system.

Usage

selectsys(statesys, inputs, outputs, states)
       removesys(statesys, inputs, outputs, states)

Arguments

statesys

LTI system model of state-space model

inputs

single integer or vector specifying the particular inputs to be selected/removed

outputs

single integer or vector specifying the particular outputs to be selected/removed

states

single integer or vector specifying the particular states to be selected/removed

Details

subsys <- selectsys(statesys,inputs,outputs) will extract a state space subsystem with the specified inputs and outputs.

subsys <- selectsys(statesys, inputs,outputs,states) will return the state space subsystem with the specified inputs, outputs, and states.

subsys <- removesys(statesys, inputs, outputs) will remove the specified inputs and outputs from the system.

subsys <- removesys(statesys, inputs, outputs, states) will also return a state-space model with the specified inputs, outputs, and states removed from the system.

Value

Returns a subsystem of the state-space model

See Also

append

Examples

A <- rbind(c(33,2,5), c(23,200,2), c(9,2,45))
B <- rbind(c(4,5), c(12,5), c(82,1))
C <- rbind(c(34,56,2), c(6,2,112))
D <- rbind(c(2,0), c(0,19))
sys1 <- ss(A, B, C, D)
 selectsys(sys1, 1, 1) # extract subsystem for only input 1 and output 1
 selectsys(sys1, 2,2) # extract subsystem for only input 2 and output 2
 selectsys(sys1, 2, 1:2) # extract subsystem for only input 1 and output 1 to 2
 selectsys(sys1, 1:2, 2) # extract subsystem for only input 1 to 2 and output 2 to 2
 selectsys(sys1, 2, 2, 1:2) # extract subsystem for only input 2 and output 2 but states 1 to 2
 removesys(sys1, 1,2) # removes input 1 and output 2

[Package control version 0.2.5 Index]