vssLinearizeSuperBlock

Perform linearization of Super Block.

Syntax

[A,B,C,D] = vssLinearizeSuperBlock(mdlfilename,blkname,inputs,outputs)

[A,B,C,D] = vssLinearizeSuperBlock(mdlfilename,blkname,inputs,outputs,tf)

[A,B,C,D] = vssLinearizeSuperBlock(mdlfilename,blkname,inputs,outputs,tf,ctx)

Inputs

mdlfilename
Filename of the model or the model handler.
Type: char
Dimension: string
blkname
Fullname of the superblock to be linearized.
Type: char
Dimension: string
inputs
Inputs to be used for the linearization, with indices greater than 1.
Type: integer
Dimension: vector
outputs
Outputs to be used for the linearization, with indices greater than 1.
Type: integer
Dimension: vector
tf
Optional argument with the time to linearize around. Default value: 0.
Type: double | integer
Dimension: scalar
ctx
A structure that defines the external context. Default value is an empty struct.
Type: context
Dimension: struct

Outputs

A
System matrix.
Type: double
Dimension: matrix
B
Control matrix.
Type: double
Dimension: matrix
C
Output matrix.
Type: double
Dimension: matrix
D
Free-forward matrix.
Type: double
Dimension: matrix

Example

Get q variable from the base. If not found, value 0 is used.

inps = 1; % vector of input port indices considered for linearization
outs = [1,2]; % vector of output port indices considered for linearization
% Modified context
ctx=struct; 
ctx.z0 = 0;
ctx.th0 = 0;
ctx.phi = 0;
model=bdeGetCurrentModel;
superblock = 'pendulum'; % Selected Super block to linearize
[A,B,C,D] = vssLinearizeSuperBlock(model,superblock,inps,outs,0,ctx);