parallel

Parallel connection of two models

Syntax

parallel
sys = parallel(sys1,sys2)
sys = parallel(sys1,sys2,inp1,inp2,out1,out2)
sys = parallel(sys1,sys2,'name')

Description

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 vectors inp1 and inp2 contain indexes into the input channels of sys1 and sys2, respectively, and define the input channels u1 and u2 in the diagram. Similarly, the vectors out1 and out2 contain indexes into the outputs of these two systems and define the output channels y1 and y2 in the diagram. The resulting model sys has [v1 ; u ; v2] as inputs and [z1 ; y ; z2] as outputs.

sys = parallel(sys1,sys2,'name') connects sys1 and sys2 by matching I/O names. You must specify all I/O names of sys1 and sys2. The matching names appear in sys in the same order as in sys1. 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')

returns this result:

d = 
      C  B  A
   Z  1  1  0
   Y  1  1  0
   X  0  0  2
 
Static gain.

    Note:   If sys1 and sys2 are model arrays, parallel returns model array sys of the same size, where sys(:,:,k)=parallel(sys1(:,:,k),sys2(:,:,k),inp1,...).

Examples

See Kalman Filtering for an example.

See Also

| |

Was this topic helpful?