6. Controller Plugin

6.1. Introduction

The Controller plugin allows the creation of dynamic user defined control channels.

6.2. Controller Channel List

All controller channels are shown in the Controller Channels list.

Figure 1: Controller Channel list

You can identify the different types of channels (cooling module Q-, heating module Q+…) by the different signs in front of the module names (see Figure above). The list of controller channels is a View, that you can move freely at any time to another position in the graphic interface by dragging and dropping the title bar, or you can move it out of the interface to become a separate window.

The channel list shows all the available controller channels in tabular form. The following columns are present:

  • Controller - shows the name of the controller module and indicates its type by a sign.

  • On - indicates by a green LED whether the controller is switched on or off. Click the LED to switch the control loop on / off.

  • Setpoint -contains the set setpoint of the controller channel

  • Actual Value - shows the actual value

6.2.1. Channel types

The following types of channels are currently supported:

image1

Qmix Q- cooling modules

image2

Qmix Q+ heating modules

image3

dynamically generated, custom channels

6.2.2. Changing channel names

You can change the name of a channel at any time and, for example, assign a name suitable for your particular application.

Figure 2: Changing channel names

You change a name by the following steps:

  1. Double-click the table cell containing the name you want to change.

  2. Enter the new name in the Editing window which now appears (Figure above).

  3. Complete your entry by pressing the Return key.

6.2.3. Switching control devices on / off

Figure 3: Switching control devices on/off

To switch the controller on or off, simply click the LED of the channel you want to switch.

6.2.4. Entering setpoint

To input a setpoint, double-click in the Setpoint column of the channel with the setpoint you want to change. Now enter the setpoint in the editing window that opens (Figure below) or use the arrow buttons to raise or lower the setpoint incrementally.

Figure 4: Changing setpoint

6.3. Context menu for control channels

By right-click into the control channel list you can display a context menu with additional functions.

../_images/100002010000022300000129ACB2B97D.png

The context menu contains the following menu items:

image18

Configure Channel…

Opens the configuration dialog of the channel for configuring all channel parameters.

image19

Restore Default Settings

Restores the default settings of the channel.

image20

Reset Calibration

Resets the two-point scaling to scale factor 1 and offset 0

image21

Configure scaling…

Opens the configuration dialog displaying the page for configuration of the controller scaling.

image22

Select PID parameters…

Opens the configuration dialog displaying the page for configuration of the PID control parameters.

image23

Delete user channel

If the selected channel is a user-specified channel, it is deleted by selecting this menu item. For other channels this menu item is disabled.

image24

Create user channel

Opens up the wizard for creating user-specified control channels.

6.4. Configure Channel Settings

For opening the scaling configuration dialog select Configure channel in the context menu of the control channel.

Figure 6: Configure scaling

The configuration of the general channel settings and the calibration of the controller channels are identical to the configuration of the I/O channels of the I/O Plugin. For a detailed description read the section I/O Channel Configuration.

6.5. Selection and configuration of controller parameters

6.5.1. Overview

To set the optimal control behavior, you can adjust the controller parameters of each single channel. For this you can either choose from a list of predefined PID parameter sets or create new parameter sets.

To access the controller parameters selection, choose Select PID parameters from the controller channel context menu.

Figure 7: Selecting a control parameter set

The upper area shows the current parameters of the device Current Channel Parameters. In the lower area you will find a list of PID Parameter Presets .

6.5.2. Changing controller parameters

To edit the current controller parameters, double-click with the mouse in the Current Channel Parameters area in the field you want to change and enter the new value:

Figure 8: Changing controller parameters

6.5.3. Selecting a PID Parameter Preset

Figure 9: Selecting a PID Parameter Preset

Select a PID Preset from the table of available presets by left-clicking on it and then click on the Apply Preset button to apply the control parameters. The values in the Current Channel Parameters area are updated with the new values from the preset. Complete the configuration by clicking the Ok button.

The PID parameter presets already contain default controller parameter sets for different devices like Qmix Q+, Qmix Q- or Qmix TC or certain accessories, i.e. syringe heating or tube heating.

Tip

For optimum adaptation to the controlled systems in your application, you can create your own parameter sets with controller parameters.

6.5.4. Creating a PID Parameter Preset

By selecting the Create Preset button you create a new set of controller parameters . (see figure below) You can then edit the individual values of the parameter set by double-clicking in a field and entering a new value.

Figure 10: Creating a PID Parameter Preset

Enter a meaningful, unique name for each parameter set and adapt the controller parameters to the controlled system in your application. For finding adequate controller parameters proceed as described in section How to set controller parameters.

6.5.5. Deleting PID Parameter Presets

Select a set of controller parameters from the table and left-click the Delete Selected Preset button for deleting it. (see figure below).

../_images/1000020100000333000000D15C7BAB96.png

Important

Predefined controller parameters are locked and can not be deleted. Locked parameters can be recognized in the table by the lock symbol.

6.6. User defined control channels

6.6.1. Introduction

You can create customized control channels using arbitrary device properties for control loop input and output. Thus using i.e. a pressure measurement channel of a QmixP device and a Nemesys syringe pump you can build up a pressure control.

6.6.2. Creating control channels

By right-clicking the control channel list and selecting the menu item Create user channel in the context menu, you open the dialog for creating custom control channels.

Figure 12: Open controller channel creation dialog

In the configuration wizard that is displayed now, proceed as follows:

Figure 13: Selecting input and output values of the controller channel

  1. Select the device that provides the measurement value of the controller: Controller Input

  2. Select the device property that is used as measurement value.

  3. Select the device that provides the control value of the controller: Controller Output

  4. Select the device property that is used as control value.

  5. Click Next in order to proceed.

The final page of the wizard allows configuration of controller channel parameters as described in section Selection and configuration of controller parameters. You complete the control channel creation by clicking the Finish button.

Tip

You can change the controller parameters at any later time and adapt them perfectly to your controlled system.

6.6.3. Changing the output value scaling or unit

The output value is determined by the PID control algorithm and written to the output device without any scaling information. This means that you need to adjust the controller parameters, in particular the control value limits, each time you change the scaling or the unit of the appropriate device. With a Nemesys dosing module this is also true if you change the syringe size.

Important

If you change the scaling or unit of a device beeing part of a control loop you must check the control parameters and adjust them if necessary. With a neMESYS dosing module this also applies if you change the syringe.

6.7. How to set controller parameters

6.7.1. Closed control loop and PID controller equation

The controller (e.g. PID controller) and the controlled system (e.g. temperature-controlled system) together make up a feedback system, the closed control loop. (see figure below)

Figure 19: Closed control loop

A PID-controller determines thh control value u at the time t1 using the following equation:

../_images/math_08.png

The control value contains 3 shares.

math09

The proportional share (P) forms by means of the factor Kp the direct effect of the control error on the control value.

math10

The integral share (I) computes the sum of the error over the time and by means of Kp and the time constant Timaps it to the control value. The bigger Kpand the smaller Tithe bigger the integral share of the control value.

math11

The differential share depends on the temporal change of the actual value that is mapped to the control value by Kpand Td.

6.7.2. Preparations for setting controller parameters

Initially make the plot of the datalogger plugin show the measurement value and the control value to you. (refer to section Process Data Graph) It is recommended to do the same with the setpoint value. It is not necessary but facilitates orientation within the plot. (see figure below)

Figure 20: Configuration of the graphical logger for setting controller parameters

The setting for Log Interval depends on the change frequency of the actual value. You should get a useful graph if you set Log Interval to the sample time used by your control channel (see next section).

6.7.3. Choosing the sample time

The time between 2 computations of the control value is defined as sample time. The smaller the sample time the more often the control value is calculated. As a rule of thumb you can keep in mind that the sample time should not be higher than one tenth of the smallest time constant in the closed control loop. Experiences have shown that the following values achieved useful results (stable control) with the appropriate devices.

Application

Sample Time (ms)

Qmix Q+

500

Pressure control using Nemesys and Qmix P

50

Tip

For the sample time choose values that are less than or equal to 1/10 of the smallest time constant occurring in the control loop.

6.7.4. Setting the control value limits

You can limit the minimum (Umin) and the maximum (Umax) control value of the controllers. The control value should have a sufficient stroke in order to reach the desired setpoint values. But you should also take care not to damage the controlled system by choosing to large control value limits. (e.g. too high flow rate of a neMESYS dosing module in a pressure controlled system leads to damage of the fluidic system) You should test the control value limits by temporarily acting with them on your controlled system. (e.g. dose with a Nemesys pump using a flowrate equal to the control value limit) Futhermore you have to choose a value assumed by the controller if the control channel is disabled (Udisabled) which is usually zero.

Attention

Insufficient limitation of the control value can lead to damage of the controlled system.

6.7.5. Determination of PI parameters

A temperature control system usually makes up a delay line containing one or more delay time constants. It can often be approximated by a first-order delay line. The appropriate step response function is:

../_images/math_12.png

Setting the controller parameters targets the compensation of the delay time constant T1and adapting the controller gain Kp in order to reach an efficient control behaviour. In practice T1is often unknown, but you can gradually approach to a useful result using the following procedure.

../_images/graph01.png
  1. Choose the values for Sample Time, Umin, Umax und Udisabled according to the recommendations in the previous sections. Disable the differential and integral share by setting the controller time constants to 0. This leads to a simplified controller equation.

    \[U = {K_{p} \cdot e}\]

    Set a moderate value for the proportional gain. Keep in mind that by means of Kp the control error immediately impacts the control value. Choosing a too big value for Kpcan drive the controller into saturation.

  2. Give a setpoint step to your control loop, i.e. by changing the setpoint temperature from room temperature to 50°C and activating the control channel. (see section Entering setpoint and Switching control devices on / off)

  3. Providing a first-order delay line the actual value will behave according to the following figure.

    ../_images/graph02.png

    Depending on chosen controller proportional gain Kp the actual value will vary quickly settle near the setpoint value. Due to the fact that a proportional controller is not able to fully compensate a delay line, a steady-state error establishes. If Kp is set too low, the actual value approaches only very slowly the target value. (see curve for Kp = 1 in figure above) If Kp is set to high, the actual value overshoots, optionally oscillates about the setpoint. (see curve for Kp = 50 in figure above) In the provided example the actual value reaches a steady-state quickly without overshooting using Kp=3. This is why we use that value for further optimizations.

  4. In the next step set Tiin a way that the steady-state error is compensated. You should begin using a large time constant Ti which means a small integral share.

  5. Give a setpoint step to your control loop, i.e. by changing the setpoint temperature from room temperature to 50°C and activating the control channel. (see section Entering setpoint and Switching control devices on / off)

  6. Lower the time constant Ti if you want to reduce time for permanently reaching the setpoint value. Please notify that a time constant Ti set to small (large integral share) can lead to the control loop oscillating. In the provided figure you can see that Ti=260s leads to a good result. The actual value matches the setpoint value and the system does not oscillate. Using Ti=1000s the setpoint is not reached within the illustrated time range and Ti=20s leads to the system overshooting heavily. (see figure below)

    ../_images/10000000000001A7000000C4FD6D097D.png
  7. In many cases (i.e. temperature control) a PI controller is sufficient. There is no steady-state error and the dynamic behaviour is satisfactory. If the controller shall be robust with respect to sudden disturbances, it might be useful to include a differential component. A detailed consideration of control stability, control behaviour with respect to setpoint changes and disturbances is beyond the scope of this practical introduction. Reference is therefore made at this point on the control engineering literature.

    ../_images/graph03.png
  8. Now create a PID parameter preset with the values you have determined and assign a unique name.