Sunteți pe pagina 1din 6

Available online at www.sciencedirect.

com

ScienceDirect
Procedia Engineering 192 (2017) 905 – 910

TRANSCOM 2017: International scientific conference on sustainable, modern and safe transport

Simulation of an on-off controller for systems of second order with


the use of LabVIEW
Tomáš Uričaa*, Anna Simonováa
a
Department of mechatronics and electronics, Univerzitná 1, Žilina 010 26, Slovakia

Abstract

This paper deals with the usage of a toolkit Control Design & Simulation in development software LabVIEW for simulation of a
two-position controller. This automatic control can be used to regulate regulation processes with high rise time such as temperature
processes. Many of these processes can be categorized as second order systems. Main topic of this paper is the description of on-
off controllers, their abilities and shortcomings and the way of use of such controllers to regulate processes of a second order. The
publication then describes the development software LabVIEW, mainly useful toolbox Control Design & Simulation. This module
was then used to design, simulate and optimize two-position controller.
©©2017
2017TheTheAuthors.
Authors. Published
Published by Elsevier
by Elsevier Ltd.is an open access article under the CC BY-NC-ND license
Ltd. This
Peer-review under responsibility ofthe scientific committee of TRANSCOM 2017: International scientific conference on
(http://creativecommons.org/licenses/by-nc-nd/4.0/).
Peer-review
sustainable,under responsibility
modern and safe of the scientific committee of TRANSCOM 2017: International scientific conference on sustainable,
transport.
modern and safe transport
Keywords:On-off controller, Two-position control, LabVIEW, Control Design & Simulation module

1. Introduction

In despite of significant technological progress in automatic control, basic control circuit remains more less the
same (fig. 1). It contains two main units a system S, which represents device or physical process and a controller R,
which is device needed for manipulation (regulation) of the system. Both units are represented as blocks (although
they can have very complicated structure) with at least one input and one output. The output of the system is usually
measurable parameter x (also called process variable). This value is the main subject of a control process and by its
measurement, an instantaneous state of the system (physical process) can be evaluated. Measured state is constantly,

* Corresponding author. Tel.: +421 41 5131604.


E-mail address: tomas.urica@fel.uniza.sk

1877-7058 © 2017 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/).
Peer-review under responsibility of the scientific committee of TRANSCOM 2017: International scientific conference on sustainable, modern and safe transport
doi:10.1016/j.proeng.2017.06.156
906 Tomáš Uriča and Anna Simonová / Procedia Engineering 192 (2017) 905 – 910

or in defined intervals, compared to the desired variable w, also known as the set-point. By this comparison,
the error e (input to the controller) is calculated. Based on this, a controller can modify the error, so that the process
variable reaches the set-point as quick as possible and with the minimum overshoot. These two conditions are in the
most cases incompatible, and a compromise has to be chosen. The controller affects the system via action variable y.
Its value is calculated by a controller (based on the error as mentioned above) and it is connected to the input of a
system. Its nature depends on type of a controller (continuous, discontinuous) and regulation process itself.

y x
S

-
+ w
R
e
Fig. 1. Block diagram of a control circuit

The one of the most common regulator types, used in practice, are PID (continuous) or PSD (discrete) controllers.
Such controllers modify the behavior of a system by specific calculation of the action variable y. There are three terms,
by which the calculation is made: proportional, integral and derivative. Each of them has different way of modifying
the process variable. By their combination several controller types (PI for instance) can be made. Although PID
controller can affect system's dynamics so that it is more desirable, in many cases a simpler solution is required. When
“bad” dynamic properties (oscillations of process variable for example) are not an issue it is more effective to use
two-position controller.

2. Two-position control

An important group of control units are discontinuous controllers. Output of discontinuous controllers has only few
defined values in contrast with continuous controllers, where the output is continuously changed in dependence of the
input. Due to this fact, in a certain range, the output is not affected by values of the input variable. Discontinuous
controllers are separate group of nonlinear controllers. Such controllers cannot be described as continuous systems,
dependence between input and output signal is defined only by static characteristic.
The most common used discontinuous regulators in practice are two-position controllers. Their output has only
two states: high and low or on and off (on-off controller) and they are used for their simplicity, operation reliability
and low cost.
y y
h
ymax ymax

0 xL w xH x
0 w x

Fig. 2. (a) Action variable of two-position controller; (b) Hysteresis

Static characteristic of a two-position controller is in fig. 2 (a). Y represents action variable which is an output from
the controller. It has only two values:
x y = ymax while the process variable x is below the set-point w (this part of the regulation process is sometimes
called phase of power supply),
x y = 0, while the process variable is above the set-point (phase of load).
Tomáš Uriča and Anna Simonová / Procedia Engineering 192 (2017) 905 – 910 907

Regulation process is realized by switching between these two states. The change is immediate, when x = w. This
working cycle causes typical oscillations of the process variable around its set-point. In the past, this was a problem
due to deprecation of mechanical contacts of relays. Nowadays controllers use semiconductor components as
switching units which switching frequencies are much higher.
But there is another issue. As a process variable rises and meets the set-point, there is a danger that the controller
will switch on and off rapidly several times. This can be caused by an environmental interference, an inaccurate
measurement; the noise etc. Rapid switching is not desirable and can lead to lifetime reduction of a device (system)
which is being controlled or it can in extreme cases damage the controller itself. This problem is solved by a hysteresis
(fig.2 b). Hysteresis is basically differentiation of xH, where output changes its state from ymax to 0 and xL, where
output changes its state from 0 to ymax. Subtraction between xH and xL is the hysteresis, xH – xL= h. The undesired step
changes are removed, but the precision of a regulation process is reduced. Also hysteresis increases the amplitude of
oscillations of the process variable. Technically, hysteresis can be made by including a magnet with a steel plate or
prestressed spring. Both solutions create additional force which ensures switching with higher pressure between
contacts and higher distance between them, when they switch off.

3. Two-position control in LabVIEW

LabVIEW is development software used mainly as virtual instrumentation, data acquisition/evaluation system and
control system. The software contains several modules which allow creating windows applications, graphical user
interfaces, communications though several protocols, automatic control or hardware-in-loop simulations and many
others.
Such module is Control Design & Simulatiom. It can be used with the LabVIEW Real-Time module and various
real-time targets to implement simulations and controllers in real time with real-world inputs and outputs. This
software and hardware can be combined to design and implement rapid control prototype (RCP) or hardware-in-the-
loop (HIL) configuration. Control & Simulation Loop timing can be configured for the needs of the simulation. For
running offline simulation, no timing is necessary and simulation is running as fast as possible.
Loop synchronization to timing source can be set by:
x 1 kHz (1MHz) timing on running windows,
x External timing source (data acquisition device for instance),
x Hardware-Controlled Timing.

Fig. 3. Control loop of two-position controller

Control loop of a two position controller is shown in fig. 3 and fig. 4. This circuit is equal to the block diagram in
fig. 1. The system is represented by Zero-pole-gain (ZPK) model, and the controller by a Relay. It is assumed, that
system has no zeroes. The gain and poles is set from a cluster named Process. Created model is connected to terminal
in ZPK module. Process variable is calculated in this module based on action variable, and model of a controlled
process. Its value is then compared to the set-point with hysteresis in the control logic Relay. Parameters of the control
logic are set from a cluster Control. Such parameters are: set-point, upper hysteresis limit (H+) and lower hysteresis
limit (H-).
908 Tomáš Uriča and Anna Simonová / Procedia Engineering 192 (2017) 905 – 910

Fig. 4. Simulation of two-position controller

Relay acts as a two position controller which will change its output (action variable) based on actual state of process
variable. Output of the controller (the action) is connected to input of the ZPK module. The connection cannot be
realized as a feedback node, or as a shift register, because Control & Simulation Loop does not support such
operations. Property node is used instead.

100 set-point = 90
90
80
Process variable

70
60 set-point = 60
50
40
30
20 set-point = 20
10
0
0 100 200 300 400 500 600
Time [s]
Fig. 5. Simulation of two-position controller

Results of simulation of a two position controller are shown in fig. 5. The process can be categorized as second
order system with 2 time constants: T1 = 20s and T2 = 100s, gain G = 100, rise time TR = 227.2s and settling time
TS = 413.258s. The system is overdamped and step response has no natural harmonic oscillations. In theory the process
variable can be set by two-position controller from 1% to 99% of its maximum value (xmax = x(∞) ). But in practice it
is recommended to set the set-point to 20-80% of the xmax. In fig. 6 there are shown 3 different cases of two position
control. Difference between them is only in the set-point, the hysteresis (h = ± 2 %) is the same for all cases. However,
dynamics of the regulation process is completely different.
Tomáš Uriča and Anna Simonová / Procedia Engineering 192 (2017) 905 – 910 909

3.1. The set-point set at 20% of the xmax

The two-position controller will switch the operation cycle form phase of power supply to phase of load when the
process variable x (t) meets the set-point w plus the xH:

x t w  xH 22.
(1)

The expectations would be that the process variable will start to fall down at this point, but it continues to rise for a
while. This delay is caused by high inertia of the system. The rate of change (derivation) is so high, that the final
overshoot σ of the regulation process is:

x(t)  w 28.07  20
V 100% 100% 40.38%.
w 20 (2)

When the process variable finally starts to fall down, the fall is much slower than the rise and it continues until the
process variable reaches the set-point minus xL. The controller will switch to the phase of power supply again:

x t w  xL 18.
(3)

System reacts to the change almost immediately, since the derivation (the rate of change) of the fall curve is not high
enough to produce any noticeable delay.
Regulation process is controlled by switching between these two phases. Because the phase of power supply has
faster dynamics than the phase of load, the process variable actually does not oscillate the set-point. The controller
operates with the offset off, which can be calculated from peak to peak value of the oscillations:

X PP 7.5
 xPL  w  17.8  20
off 2 100% 2 100% 7.75%,
w 20 (4)

where, XPP – is peak to peak value, xPL – minimum peak value.


It has to be noted, that the hysteresis also influences values of the overshoot and the offset. If the hysteresis
decreases so will the maximum values of these parameters.

3.2. The set-point set at 60% of the xmax

The only condition that is changed is the set-point, the hysteresis remains the same. However the dynamic
properties of the regulation process are completely different. Since the step response of the system itself (without the
controller) is stabilized from 60%, there is not so much energy as it was in the case before. Therefore the system reacts
to the change of operation cycle much faster and the overshoot is much smaller σ = 5.92% and the offset is
off = 0.8%. The controller is working with duty cycle D = 58.93%. Duty cycle is defined as proportion of on time
(phase of power supply, when action variable y = 1) and off time (phase of load, when y = 0).

3.3. The set-point set at 90% of the xmax

The last simulated case of on-off control is when the set-point is set at 90% of xmax. This is not recommended not
only for bad dynamics, low accuracy and relatively high offset, but also because this control cannot react to any
eventually errors or interference. As it is shown in fig. 5 regulation process has very low value of overshoot
σ = 2.29%. If the hysteresis was lower or if there was not any hysteresis at all, the overshoot would be lesser than 1%.
910 Tomáš Uriča and Anna Simonová / Procedia Engineering 192 (2017) 905 – 910

When the process variable falls under the set-point (and below the low hysteresis limit xL), the phase of power supply
is switched back on again. There is huge delay before the system reacts to this change. This undershoot lowers the
accuracy and increases the offset off = 2.42%.

4. Conclusion

Two-position controllers are commonly used for their simplicity, operation reliability and low cost. Unlike PID
controllers, dynamic properties of control circuit are defined by dynamics of the controlled system and by alternating
the phase of power supply and the phase of load. This algorithm consists in monitoring instantaneous value of the
process variable and its match with the set-point. This is known as complete operation cycle.
The dynamics of regulation process can change completely with the simple change of the set-point. The change of
the dynamic properties is not proportional but depends on the dynamics of the system. If the set-point is too low, the
phase of load will last much longer than phase of power supply. The controller is then set mostly in one position (off
position in this case) and duty cycle is far below 50%. This case is characteristic with high value of overshoot. If the
set-point is too high, the opposite case occurs and phase of power supply takes most of the operation period. The
overshoot of the regulation process is basically zero at this point, but there is relatively high undershoot which lowers
accuracy and overall quality of the control.
The hysteresis is usually fixed at percentage of the set-point. If the technology allows it, there is a way of improving
control quality with the use of flexible hysteresis. The upper xH and lower xL hysteresis limit can be adjusted in order
to remove the offset. The overshoot can also be reduced by compensating the delay by properly setting the xH for the
first amplitude.

Acknowledgements

Results of this work are supported by grant APVV-15-0462: Research on sophisticated methods for analyzing the
dynamic properties of respiratory epithelium’s microscopic elements.

References

[1] J. Balate, Automaticke rizeni, BEN technicka literatura, Praha 2003, pp . 158-163.
[2] http://www.pit.6f.sk/wp-content/uploads/2014/02/14_Nespojit%C3%A1-regul%C3%A1cia1.pdf
[3] http://zone.ni.com/reference/en-XX/help/371894G-01/lvsimconcepts/sim_c_rtsim/
[4] B. Dobrucký, P. Stefanec, R. Konarik, V. Oleg Chernoyarov: Transient Analysis in Electrical Circuits Using Z- transformation, In: 11th
International Conference ELEKTRO 2016, IEEE, IAS/IES, ISBN: 978-1-4673-8698-2, Catalog Number: CFP1648S-ART, pp. 131-136,
[5] S. Kascak,T. Laskody,M. Prazenica,R. Konarik: Current Control Contribution to a Single-phase Induction Motor Fed by Single-leg Voltage
Source Inverter, In: 11th International Conference ELEKTRO 2016, IEEE, IAS/IES, ISBN: 978-1-4673-8698-2, Catalog Number: CFP1648S-
ART, pp. 172-175
[6] http://www.electrical4u.com/time-response-of-second-order-control-system/
[7] M. Frivaldsky, J. Cuntala, P. Spanik: Simple and accurate thermal simulation model of supercapacitor suitable for development of module
solutions, In: International Journal of Thermal Sciences, Elsevier, Vol. 84, October 2014, pp. 34–47, ISSN 1290-0729,
DOI:10.1016/j.ijthermalsci.2014.04.005,
[8] P. Palacky, K. Baresova, M. Sobek,A. Havel: The control system of electrical energy accumulation, In: 11th International Conference
ELEKTRO 2016, IEEE, IAS/IES, ISBN: 978-1-4673-8698-2, Catalog Number: CFP1648S-ART, pp. 231-237
[9] https://fenix.tecnico.ulisboa.pt/downloadFile/3779580204927/2ndorderresponseMSD.pdf
[10] P. Chlebis, A. Havel, P. Vaculik, Z. Pfof: Modern Instruments for increasing the Efficiency of the Energy Transfer in Electric Vehicles. In
14th International Power Electronics and Motion Control Conference (EPE-PEMC), Ohrid, Macedonia, 2010, pp. 89-93, ISBN 978-1-4244-
7854-5
[11] Dudrik,J., Bauer,P.: New Methods in Teaching Power Electronics and Devices. International Journal Engineering Education (IJEE), Volume
24, Number 5, 2008, ISSN: 0949-149X, pp.1040-1048

S-ar putea să vă placă și