single loop feedback/prefilter compensator design -凯发k8网页登录
this example shows how to tune multiple compensators (feedback and prefilter) to control a single loop using control system designer.
open the model
open the engine speed control model and take a few moments to explore it.
open_system('scdspeedctrl')
design overview
this example introduces the process of designing a single-loop control system with both feedback and prefilter compensators. the goal of the design is to:
track the reference signal from a simulink step block
scdspeedctrl/speed reference
. the design requirement is to have a settling time of under 5 seconds and zero steady-state error to the step reference input.reject an unmeasured output disturbance specified in the subsystem
scdspeedctrl/external disturbance
. the design requirement is to reduce the peak deviation to 190 rpm and to have zero steady-state error for a step disturbance input.
in this example, the stabilization of the feedback loop and the rejection of the output disturbance are achieved by designing the pid compensator scdspeedctrl/pid controller
. the prefilter scdspeedctrl/reference filter
is used to tune the response of the feedback system to changes in the reference tracking.
open control system designer
this example uses control system designer to tune the compensators in the feedback system. to open the control system designer
launch a pre-configured control system designer session by double-clicking the subsystem in the lower left corner of the model.
configure control system designer using the following procedure.
start a new design
to open control system designer, in the simulink model window, in the apps gallery, click control system designer.
the edit architecture dialog box opens when the control system designer launches.
in the edit architecture dialog box, on the blocks tab, click add blocks, and select the following blocks to tune:
scdspeedctrl/reference filter
scdspeedctrl/pid controller
on the signals tab, the analysis points defined in the simulink model are automatically added as locations.
input:
scdspeedctrl/speed reference
output port 1
input
scdspeedctrl/external disturbance/step disturbance
output port 1
output
scdspeedctrl/speed output
output port 1
on the linearization options tab, in the operating point drop-down list, select model initial condition.
create new plots to view the step responses while tuning the controllers. in control system designer, click new plot, and select new step. in the select response to plot drop-down menu, select new input-output transfer response. configure the response as follows:
to view the response, click plot.
similarly, create a step response plot to show the disturbance rejection. in the new step to plot dialog box, configure the response as follows:
tune compensators
control system designer contains several methods tuning a control system:
manually tune the parameters of each compensator using the compensator editor. for more information, see .
graphically tune the compensator poles, zeros, and gains using open/closed-loop bode, root locus, or nichols editor plots. click tuning methods, and select an editor under graphical tuning.
optimize compensator parameters using both time-domain and frequency-domain design requirements (requires simulink design optimization™ software). click tuning methods, and select optimization based tuning. for more information, see (simulink design optimization).
compute initial compensator parameters using automated tuning based on parameters such as closed-loop time constants. click tuning methods, and select either pid tuning, internal model control (imc) tuning, loop shaping (requires robust control toolbox™ software), or lqg synthesis.
completed design
the following compensator parameters satisfy the design requirements:
scdspeedctrl/pid controller
has parameters:
p = 0.0012191 i = 0.0030038
scdspeedctrl/reference filter
:
numerator = 10 denominator = [1 10]
the responses of the closed-loop system are shown below:
update simulink model
to write the compensator parameters back to the simulink model, click update blocks. you can then test your design on the nonlinear model.
bdclose('scdspeedctrl')