www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/SetRateConversionSettingsOfTunedPIDBlockExample.m
%% Set Rate Conversion Settings of Tuned PID Block % Create an |slTuner| interface for the Simulink model |scdcascade|. % Set the block rate conversion settings of one of the tuned blocks. %% open_system('scdcascade'); st = slTuner('scdcascade',{'C1','C2'}); %% % Examine the default block rate conversion for the PID Controller block % |C1|. [IF,DF] = getBlockRateConversion(st,'C1') %% % By default, both the integrator and derivative filter controller methods % are |Trapezoidal|. Set the integrator to |BackwardEuler| and the % derivative to |ForwardEuler|. IF = 'BackwardEuler'; DF = 'ForwardEuler'; setBlockRateConversion(st,'C1',IF,DF);