www.gusucode.com > control 案例程序 matlab源码代码 > control/FirstOrderStepResponseWithKnownTimeConstantExample.m
%% First-Order Step Response With Known Time Constant % Create a requirement that specifies a first-order step response with time % constant of 5 seconds. Create the requirement for the step response from % a signal named |'r'| to a signal named |'y'|. %% Req = TuningGoal.StepResp('r','y',5); %% % When you use this requirement to tune a control system % model, |T|, the time constant 5 is taken to be expressed in the % prevailing units of the control system. For example, if |T| is a |genss| % model and the property |T.TimeUnit| is |'seconds'|, then this requirement % specifies a target time constant of 5 seconds for the response from the % input |'r'| to the output |'y'| of |'T'|. % % The specified time constant is converted into a reference state-space model stored in % the |ReferenceModel| property of the requirement. refsys = tf(Req.ReferenceModel) %% % As expected, |refsys| is a first-order model. % % Examine the requirement. The |viewSpec| command displays the target % response, which is the step response of the reference model. viewSpec(Req); %% % The dashed line shows the target step response specified by this % requirement, a first-order response with a time constant of five seconds.