## Preliminary Automatics Course

Chapter 24. ON-OFF control
Chapter 24.1 Relay as a hysteresis  unit
We start with ON-OFF control because it’s the easiest type of all the controls. But first, we will test hysteresis unit. Every relay has a hysteresis. What is this?

Call Desktop/PID/10_regulacja_dwupolozeniowa/01_czlon z histerezą.zcos

Fig. 24-1
Slider gives a input signal -0.1…+0.1 The bigger isn’t necessary–>there is nothing interesting here. The input and output signal are seen on the digital meters. The ON is when input =+0.05 and OFF when input =-0.05. Output signals are 0 or +1.
Click “start”

Fig. 24-2
Incresae gently the slide from -0.1 up to +0.1 and observe the digital meters. Please note that the “inreasing” characteristic is different from “decreasing” one! Unit “remembers” its last state 0 or +1 when input=0.
You have to click “start” button to end the experiment.
Let’s repeat the experiment but with the oscilloscope.
Call Desktop/PID/10_regulacja_dwupolozeniowa/02_czlon z histereza_time

Fig. 24-3
Click “start”
Do gently slide movement and observe the oscilloscope

Fig. 24-4
I hope that you know hysteresis now.

Chapter 24.2 ON-OFF control hand type
You will control the inertial unit-glass with boiler and water, using 2 signals MIN or MAX only .
Call Desktop/PID/10_regulacja_dwupolozeniowa/03_sterowanie dwupolozeniowe ręczne

Fig. 24-5
The boiler as a inertial unit is a very simplified model of course. The time constant T=15 sec responds to a real glass with water and a quite powerfull electrical boiler.
Your job is to observe the set point x(t)black line on the oscilloscope and control the boiler by the potentiometer slide.
The goal is that x(t)=y(t). It isn’t so easy but try.
First 15 sec–>x(t) = 0°C and then x(t) = 50°C. Automatics writes  x(t) = 50°C*1(t-15).
How to do it?
a– if y(t)<50°C–>230V for boiler–>You set slide +1
a– if y(t)>50°C–>0V for boiler–>You set slide –1
The effect is the blue s(t) control signal.
s(t)=+100°C  instead of s(t)=230V. It means that this power on the boiler resistance ensures water temperature y(t)=+100°C  but without boiling!* see note
s(t)=0°C  no power
Note: the bigger power–>all the water will evaporate, smaller power–> the steady y(t)=<+100°C
We assume that ambient temperature = 0°C
Click “start”
First disappointment. We don’t see black setpoint x(t) line, but red y(t) only. The reason is simple. Signals y(t)=x(t)=0 and red has a priority under black color.
Are you a good process operator? The time characteristic should be as follow.

Fig. 24-6
Good reflex–>the y(t) oscillations are smaller. Bad reflex because you had a drink before–>oscillations are bigger.
You are working as a simple OFF-ON controller. You will be convinced in some minutes, that the real controller does this same job, but much better. And you don’t need to pay a salary!
Repeat the experiment but with additional delay To=3 sec. This “glass with boiler and water” model is more real.
Call Desktop/PID/10_regulacja_dwupolozeniowa/04_sterowanie dwupolozeniowe_opoz_ reczne.zcos

Fig. 24-7
The diagram is similar to Fig. 24-5, but there is delay To=3 sec here.

Fig. 24-8
Objects
with and without delay.
Call”Start” and be an process operator as before.

Fig. 24-9
The object is more difficult than without delay–>oscillations are bigger. Make your own conclusions.

Chapter 24.3 ON-OFF  control idea
Chapter 24.3.1 Man as a controller
You was an process operator and the  Fig. 24-6, 9 are the examples. There were typical open loops or without feedback controls.   But wait a minute. Are they really open loops or without feedback controls? You obseved all the time the output temperature y(t) and you reacted on set point x(t) changes (step 0 to +1)! The output y(t) had an influence on the object input!

Chapter 24.3.2 ON-OFF controller instead of a man
Let’s draw a diagram with You as a controller

Fig. 24-10
Control agorithm is trivial
– x(t)>y(t) –> boiler is ON
– x(t)<y(t) –> boiler is OFF

Because control error is e(t)=x(t)-y(t) :
– e(t)>0 –> boiler is ON
– e(t)<0 –> boiler is OFF

The ambient temperature 0°C and control signal is s(t)
e(t) = x(t)-y(t)
– e(t)>0 –>s(t)=+100°C (boiler is ON)
– e(t)<0 –> s(t)=0°C (boiler is OFF)
The value e(t) named control error is “calculated in your head”. It’s seen as subtractor node on the diagram. You aren’t a superman and you can’t calculate the exactly  up-to-date error value for example e(t)=50°C-37.5°C=12.5°C. You haven’t fencer reflex except for it.  There are there reason of the oscillations.

You have known the most important automatic control notions:
Set point x(t)
Controller tries to keep the output signal y(t) as near as possible the x(t) value. Ideal situation when x(t)=y(t). The set point x(t)=+50°C was for you on Fig. 24-6, 9.
Output signal y(t)
The temperature on the Fig. 24-6, 9.
Control signal s(t)
The direct object signal–>s(t)=230V or 0V on the Fig. 24-7, 10.
It’s easy to replace the Fig. 24-10 for a real control diagram Fig. 24-10.

Fig. 24-11
The ON-OFF control diagram with the relay.
The subtractor node is a differential amplifier WO here. It calculates the control error e(t)=x(t)-y(t). It does absolutely the same job as you on Fig. 24-10, but more precisely and unambiguously.
Let’s modify the control algorithm a little. Why? You will know it in a while.
– e(t)>+5°C –>s(t)=+100°C (boiler ON)
– e(t)<-5°C –> s(t)=0°C (boiler OFF)
The ON point is another than an OFF point. Typical histeresis.

Chapter 24.4 ON-OFF control test
Chapter 24.4.1 Introduction
What is the influence for control of the:
– set point x(t)
-histeresis
-heating power
-cooling power

Chapter 24.4.2 Set point x(t), histeresis +5/-5
Call Desktop/PID/10_regulacja_dwupolozeniowa/05_regulacja_dwupolozeniowa_his5_skok__+100_0.zcos

Fig. 24-12
It’s a exactly execution of the Fig. 24-11. Exactly? Where are relay and 230V? It all contains hysteresis unit.
Click “start”

FIg. 24-13
Please study the x(t), y(t)e(t) and s(t) signals.
Why the
e(t) amplitude and s(t) time are bigger at time 15…27sec?
Why y(t) and e(t) are oscillating then?
What’s the influence of the histeresis?

Chapter 24.4.3 Set point x(t) “steps type”, histeresis +5/-5
Call Desktop/PID/10_regulacja_dwupolozeniowa/06_regulacja_dwupolozeniowa_his5_schodki+100_0.zcos

Fig. 24-14
Click “start”

Fig. 24-15
x(t)=0°C –> 0% average power (no heating)
x(t)=+25°C–>25% average power (25% heating ON time, 75% heating OFF time)
x(t)=+50°C–>50% average power (50% heating ON time, 50% heating OFF time)
x(t)=+75°C–>75% average power (75% heating ON time, 75% heating OFF time)
x(t)=+100°C–>100% average power (100% heating ON time, no heating OFF time)
Please note, that we haven’t precisely analyse glass and water specific heats, geometrical dimensions etc. There is necessary the
minimal electrical power only to attain +100°C and precisely temperature method measurment!   It all assures the appropriate power supply.
Conclusion
There isn’t necessary the absolute object  knowledge to control it!   But don’t exaggerate in this subject. The better is object
knowledge, the better is situation!
The main accusations of ON-OFF control are:
– temperature oscillations
– the y(t) temperature is slowly going to it’s set point x(t) state.
What to do?
Oscillations first.

Chapter 24.4.4 Set point x(t) rectangle pulse type, histeresis +1/-1
Call Desktop/PID/10_regulacja_dwupolozeniowa/07_regulacja_dwupolozeniowa_his1_impuls_+100_0.zcos

Fig. 24-16
The histeresis is 5 times smaller. The input x(t) is rectangle pulse type instead of step type. So we can test the trailing edge  of the pulse too.
Click “start”

Fig. 24-17
The histeresis drop caused oscillations drop. It’s positive effect. But there are not free lunches. The oscillations frequency arised. It’s no problem transistors, thiristors etc but it’s fatal for relays and contactors. There are oscillations in the real objects without histeresis even. Why?  The real objects have the delay time To.
The aim of the y(t) in 5 sec is +100°C and y(t) starts quickly from 0 to +100°C. The aim of the y(t) in 30 sec is 0°C and y(t) drops slowly from +50°C to 0°C.  We would like to improve the “start” and “drop” dynamics. First “start” to +50°C dynamics.

Chapter 24.4.5 Set point x(t) rectangle pulse type, histeresis +5/-5, increased heating
Call Desktop/PID/10_regulacja_dwupolozeniowa/08_regulacja_dwupolozeniowa_his5_impuls_+250_0.zcos

Fig. 24-18
There is old “wider” histeresis again. The reason is didactic only. The boiler power is increased 2.5 times now. It means that water “wants” go to +250°C instead of +100°C. Please no discussion that +250°C of the water is impossible by normal ambient pressure. It’s possible in our control theory world.
Wciśnij “start”

Fig. 24-19
The y(t)=+50°C temperature is realized quickly now. Good job! And we pay this same bill for energy now! The pulse height increases but pulse time decreases.
The system is “lazy” after 30 sec in the state “OFF” as before. How to make it “less lazy”? We will cool the water instead a simple “OFF” state. It means that the 0°C water aim” will be replaced by the “-250°C water aim” now. Please imagine that cooling coil is activer as a “OFF” state now. We assume that the water temperature -250°C exists in our world of course.

Chapter 24.4.5 Set point x(t) rectangle pulse type, histeresis +5/-5, increased heating and cooling
Call Desktop/PID/10_regulacja_dwupolozeniowa/09_regulacja_dwupolozeniowa_his5_impuls_+250_-250.zcos

Fig. 24-20
The diagram is similar to Fig. 24-18 but the histeresis parameters are -250°C/+250°C now.
Click “start”

Fig. 24-21
I begin to fear and guess that I  created  Frankenstein. But goal was realized! The temperature is quickly going to +50°C and 0°C. The system isn’t economic now. Please note that there is a big energy consumption by 0°C.
This type control is used sometimes. For example. You test the aeronautical parts when temperature is +30°C and in some minutes -70°C.
The blue s(t) signal handicapes the observations. We will repeat this experiment with 2 signals x(t) and y(t) only
Call Desktop/PID/13_regulacja_dwupolozeniowa/10_regulacja_dwupolozeniowa_his5_impuls_simple_+250_-250

Fig. 24-22
Click “start”

Fig. 24-23
The y(t) output signal tries to follow x(t) input set point signal.

Chapter 24.4.7 Set point x(t) “steps type”, histeresis +5/-5, increased heating and cooling
Call Desktop/PID/10_regulacja_dwupolozeniowa/11_regulacja_dwupolozeniowa_his5_schodki_simple_+250_-250.zcos

Fig. 24-24
It’s simplified diagram with x(t),y(t) signals only.
Click “Start”

Fig. 24-25
The y(t) follows x(t) set poin signal. Please compare with Fig. 24-15. The control in the Fig. 24-15 is more “gentle” +100°C/0°C instead of +250°C/-250°C. The y(t) follows x(t) set poin signal too, but not so exactly.  The general automatic control principle is fullfilled now. The bigger is amplification K, the more exactly and dynamic is a system.
The main goal of the automatic control is the disturbances suppression. How is it done?

Chapter 24.6 Disturbances in open loop
24.6.1 Introduction

Fig. 24-26
Glass with the water and 2 input signals:
x(t) control signal for boiler
z(t) disturbance signal for heat exchangers
and one output signal y(t) water temperature.
The subcject involves all controls types. Not ON-OFF only , the others as PID too. The open loop system is absolutely nonresistant to disturbances. Imagine, that you have a fridge without thermostat. It works all the time with the maximum power.
z(t)=+30°C is a warm coil pipe fluid flow  and heats up +30°C  the water in steady state
z(t)=-30°C is a cool coil pipe fluid flow  and cools down –30°C  the water in steady state
The water doesn’t freeze and evaporate as usually in our course.
There will will be 3 time intervals  A,B,C in the 4 next subchapters.
Ax(t)=+100°C–>the boiler is ON
C
z(t)=+30°C or -30°C heat exchanger heats or cools
B– Boiler and heat exchanger meets or not in this time interval.
We can very easy compare their dynamic and static parameters.
Note
The experiment time is 320 sec. I don’t wish the reader will be bored so time will be 10 times reduced. Xcos enables this operation.

Chapter 24.6.2 Disturbance z(t)=+30°C  and input signal x(t)=+100°C are time separated.
Call Desktop/PID/10_regulacja_dwupolozeniowa/12_100_+30_osobno.zcos

Fig. 24-27
Click “start”

Fig. 24-28

Chapter 24.6.3 Disturbance z(t)=+30°C  and input signal x(t)=+100°C are simultaneously
Call Desktop/PID/10_regulacja_dwupolozeniowa/13_100_+30_razem.zcos
The block diagram is similar to Fig. 24-27 but there are different x(t) and z(t) signals.
Click

Fig. 24-29

Chapter 24.6.4 Disturbance z(t)=-30°C  and input signal x(t)=+100°C are time separated.
Call Desktop/PID/10_regulacja_dwupolozeniowa/14_100_-30_osobno.zcos
Click “start”

Fig. 24-30

Chapter 24.6.5 Disturbance z(t)=-30°C  and input signal x(t)=+100°C are simultaneously
Call Desktop/PID/10_regulacja_dwupolozeniowa/15_100_-30_razem.zcos
Click “start”

Fig. 24-31

Chapter 24.7 Disturbance suppresion-main goal of the feedback
Chapter24.7.1 Introduction

Fig. 24-32
Disturbance and control system
Main goal of the control system (not only ON-OFF control) is disturbance suppression. The temperature in the fidge is constant and invariable of ambient temperature.

Chapter 24.7.2 Control system with the disturbance +30°C
Call Desktop/PID/10_regulacja_dwupolozeniowa/16_regulacja_dwupołozeniowa_zakl_+30.zcos

Fig. 24-33
The setpoint x(t)=+50°C appears in 5 sec and the disturbance z(t)=+30°C-warm fluid through heat exchanger in 35 sec.  Will be the positive disturbance compensated by the boiler power loss?
Click “Start”

Fig. 24-34
The process is the same as in the Fig. 24-13 up to 35 sec. It’s obviously. The disturbance z(t)=+30°C appears in 35 sec.
The further action is similiar now, but the temperature is going now:
-up to +130°C=100°C+30°C (acts boiler and exchange heater)-when controller is ON
-down to +30°C (warms exchange heater only)-when controller is OFF
The effect are short ON pulses and long OFF pulses. The warm heat exchangher fluid is compensated by the average boiler power fall.
Note
The histeresis holds the error e(t) temperature oscillations  amplitude is the same -5°C…-+5°C as before the disturbance.

Chapter 24.7.3 Control system with the disturbance -30°C
Call PID/10_regulacja_dwupolozeniowa/17_regulacja_dwupołozeniowa_zakl_-30.zcos
Click “start”

Fig. 24-35
The process is the same as in the Fig. 24-13 up to 35 sec.
The further action is similiar now, but the temperature is going now:
-up to +70°C=100°C-30°C (acts boiler and exchange heater)-when controller is ON
-down to -30°C (cools exchange heater only)-when controller is OFF
The effect are long ON pulses and short OFF pulses. The cool heat exchangher fluid is compensated by the average boiler power growth.
Note
The histeresis holds the error e(t) temperature oscillations  amplitude is the same -5°C…-+5°C as before the disturbance.

Chapter 24.8 Summary
It’s the easiest control type. We know the principle control theory notions:
– Set point x(t)
– Output signal y(t)
– Control error e(t)
– Control signal s(t)
– Disturbance z(t)