**3. Relay methods**

To understand the relay method is necessary first to explain the ultimate gain method (Oscillation method) proposed by Ziegler Nichols (Z-N). This procedure is only valid for open loop stable plants and it is carried out through the following steps:




Note that linear oscillation is required and that it should be detected at the controller output. In fact the Ziegler - Nichols tuning scheme, where the controller gain is experimentally determined to just bring the plant to the brink of instability is a form of model identication. This is known as the ultimate gain ��. Relay-based auto tuning is a simple way to tune PID controller that minimizes the possibility of operating the plant close to the stability limit.

As it turns out, under relay feedback, most plants oscillate with a modest amplitude fortuitously at the critical frequency. The procedure is now the following:

a. Substitute a relay with amplitude � for the PID controller as shown in Figure 3.1;

b. Kick into action, and record the plant output amplitude � and period � (Fig. 3.2).

c. The ultimate period is the observed period, �� = �, while the ultimate gain is inversely proportional to the observed amplitude,

$$K\_u = \frac{4d}{na} \tag{3.1}$$

Having established the ultimate gain and period with a single succinct experiment, we can use the Ziegler - Nichols tuning rules (or equivalent) to establish the PID tuning constants.

The Figure 3.1 shows a plant with the PID regulator temporarily disabled and the Figure 3.2 shows a plant oscillating under relay feedback.

The settings in Table 3.1 obtained by Ziegler and Nichols, can be used to make the model response of a PID controller:

$$u\_{PID}(t) = K\_p e(t) + \frac{K\_p}{\tau\_l} \int\_{to}^t e(t)dt + K\_p \tau\_d \frac{de(t)}{dt} \tag{3.2}$$

Many plants, particularly the ones arising in the process industries, can be satisfactorily described by the model in Equation 3.3.

$$G\_0(\mathbf{s}) = \frac{\kappa\_0 e^{-\mathbf{r}\mathbf{s}}}{\chi\_0 \mathbf{s} + 1}; \ \chi\_0 > 0\tag{3.3}$$

To understand the relay method is necessary first to explain the ultimate gain method (Oscillation method) proposed by Ziegler Nichols (Z-N). This procedure is only valid for

c. Record the controller critical gain �� = �� and the oscillation period of the controller

Note that linear oscillation is required and that it should be detected at the controller output. In fact the Ziegler - Nichols tuning scheme, where the controller gain is experimentally determined to just bring the plant to the brink of instability is a form of model identication. This is known as the ultimate gain ��. Relay-based auto tuning is a simple way to tune PID controller that minimizes the possibility of operating the plant

As it turns out, under relay feedback, most plants oscillate with a modest amplitude

c. The ultimate period is the observed period, �� = �, while the ultimate gain is inversely

�� <sup>=</sup> ��

Having established the ultimate gain and period with a single succinct experiment, we can use the Ziegler - Nichols tuning rules (or equivalent) to establish the PID tuning constants. The Figure 3.1 shows a plant with the PID regulator temporarily disabled and the Figure 3.2

The settings in Table 3.1 obtained by Ziegler and Nichols, can be used to make the model

�� ��

��(�) <sup>=</sup> ������

Many plants, particularly the ones arising in the process industries, can be satisfactorily

�

� �(�)�� + ����

a. Substitute a relay with amplitude � for the PID controller as shown in Figure 3.1; b. Kick into action, and record the plant output amplitude � and period � (Fig. 3.2).

�� �� ��

1 1,2 ��

1 2 �� 1 8 ��

�� (3.1)

��(�) ��

�� (3.2)

����� ���� > 0 (3.3)

open loop stable plants and it is carried out through the following steps: a. Set the true plant under proportional control, with a very small gain;

b. Increase the gain until the loop starts oscillating;

**PI** 0,����

**PID** 0,�0��

d. Adjust the controller parameters according to Table 3.1.

**P** 0,���

Table 3.1. Ziegler Nichols tuning using the ultimate gain method

fortuitously at the critical frequency. The procedure is now the following:

����(�) = ���(�) +

**3. Relay methods** 

output, �� ;

close to the stability limit.

response of a PID controller:

proportional to the observed amplitude,

shows a plant oscillating under relay feedback.

described by the model in Equation 3.3.

Fig. 3.1. Plant with the PID regulator temporarily disabled

Fig. 3.2. Plant oscillating under relay feedback

The one can obtain the PID settings via Ziegler-Nichols tuning for different values of ߬ and ߛ. These parameters can be calculated using:

$$\tau\_1 = \frac{T\_u}{2\pi} \sqrt{\left(K\_u K\_p\right)^2 - 1} \; ; \; \tau\_1 = \tau \tag{3.4}$$

$$\theta\_1 = \frac{T\_u}{2\pi} \left(\pi - \arctan\frac{2\pi}{T\_u}\tau\_1\right);\tag{3.5}$$

Ku and Tu parameters are obtained from the experiment using the relay method.

#### **3.1 Case study**

The use of polymers has been growing gradually in many industrial products, such as: automobile, electronic devices, food packaging, and building and medicine materials. Among these products stands the polystyrene, usually produced in batch or semi-batch reactors.

Relay Methods and Process Reaction Curves: Practical Applications 253

Parameter obtained from Relay Method a = 3 2d = 70 P=300 Controller PI PID Kc 6,68 %/°C 8,91 %/°C <sup>i</sup> 0,004 s 0,007 s <sup>d</sup> 0 s 37,5 s

From these results it is possible to implement an on-line PID controller in the experimental

The closed-loop system will respond in a desirable way only if its controller is properly tuned. This means that its proportional, integral and derivative (PID) settings are properly made. A popular procedure for tuning a controller is the Ziegler-Nichols Reaction Curve

This procedure requires a step change of the controllers output alters the controlled variable.

The method used to make the step change and measure the controlled variable is called the Process Identification Procedure. This controller setting puts the system into an open-loop condition. Based on the shape and magnitude of the controlled variable's reaction curve in reference to the step change, value are obtained and used in mathematical formulas. These

Loop responses for a unit step reference are shown in Figure 2 (similar to Figure 1). A linearized quantitative version of the model in Equation 3.3 can be obtained with an open

a. With the plant in open loop, take the plant manually to a normal operating point. Say

c. Record the plant output until it settles to the new operating point. Assume you obtain

that the plant output settles at ���� � �� for a constant plant input u (t) =���. b. At an initial time, ��, apply a step change to the plant input, from u� to �∞ .

the curve shown in Figure 2. This curve is known as the process reaction curve.

Table 3.2. Initial parameters PID controller (Relay method).

The Figure 4.1 shows the resultant closed loop step.

values are then used to determine the PID settings.

Fig. 4.1. Resultant closed loop step

loop experiment, using the following procedure:

polymerization process.

Tuning Method.

**4. Process reaction curve** 

Temperature variation in polymerization reactor systems greatly affects the kinetics of polymerization and consequently changes the physical properties and quality characteristics of the produced polymer (Ghasem et al., 2007; Lepore et al., 2007). In order to ensure the maintenance of the final product quality is crucial to keep suitable operating conditions during the polymerization reaction process.

#### **3.2 PID controller design**

The PID controller is designed for temperature control of an experimental process of polymerization (Leite et al., 2010a; Leite et al., 2011). The developed models will can be online implemented to a pilot plant. A pilot plant was built specifically to evaluate the polymerization reaction performance. It consists essentially of a stirred batch reactor, an oil storage tank, a positive displacement pump and temperature sensors. Thermal oil was used as heat transfer medium in the jacket. The polymerization reaction is exothermic.

Using a PCL (Programable controller logic), a thermal fluid variable speed pump will be driven by the controller, to maintain the temperature constant into the reactor. The flow of thermal fluid (manipulated variable) was step of 30 and 100%. The maximum pump flow rate equivalent to approximately 900 L/H. Disturbances in the manipulated variable were performed in a short time interval (P=300 s).

The Figure 3.3 shows response of the experiment using the relay method.

Fig. 3.3. Response of the experiment using the relay method

According to the tuning method used, we found the initial control parameters as shown in Table 3.2.


Table 3.2. Initial parameters PID controller (Relay method).

From these results it is possible to implement an on-line PID controller in the experimental polymerization process.
