www.gusucode.com > control 案例程序 matlab源码代码 > control/CustomRolloffSpecificationExample.m
%% Custom roll-off specification % Create a gain constraint that constrains the response from a signal |'du'| to % a signal |'u'| to roll off at 20 dB/decade at frequencies % greater than 1. The gain constraint also specifies disturbance rejection % (maximum gain of 1) in the frequency range [0,1]. %% gmax = frd([1 1 0.01],[0 1 100]); Req = TuningGoal.Gain('du','u',gmax); %% % These commands use a |frd| model to specify the gain profile as a % function of frequency. The maximum gain of 1 dB at the frequency 1 rad/s, % together with the maximum gain of 0.01 dB at the frequency 100 rad/s, % specifies the desired rolloff of 20 dB/decade. % % The software converts |gmax| into a smooth function of frequency that % approximates the piecewise specified requirement. Display the error % requirement using |viewSpec|. viewSpec(Req) %% % The yellow region indicates where the requirement is violated.