Simulating Control System Operations
Download
Report
Transcript Simulating Control System Operations
Stages of Control
Loop Operations
Sayande Adekoye
College of North West London
Topic
Control Systems Using IT – An Introduction
Aims
To teach IT
Introduction to Loop Stability PID,, analogue signals, digital filtering, pulse, operator displays,
converting
Give students a Task to complete during the PowerPoint presentation, can either work in
pairs/individual or groups
Level
Level 3
Method
All Slide Show, Various tasks throughout the presentation, can be used as a group discussion,
or as individual/pairs task. Can be handed to students at the end of the lesson for revision
purposes.
Equipment
Laptop
Projector
Printer
Notepad/Pens/Pencils
Duration
1 Hour
Loop Stability
in Control Systems
•
A feedback control system must be stable as a prerequisite for
satisfactory control.
•
The stability of a control system is often extremely important and is
generally a safety issue in the engineering of a system. An example to
illustrate the importance of stability is the control of a nuclear reactor.
An instability of this system could result in an unimaginable
catastrophe.
•
The stability of a system relates to its response to inputs or
disturbances. A system which remains in a constant state unless
affected by an external action and which returns to a constant state
when the external action is removed can be considered to be stable.
Proportional
Integral Derivative
Control (PID)
•
Basic idea behind a PID controller is to read a sensor, then compute the desired actuator output by calculating proportional,
integral, and derivative responses and summing those three components to compute the output.
•
A PID loop is a mathematical formula used to drive a process variable toward a particular value (the set point) and keep it very
close to that value by controlling an output.
In temperature control, for example, the PID's formula controls the
output to maintain the desired temperature. The loop compares
feedback from an input to the desired set point, compensates for
changes in load, such as an influx of cold air, and adjusts the output
accordingly.
•
•
•
The input is a measurement of process temperature from a temperature
sensor (analogue input).
The set point is the desired temperature, perhaps from a thermostat
(analogue input) or an operator HMI.
The output is a heater control (analogue output).
•
Proportional Effect : The proportional component depends only on the Error, which is the difference between the Set Point and
the Process Variable.
•
Integral Effect : The Integral components integrates the Error over time to overcome the steady-state error. Therefore, the
integral response will continually increase over time unless the Error is zero.
•
Derivative Effect : This anticipates future behaviour of the Error because the response of the derivative component is
proportional to the rate of change of the Error. Therefore, in general the derivative action prevents overshoot and eliminates
oscillations.
Analogue Signals
Sampling
•
Sampling is the method employed in converting analogue
information to digital data. A signal is 'sampled' or measured many
times a second and the amplitude of the signal is recorded. This
amplitude is translated into digital code as a sequence of 0's and 1's.
•
The process of sampling, by necessity, causes a loss of information.
If we are only sampling at particular times, for instance, all the
information between those two times is lost. Also, because digital
signals have less accuracy than analogue signals, the sampled
values may not even be expressed correctly. The effects of sampling
on a signal have a number of names including "Sampling noise",
"sampling error", or "converted signal degradation". While this may
sound like a terrible situation, there are methods to decreasing this
error.
•
The reconstructed signal is then changed into binary code according
to amplitude as shown in the expanded diagram of the reconstructed
signal shown below.
Digital Filtering
In signal processing, the function of a filter is to remove
unwanted parts of the signal, such as random noise, or to
extract useful parts of the signal, such as the components
lying within a certain frequency range.
•
There are two main kinds of filter, analogue and digital. They are quite different in their physical makeup and in how they
work.
•
An analogue filter uses analogue electronic circuits made up from components such as resistors, capacitors and op
amps to produce the required filtering effect. Such filter circuits are widely used in such applications as noise reduction,
video signal enhancement, graphic equalisers in hi-fi systems, and many other areas.
•
There are well-established standard techniques for designing an analogue filter circuit for a given requirement. At all
stages, the signal being filtered is an electrical voltage or current which is the direct analogue of the physical quantity (for
example, a sound or video signal or transducer output) involved.
•
A digital filter uses a digital processor to perform numerical calculations on sampled values of the signal. The processor
may be a general-purpose computer such as a PC, or a specialized DSP (Digital Signal Processor) chip.
The analogue input signal must first be sampled and digitized
using an ADC (analogue-to-digital converter). The resulting
binary numbers, representing successive sampled values of the
input signal, are transferred to the processor, which carries out
numerical calculations on them. These calculations typically
involve multiplying the input values by constants and adding the
products together. If necessary, the results of these
calculations, which now represent sampled values of the
filtered signal, are output through a DAC (digital-to-analogue
converter) to convert the signal back to analogue form.
Note that in a digital filter, the signal is
represented by a sequence of numbers, rather
than a voltage or current.
Pulse Width
Modulation (PWM)
•
Pulse Width Modulation, or PWM, is a technique for getting a digital signal to generate an analogue output signal. This is
usually used to control the average power to a load in a motor speed control circuit.
•
Instead of reducing the voltage operating the motor (which would reduce its power), the motor's power supply is rapidly switched
on and off. The percentage of time that the power is on determines the percentage of full operating power that is accomplished.
This type of motor speed control is easier to implement with digital circuitry.
Digital control is used to create a square wave, a
signal switched between on and off. This on-off
pattern can simulate voltages in between full on (5
Volts) and off (0 Volts) by changing the portion of
the time the signal spends on versus the time that
the signal spends off. The duration of "on time" is
called the pulse width.
In the diagram the digital signal (solid line) is at a
constant frequency while the pulse width is changed
(modulated).
The dotted line represents the
average signal (if the digital signal is converted to
an average). The duty cycle represents the amount
of time that the signal is high compared to the
amount of time that the signal is low.
It is important to remember that the
signals above can be generated by
simply sending binary signals to the
output. As mentioned previously ‘1’
represents an ‘On’ and ‘0’ for ‘Off’.
25% 10001000,
50% 11110000
75% 11101110
To get varying analogue
values, you change, or
modulate, that pulse width. If
you repeat this on-off pattern
fast enough with an LED for
example, the result is as if the
signal is a steady voltage
between 0 and 5v controlling
the brightness of the LED.
Operator Displays
•
With the various displays available, some
of the most convenient and appropriate
types of displays for your control system
is the 16x2 LCD display, along with other
similar sized displays, just for their sheer
size, where they can be integrated into
many larger products such as: washing
machines, fridges, printers etc.
•
These displays can be connected via the GPIO ports of
the controller. The picture to the right shows such a
display connected to a Raspberry Pi, and below is a
demonstration of how multiple ports are used in
combination with logic gates to activate certain parts of
the display in order to show relevant information.
Simulating Control
System Operations
•
A computer model is a computer program that attempts to
simulate a real-life system. In other words, it is a ‘virtual’
version of something in the real-world.
•
The computer model is designed to behave just like the real-life
system. The more accurate the model, the closer it matches
real-life.
•
Computer models are cheaper to setup than
alternative methods that could be used to:
•
•
•
•
•
To test a system without having to create the system for real
(Building real-life systems can be expensive, and take a long
time)
To predict what might happen to a system in the future (An
accurate model allows us to go forward in virtual time to see
what the system will be doing in the future)
To train people to use a system without putting them at risk
(Learning to fly an airplane is very difficult and mistake will be
made. In a real plane mistakes could be fatal!)
To investigate a system in great detail
Electronic circuits can be modelled in real life using a
prototyping board - also known as a breadboard. However, this
can be time consuming and uses real components, which can
be damaged.
Computerised simulation software can be used
to test circuits without the need to physically
build them. In addition, the computer simulation
can be saved and edited.
Simulation software can also be used to
simulate control programmes for programmable
interface controllers as well as control systems
in general.
Converting the
Control Model
After you have produced a model and ran a simulation of your
control system, you can then make a physical prototype of I,
using electronic components connected together temporarily
to a controller like the Raspberry Pi.
The diagram shows such a set using a breadboard connected
to the Raspberry Pi.
A breadboard lets you insert electronic components and wires.
It can be used to string together a temporary version of your
circuit. You don't have to solder wires or anything else.
If you change your mind you can replace or rearrange
components as you like. You typically create an electronics
project on a breadboard to make sure that everything works.
This option is generally cheap to implement and allows you to
develop your control system how you want.
Once you are satisfied, you can build more permanent solution
of your control system, where you would solder components
together onto a PCB board.
Task
•
Write about all of the following topics:
–Control operations
•Loop stability
•Proportional-integral-derivative control (PID)
–Sensor signal conditioning
•Analogue signals sampling
•Digital filtering
–Output
•Pulse wide modulators (PWM)
•Operator displays
–Simulation
•Simulating control system operation
•Converting the control model
•
You need to:
–
–
–
Write a minimum of 1 ¾ pages (in total) to explain each of the topics above
Note down references (e.g. web addresses, books etc.)
Make sure the paragraphs are in your own words
Assessment
& Criteria
•
Explain the stages of control loop operations - P5
•
While covering the following topics:
–Control operations
•open loop control
•closed loop control
•feedback
•loop stability
•proportional-integral-derivative control (PID)
•proportional control
–Sensor signal conditioning
•analogue signals sampling
•digital filtering
–Output
•e.g. pulse wide modulators (PWM)
•operator displays
–Simulation
•simulating control system operation
•converting the control model
Proportional Control
•
One of the most used controllers is the Proportional Controller, it produces an output
action that is proportional to the error/ difference between the desired output and the
actual output. Meaning the more the error (or difference between the desired value and
actual value) then the more the output action, (this output action may also be known as
correcting signal).
•
In other words, the correcting signal becomes bigger the bigger the error. So, as the error
is reduced the amount of correction is reduced and the correcting process slows down.
•
The principle aim of proportional control is to control the process as the conditions
change.
Desired
Output
The controller will check the error
(or difference) between the
desired and actual (or measured)
outputs then tell the control
system to change its output
accordingly.
This will output change will be
large if the error is large
Error = Desired Output – Actual Output
Proportional Control
•
Example: Cruise Control
–
In a proportional control system,
the cruise control adjusts the
throttle proportional to the error,
the error being the difference
between the desired speed and
the actual speed.
–
So, if the cruise control is set at 60
mph and the car is going 50 mph,
the throttle position will be open
quite far. When the car is going 55
mph, the throttle position opening
will be only half of what it was
before.
–
The result is that the closer the car
gets to the desired speed, the
slower it accelerates. Also, if you
were on a steep enough hill, the
car might not accelerate at all.
50 mph
55 mph
Throttle Response
Throttle Response
Proportional Control
•
Example: Toilet Cistern
–
The toilet ball floats on top of the water.
It’s attached to a lever that controls the
amount of water that gets into the toilet
tank.
–
As the ball drops (perhaps after a flush)
the valve opens up wide and lets in a lot
of water. The tank fills and the ball
floats up. As it gets close to the top it
starts to close the valve and the water
trickles in at a lower rate.
Task
•
•
Write about all of the following topics:
–
–
What is Proportional Control
Principles of Proportional Control
–
Uses of Proportional Control
You need to:
– Make sure the paragraphs are in your own words
– Note down references (e.g. web addresses, books etc.)
Assessment
& Criteria
•
Explain the principles and uses of proportional control – M3
For further information please contact The STEM Alliance
[email protected] or visit www.STEMalliance.uk