Wiki

Clone wiki

piddesign / Home

PIDDESIGN

R20150513

Software description

PIDDESIGN is a software for simple step-response-based-identification, fast PID controller tuning and effective quality test using simulation of control.

If you use the software PIDDESIGN for research purposes, we would be happy to hear about it. Please let us know at juraj.oravec@stuba.sk.

BibTeX entry for citation:

@inproceedings{piddesign,

author = {Oravec, J. and Bako\v{s}ov\'a, M.},

title = {{PIDDESIGN} - Software for PID Control Education},

booktitle = {IFAC Conference on Advances in PID Control},

url = {https://bitbucket.org/oravec/piddesign/wiki/},

year = {2012},

}

Software localization

The software is recently localized into following languages:

  • English

  • Slovak

Software compatibility

The software has been created in MATLAB-Simulink programming environment and uses its graphical user interface to make software more interactive. Therefore it can be run in MATLAB v7 - Simulink v6.5 and newer.

Software installation

To install the software in a successful way, go through the following seven steps:

Step 1: Download the software package from the link: https://bitbucket.org/oravec/piddesign/downloads

Step 2: Unzip the package into the required home-folder (e.g.: MATLAB/toolbox/piddesign)

Step 3: Run MATLAB

Step 4: In the MATLAB menu use File/Set Path...

Step 5: Use button [Add with Subfolders...]

Step 6: Find out the chosen home-folder

Step 7: Use button [Save] to save the changes.

Alternatively, you can use tbxmanager to install PIDDESIGN by typing:

tbxmanager install piddesign
and to update mup you can type:
tbxmanager update piddesign

Software initialization

The software can be run in MATLAB command window by typing: "piddesign" Then the main window of software is opened.

Software termination

It is recommended to shut down the software using the possibility "Shut Down" in the "Setup" menu.

Identification

Using the button [Identification] of the main window, the new window is open. The next window offers three identification possibilities:

  • Step Response Data – enables to identify the controlled process directly from the data file. Data are obtained from the measured and recorded step response.

  • Load the Data File – enables to run identification from the data stored in an external data file.

  • Process Model Data – enables to identify process model with required properties of the transfer function.

Step Response Data

Two windows are opened. First one contains figure with step response of output variable y(t) and control input u(t). The second one contains a table where the user must enter parameters of the identified process.

You can choose between two types of step responses:

  • Aperiodic

  • Damped Periodic

  • Nonminimal phase

  • 1st Order System

  • 1st or 2nd Order System

Aperiodic

You must enter input parameters:

  • u_0 – initial value of the input variable u(t)

  • u_Inf – final value of input variable u(t) * y_0 – initial value of output variable y(t)

  • y_Inf – final value of output variable y(t)

  • t_0 – the time of the step response

  • t_D – the time of the change of the output variable i.e. time delay

  • t_1 – the time corresponding to the tangent step response inflex point in the parameter y_0

  • t_2 –the time corresponding to the tangent step response inflex point in the parameter y_Inf

  • Sim_Time – simulation time

When all parameters are specified, use button [Identification]. The new window with 2 options of step response types is opened:

  • 1st Order System

  • n – th Order System

Using the button [1st Order System], the software makes the identification by the Strejc method to obtain aperiodic model by approximation by 1st order system.

Using the button [n-th Order System], the software makes the identification by the Strejc method to obtain the aperiodic model, but this model cannot be described by 1st order transfer function.

Then 3 windows are opened:

First one contains figure with step response of output variable y(t) and the tangent line.

The second one contains parameters of identified process and button [Controller Tuning]. Using this button process of controller tuning will start (see the section "Controller Tuning")

Third one contains 3 other options:

  • Identification Tuning – you can receive the transfer function, which generates the step response that covers the original one more precisely. The difference between the original step response and the step response obtained by the identification using the modified position of the tangent is directly displayed as a red area in the new window.

  • Comparison – software compares the original and identified step response graphically and analytically.

  • Get lower order model – you can receive the transfer function of the system by approximation of identified model by lower order model.

Damped periodic

You must enter input parameters:

  • u_0 – initial value of the input variable u(t)

  • u_Inf – final value of input variable u(t)

  • y_0 – initial value of output variable y(t)

  • y_Max – maximum value of the output variable y(t)

  • y_Min - minimum value of the output variable y(t), which follows y_Max * y_Inf – final value of output variable y(t)

  • t_0 – the time of step response

  • t_D – the time of the change of the output variable i.e. time delay

  • t_Max –time which corresponds to y_Max

  • t_Min - time which corresponds to y_Min

  • Sim_Time – simulation time

When all parameters are specified, use button [Identification]. Then 3 windows are opened:

First one contains figure with step response of output variable y(t).

The second one contains parameters of identified process and button [Controller Tuning]. By using this button process of controller tuning will start (see the section "Controller Tuning").

Third one contains 2 other options:

  • Identification Tuning – you can receive the transfer function, which generates the step response that covers the original one more precisely. The difference between the original step response and the step response obtained by the identification using the modified position of the tangent is directly displayed as a red area in the new window.

  • Comparison – software compares the original and identified step response graphically and analytically.

Nonminimal phase

You must enter input parameters:

  • u_0 – initial value of the input variable u(t)

  • u_Inf – final value of input variable u(t)

  • t_0 – the time of step response

  • t_D – the time of the change of the output variable i.e. time delay

  • y_0 – initial value of output variable y(t)

  • t_Min – time which corresponds to y_Min

  • y_Min - minimum value of the output when the gain is greater than 0 (or the maximum, if gain is less than 0)

  • t_47 – time which corresponds to y_47

  • y_47 – output value of 47% gain

  • t_90 – time which corresponds y_90

  • y_90 – output value of 90% gain

  • y_Inf - final value of output variable y(t) * Sim_Time – simulation time

When all parameters are specified, use button [Identification]. Then 2 windows are opened:

First one contains figure with step response of output variable y(t).

The second one contains parameters of the identified process. 1st Order System You must enter input parameters:

  • u_0 – initial value of the input variable u(t)

  • u_Inf – final value of input variable u(t)

  • t_0 – the time of step response

  • t_D – the time of the change of the output variable i.e. time delay

  • y_0 – initial value of output variable y(t)

  • t_30 – time which corresponds to y_30

  • y_30 - output value of 30% gain

  • t_70 - time which corresponds to y_70

  • y_70 - output value of 70% gain * y_Inf – final value of output variable y(t)

  • Sim_Time – simulation time

When all parameters are specified, use button [Identification]. Then 3 windows are opened:

First one contains figure with step response of output variable y(t).

The second one contains parameters of identified process and button [Controller Tuning]. Using this button process of controller tuning will start (see the section "Controller Tuning") Third one contains 3 other options:

  • Identification Tuning – you can receive the transfer function, which generates the step response that covers the original one more precisely. The difference between the original step response and the step response obtained by the identification using the modified position of the tangent is directly displayed as a red area in the new window.

  • Comparison – software compares the original and identified step response graphically and analytically.

  • Get lower order model – you can receive the transfer function of the system by approximation of identified model by lower order model (lower than 1 does not exist)

1st or 2nd Order System

You must enter input parameters:

  • n – system order (possibility to choose the 1st or the 2nd order system)

  • u_0 – initial value of the input variable u(t)

  • u_Inf – final value of input variable u(t)

  • t_0 – the time of step response

  • t_D – the time of the change of the output variable i.e. time delay

  • y_0 – initial steady-state value of the output variable

  • t_33 – time which corresponds to the value of output of 33% gain

  • t_70 - time which corresponds to the value of output of 70% gain

  • y_Inf – final value of output variable y(t)

  • Sim_Time – simulation time

When all parameters are specified, use button [Identification]. Then 3 windows are opened:

First one contains figure with step response of output variable y(t).

The second one contains parameters of identified process and button [Controller Tuning]. Using this button process of controller tuning will start (see the section "Controller Tuning").

Third one contains 3 other options:

  • Identification Tuning – you can receive the transfer function, which generates the step response that covers the original one more precisely. The difference between the original step response and the step response obtained by the identification using the modified position of the tangent is directly displayed as a red area in the new window.

  • Comparison – software compares the original and identified step response graphically and analytically.

  • Get lower order model – you can receive the transfer function of the system by approximation of identified model by lower order model (lower than 1 does not exist).

Load the Data File

The program opens the new window, where the user can comfortably find out a required data file containing recorded step-response data. The considered structure of the data file is as follows, the first column vector represents a time and the second column vector represents associated measured values of the output variable.

Next window shows a figure of the step response. Another window requires entering the parameter for normalization:

  • t_0 – the time of the step change

  • delta_u – size of the step change

Use the button [Normalization]. Next window shows a figure of normalized step response.

In the next window, there is a choice of data processing:

  • Filtration

  • Identification

To obtain the aperiodic model of the controlled process, the user can directly use the button [Identification]. When the damped periodic model is required, the user can simply activate the checkbox [Periodic process] and then use the button [Identification]. If the controlled process has been identified using the Strejc method, the tangent to the step response is also depicted and its equation is given.

Filtration

If the loaded step–response data are noisy, the user can use the filtration before identification, simply using the button [Filtration]. Then the new window for filtration is opened. You must enter input parameters:

  • order – order of the filter n

  • omega – filter frequency (values from [0;1])

User gets:

  • Filtration error – difference between filtered signal and origin

All entered parameters are needed to count parameters of the filter a, b. These coefficients can be counted by using different methods. It is possible to design non-recursive filter parameters (FIR). Types of the recursive filter (IIR):

  • Butterworth

  • Chebyshev

  • Chebyshev inv.

  • elliptical

With regard to the frequency of affecting the measured signal can be selected from various types of the proposed filter:

  • low-pass

  • high-pass

  • bandstop

There is a choice of the method of filtration:

  • simple

  • improved

After filtration software automatically displays a graph of filtered and unfiltered signal for easier visual evaluation of filtration.

By using the button [Save], the user can simply store reached filtered data into the new data file for later usage. After filtration, identification can be started.

Process Model Data

The program opens a new window for the transfer function of the known parameters of the model. User can choose type of the transfer function

  • General transfer function

  • Aperiodic

  • Damped Periodic

General transfer function

You must enter input parameters:

  • NUM - numerator of the model system transfer function

  • DEN - denominator of the model system transfer function

  • D – time delay

  • Sim_Time – simulation time

To obtain the aperiodic model of the controlled process, the user can directly use the button Identification. When the damped periodic model is required, the user can simply activate the checkbox [Periodic process] and then use the button [Identification].

Results of the identification will be displayed in new windows.

Aperiodic

You must enter input parameters:

  • n - order

  • K - gain

  • T - time constant

  • Sim_Time – simulation time

Software makes the identification by the Strejc method to obtain aperiodic model by approximation using the lower order system if required. Results of the identification will be displayed in new windows

Damped Periodic

You must enter input parameters:

  • K - gain

  • T_pe - time constant

  • ksi_pe - damping coefficient - values from an interval [0;1]

  • D_pe - time delay

  • Sim_Time - simulation time

Results of the identification will be displayed in new windows.

Controller Tuning

Using the button [Controller Tuning] of the main window, the new window for controlled system parameters design will be opened.

Choose a type of the system on the upper side of the window. There are two options:

  • Transfer function by Strejc The aperiodic process can be described using transfer function by Strejc in (1)

G = K/(Ts + 1)^nexp( - D*s) (1)

Inputs of the transfer function by Strejc:

  • n - order

  • K - gain

  • T - time constant

  • D - time delay

Damped periodic transfer function

The damped periodic process can be described using the associated parameters of the transfer function in (2).

G_pe = K/(T_pe^2s + 2ksi_peT_pes + 1)exp( - D_pes) (2)

Inputs of the damped periodic transfer function:

  • K - gain

  • T_pe - time constant

  • ksi_pe - damping coefficient - values are an open interval (0;1)

  • D_pe - time delay

Using the button [Controller Tuning] opens the new window for PID controller tuning. The required type of the PID controller can be chosen using the associated radio-button:

  • P

  • PI

  • PID

  • PD

and choosing the radio-button of the required class of controller tuning methods:

  • Experimental methods

  • Analytical methods

Using the popup menu enables to choose from the list of the available methods.

Using the button [Controller tuning] the controller with the set properties will be designed. A new window for control performance check using the simulation of control will be opened.

PID Controller Parameters

In the upper left part of the window are shown the calculated parameters of the designed controller in (3)

Gr = (Z_Rs + Z_R/T_I + Z_RT_D*s^2)/s (3)

Input & Output parameters:

  • Z_R - proportional gain

  • T_I - integral time constant

  • T_D - derivative time constant

  • T_R – anti-windup gain parameter of an integral part

  • T_D - filter of the derivative part

Process Model

In the upper right part are shown the parameters of the controlled system in (4)

G = NUM/DENexp( - Ds) (4)

Input & Output parameters:

  • NUM - numerator of the controlled system transfer function

  • DEN - denominator of the controlled system transfer function

  • D - time delay of the controlled system

Setpoint w(t)

In the middle left part of are shown the parameters for the setpoint tracking. Input parameters:

  • W_Initial - initial value of set point

  • W_Final - final value of set point

  • W_Step_Change - time of the step change

Disturbance r(t)

In the middle right part of are shown the parameters for the disturbance rejection.

Input parameters:

  • R_Initial - initial value of disturbance

  • R_Final - final value of disturbance

  • R_Step_Change - time of the step change

Simulation parameters

In the upper right part are shown simulation parameters Input parameters:

  • Control_Precision - tolerance of the setpoint neighborhood

  • Sim_Time - simulation time

  • U_Min_Boundary - lower constraint on the control input

  • U_Max_Boundary - upper constraint on the control input

Using the button [Step response] the simulation of control will be started.

Then the various figures are opened:

  • poles and zeros of the closed loop transfer function

  • control performance of the controlled output

  • associated control input with and without saturation generated by the tuned controller

Also the new window with various calculated quality criteria. The background color indicates the relative property of the value. The green background color indicates suitable value, the yellow color medium, and the red color is used for relatively high value. These color-based decisions have just informative significance.

Quality Criteria

Output parameters:

  • Settling_Time - settling time

  • Max_Overshoot - maximal overshoot [%]

  • IAE

  • ISE

  • ITAE

  • ITSE

  • ISTAE

  • ISTSE

  • ISE_u

  • ISE_du

  • ISE_de

Using the button [Back] the previous window will be returned.

Software Settings

In the main window of the software, you can press the [Setup] button, which opens a new window. It contains 4 options:

[Shut Down] – properly shut down the program and saved some settings, such as the language preferences or color effects.

[Reset] - restart the program PIDDESIGN.

[Close Graphs] - close all windows with depicted graphs, which can be used when longer work with the program is necessary.

[Help] – runs file „help.html“.

Illustrative Examples

Example 1.1

PID controller tuning for controlled system described by the known transfer function

Using the button [Controller Tuning] of the main window, the new window for controlled system parameters design will be opened. The aperiodic process can be described using transfer function by Strejc (1). The damped periodic process can be described using the associated parameters of the transfer function (2).

G = K/(Ts + 1)^nexp( - D*s) (1)

G_pe = K/(T_pe^2s + 2ksi_peT_pes + 1)exp( - D_pes) (2)

Inputs of the transfer function by Strejc:

  • n - order

  • K - gain

  • T - time constant

  • D - time delay

Inputs of the damped periodic transfer function:

  • K - gain

  • T_pe - time constant

  • ksi_pe - damping coefficient - values from [0;1]

  • D_pe - time delay

Using the button [Controller Tuning] opens the new window for PID controller tuning. The required type of the PID controller can be chosen using the associated radio-button:

  • P

  • PI

  • PID

  • PD

and choosing the radio-button of the required class of controller tuning methods:

  • Experimental methods

  • Analytical methods

Using the popup menu enables to choose from the list of the available methods.

Using the button [Controller tuning] the controller with the set properties will be designed. A new window for control performance check using the simulation of control will be opened. In the upper left part of the window, the calculated parameters of the designed controller (3) are shown.

Gr = (Z_Rs + Z_R/T_I + Z_RT_D*s^2)/s (3)

PID Controller Parameters

Input & Output parameters:

  • Z_R - proportional gain

  • T_I - integral time constant

  • T_D - derivative time constant

  • T_R - antiwindup parameter of an integral part

  • T_D - filter of the derivative part

In the upper right part are shown the parameters of the controlled system (4).

G = NUM/DENexp( - Ds) (4)

Process Model

Input & Output parameters:

  • NUM - numerator of the controlled system transfer function

  • DEN - denominator of the controlled system transfer function

  • D - time delay of the controlled system

In the middle left part of are shown the parameters for the setpoint tracking.

Setpoint w(t)

Input parameters:

  • W_Initial - initial value of set point

  • W_Final - final value of set point

  • W_Step_Change - time of the step change

In the middle right part of are shown the parameters for the disturbance rejection.

Disturbance r(t)

Input parameters:

  • R_Initial - initial value of disturbance
  • R_Final - final value of disturbance
  • R_Step_Change - time of the step change

In the upper right part are shown

Simulation parameters

Input parameters:

  • Control_Precision - tolerance of the set point

  • Sim_Time - simulation time

  • U_Min_Boundary - lower constraint of the control input

  • U_Max_Boundary - upper constraint of the control input

Using the button [Step response] the simulation of control will be started.

Then the various figures are opened:

  • poles and zeros of the closed loop transfer function

  • control performance of the controlled output

  • associated control input generated by the tuned controller

And the new window with various calculated quality criteria. The background color indicates the relative property of the value. The green background color indicates suitable value, the yellow color medium, and the red color is used for relatively high value. These color-based decisions have just informative significance.

Quality Criteria

Output parameters:

  • Settling_Time - settling time

  • Max_Overshoot - maximal overshoot [%]

  • IAE

  • ISE

  • ITAE

  • ITSE

  • ISTAE

  • ISTSE

  • ISE_u

  • ISE_du

  • ISE_de

Using the button [Back] the previous window will be returned.

Updated