Set a custom parameterization for one of the tunable blocks.
C1CustParam = realp('Kp',1) + tf(1,[1 0]) * realp('Ki',1);
setBlockParam(st,'C1',C1CustParam);
These commands set the parameterization of the C1 controller block to a generalized
state-space (genss) model containing two tunable parameters, Ki and Kp.
Create a structure of tunable element values, setting Kp to 5 and Ki to 10.
S = struct('Kp',5,'Ki',10);
Set the values of the tunable elements in st.
setTunedValue(st,S);
Set Value of Tuned Block Parameterization Using Generalized State-Space Model
Convert an slTuner interface for the Simulink® model rct_diskdrive to a genss
model to tune the model blocks using hinfstruct. After tuning, update the slTuner
interface with the tuned parameters and write the parameter values to the Simulink
model for validation.
Use of hinfstruct requires a Robust Control Toolbox license.
setTunedValue