Parallel connection of two models
parallel
sys = parallel(sys1,sys2)
sys = parallel(sys1,sys2,inp1,inp2,out1,out2)
sys = parallel(sys1,sys2,'name')
parallel
connects two model objects in parallel. This function accepts any type of model. The two systems must be either both continuous or both discrete with identical sample time. Static gains are neutral and can be specified as regular matrices.
sys = parallel(sys1,sys2)
forms the basic parallel connection shown in the following figure.
This command equals the direct addition
sys = sys1 + sys2
sys = parallel(sys1,sys2,inp1,inp2,out1,out2)
forms the more general parallel connection shown in the following figure.
The vectorsinp1
andinp2
contain indexes into the input channels ofsys1
andsys2
, respectively, and define the input channelsu1andu2in the diagram. Similarly, the vectorsout1
andout2
contain indexes into the outputs of these two systems and define the output channelsy1andy2in the diagram. The resulting modelsys
has [v1;u;v2] as inputs and [z1;y;z2] as outputs.
sys = parallel(sys1,sys2,'name')
connectssys1
andsys2
by matching I/O names. You must specify all I/O names ofsys1
andsys2
. The matching names appear insys
in the same order as insys1
. For example, the following specification:
sys1 = ss(eye(3),'InputName',{'C','B','A'},'OutputName',{'Z','Y','X'}); sys2 = ss(eye(3),'InputName',{'A','C','B'},'OutputName',{'X','Y','Z'}); parallel(sys1,sys2,'name')
d = C B A Z 1 1 0 Y 1 1 0 X 0 0 2 Static gain.
Note
Ifsys1
andsys2
是并行模型数组,返回模型数组sys
of the same size, wheresys(:,:,k)=parallel(sys1(:,:,k),sys2(:,:,k),inp1,...)
.
SeeKalman Filteringfor an example.