Modify value of Control Design Block in Generalized Model
M = setBlockValue(M0,blockname,val)
M = setBlockValue(M0,blockvalues)
M = setBlockValue(M0,Mref)
the value of several Control Design Blocks at once. The structure
M = setBlockValue(
the blocks and replacement values. Blocks of
blockvalues are unchanged.
replacement values from Control Design blocks in the Generalized
M = setBlockValue(
Mref. This syntax modifies the
Control Design Blocks in
M0 to match the current
values of all corresponding blocks in
Use this syntax to propagate block values, such as tuned parameter values, from one parametric model to other models that depend on the same parameters.
Model containing the blocks whose current or nominal value
is modified to
To get a list of the Control Design Blocks in
Replacement value for the current or nominal value of the Control
Structure specifying Control Design Blocks of
Generalized Model that shares some Control Design Blocks with
Propagate the values of tuned parameters to other Control Design Blocks.
You can use the Robust Control Toolbox™ tuning commands such
tune blocks in a closed-loop model of a control system. If you do
so, the tuned controller parameters are embedded in a Generalized
LTI Model. You can use
setBlockValue to propagate
those parameters to a controller model.
Create a tunable model of the closed-loop response of
a control system, and tune the parameters using
G = tf([1,0.0007],[1,0.00034,0.00086]); Cpi = ltiblock.pid('Cpi','pi'); a = realp('a',10); F0 = tf(a,[1 a]); C0 = Cpi*F0; T0 = feedback(G*C0,1); T = hinfstruct(T0);
The controller model
C0 is a Generalized
LTI model with two tunable blocks,
The closed-loop model
T0 is also a Generalized
LTI model with the same blocks. The model
the tuned values of these blocks.
Propagate the tuned values of the controller in
the controller model
C = setBlockValue(C0,T)
C = Generalized continuous-time state-space model with 1 outputs, 1 inputs, 2 states, and the following blocks: Cpi: Parametric PID controller, 1 occurrences. a: Scalar parameter, 2 occurrences. Type "ss(C)" to see the current value, "get(C)" to see all properties, and "C.Blocks" to interact with the blocks.
C is still a Generalized model. The current
value of the Control Design Blocks in
C are set
to the values the corresponding blocks of
Obtain a Numeric LTI model of the controller with the
tuned values using
CVal = getValue(C0,T);
This command returns a numerical state-space model of the tuned controller.