Documentation Center |
Open PID Tuner for PID tuning
pidtool(sys,type)
pidtool(sys,Cbase)
pidtool(sys)
pidtool
pidtool(sys,type) launches the PID Tuner GUI and designs a controller of type type for plant sys.
pidtool(sys,Cbase) launches the GUI with a baseline controller Cbase so that you can compare performance between the designed controller and the baseline controller. If Cbase is a pid or pidstd controller object, the PID Tuner designs a controller of the same form, type, and discrete integrator formulas as Cbase.
pidtool(sys) designs a parallel-form PI controller.
pidtool launches the GUI with default plant of 1 and proportional (P) controller of 1.
sys |
Plant model for controller design. sys can be:
If the plant has unstable poles, and sys is either:
then you must specify the number of unstable poles in the plant. To do this, After launching the PID Tuner GUI, click the button to open the Import Linear System dialog box. In that dialog box, you can reimport sys, specifying the number of unstable poles where prompted. | ||||||||||||||||||||||||||||||||
type |
Controller type (actions) of the controller you are designing, specified as one of the following strings:
When you use the type input, the PID Tuner designs a controller in parallel form. If you want to design a controller in standard form, Use the input Cbase instead of type, or select Standard from the Form menu. For more information about parallel and standard forms, see the pid and pidstd reference pages. If sys is a discrete-time model with sampling time Ts, the PID Tuner designs a discrete-time pid controller using the ForwardEuler discrete integrator formula. If you want to design a controller having a different discrete integrator formula, use the input Cbase instead of type or the Preferences dialog box. For more information about discrete integrator formulas, see the pid and pidstd reference pages. | ||||||||||||||||||||||||||||||||
Cbase |
A dynamic system representing a baseline controller, permitting comparison of the performance of the designed controller to the performance of Cbase. If Cbase is a pid or pidstd object, the PID Tuner also uses it to configure the type, form, and discrete integrator formulas of the designed controller. The designed controller:
If Cbase is any other dynamic system, the PID Tuner designs a parallel-form PI controller. You can change the controller form and type using the Form and Type menus after launching the PID Tuner. |
Interactive PID Tuning of Parallel-Form Controller
Launch the PID Tuner to design a parallel-form PIDF controller for a discrete-time plant:
Gc = zpk([],[-1 -1 -1],1); Gd = c2d(Gc,0.1); % Create discrete-time plant pidtool(Gd,'pidf') % Launch PID Tuner
Interactive PID Tuning of Standard-Form Controller Using Integrator Discretization Method
Design a standard-form PIDF controller using BackwardEuler discrete integrator formula:
Gc = zpk([],[-1 -1 -1],1); Gd = c2d(Gc,0.1); % Create discrete-time plant % Create baseline controller. Cbase = pidstd(1,2,3,4,'Ts',0.1,... 'IFormula','BackwardEuler','DFormula','BackwardEuler') pidtool(Gd,Cbase) % Launch PID Tuner
The PID Tuner designs a controller for Gd having the same form, type, and discrete integrator formulas as Cbase. For comparison, you can display the response plots of Cbase with the response plots of the designed controller by clicking the Show baseline checkbox on the PID Tuner GUI.
For PID tuning at the command line, use pidtune. pidtune can design controllers for multiple plants at once.
Åström, K. J. and Hägglund, T. Advanced PID Control, Research Triangle Park, NC: Instrumentation, Systems, and Automation Society, 2006.