Vous êtes sur la page 1sur 4

5.

COMPUTER CONTROL: Configuration and Interfacing


The function of a computer in a mechatronic system is to:
Process information from sensors
Control actuators according to sensor information and programmed task
User interface: obtain task information from, and report back to, an operator/user.

Computer control can be classified into two main types:


Supervisory control: includes sequencing operations, detecting faults
Closed-loop control: uses feedback to continually monitor and adjust an actuator output. Closed-loop
control will be considered in Section 5 of this module.
Most mechatronic systems require a combination of both types of control.

5.1 Configuration
For a complex computer-controlled system (e.g. a flight control system for a fly-by-wire aircraft) there are two
approaches for computer configuration:
Centralised control: all operations are performed by one centralised computer. This is the traditional
method.
Distributed control: small micro-processor based computers are distributed around the system with
individual responsibilities (e.g. controlling one actuator). Usually there is a centralised supervisory
computer as well. Communication is via a serial data bus.

Simpler mechatronic computer control systems which require just one microprocessor are often called embedded
real-time systems. The term embedded indicates that they are fully integrated into the machine, and real-time
means that they respond to changes in sensor readings as soon as they occur. Engine management units and
washing machine controllers are examples of embedded real-time systems. An actuator with its own local
controller (i.e. an 'intelligent actuator') is another example, even if it is part of a larger control system.

Almost all control computers are based around a microprocessor. For simple tasks a special type of
microprocessor called a microcontroller can be used. This is a single-chip computer, with processor, memory
and interfacing on one chip. For example they are used in controllers for domestic appliances, automatic
cameras, and smart sensors (i.e. sensors with their own embedded computers for pre-processing sensor signals).

5.2 Overview
The following diagram gives an overview of the computer interfacing process

Two common example of this process in the automotive field are sensing wheel speed (this may be used in a
traction control system) or engine speed, and sensing the temperature of a cylinder or the temperature of the
coolant. These measurements are teated as inputs for the engine control system (ECU), which makes use of
them to determine engine spark advance and fuel injection timing. Sensing the engine or wheel speed uses a
digital sensor, and sensing the temperature uses an analogue sensor, as shown in the following diagrams:

M.D. Brown, 2000. 30


5.3 Interfacing: types of signal
Control computers communicate (i.e. receive and transmit) information in one of three ways:
Serial digital signals: a series of pulses passing along a single line (or wire).
Parallel digital signals: a set of lines, one for each digit (bit) in a binary number. 1 is usually
represented by
5V and 0 by 0V.
Analogue signals: one line which can carry any voltage in a range (e.g. -10V to +10V), rather than just a
digital signal.

Serial signals are used to communicate between different computers in a distributed system. A computer will
communicate with sensors and actuators in any of the above three ways depending on what type of sensors or
actuators they are. For example stepper motors are controlled by serial digital signals, and incremental optical
encoders provide positional information via serial digital signals as well. Most other actuators and sensors
operate with analogue signals, in which case the control computer needs an analogue interface to convert
between these signals and the binary digital signals used by the computer itself.
The following figure illustrates the three ways in which information may be communicated; it considers a sensor
transmitting the number eleven (1011 in binary) to a computer:

M.D. Brown, 2000. 31


1 0 1 1
Communication using 5
serial digital signal: Voltage (V)
0
Time Computer
Serial
Sensor Interface Binary number
1011

Communication using
parallel digital signal:

5V (1) Computer
0V (0)
5V (1) Parallel
Sensor Interface Binary number
5V (1)
1011

Communication using
analogue signal:

Computer
11V
Analogue
Sensor to digital Binary number
converter
1011

5.4 Analogue interfacing

Analogue To Digital Converters (ADCs)

An ADC is used to read an analogue signal and convert it into a binary digital signal which can be used by a
computer. An ADC can be on a plug-in computer expansion board (e.g. for a PC), or on the same chip as the
microprocessor in the case of some microcontrollers.

Important aspects of an ADC specification are:


Number of 'bits': e.g. a 12-bit ADC converts the analogue signal into a 12-bit binary number.
As 212 =4096, the binary number is in the range 0 to 4095.
Input range: typical ranges are 10V (i.e. -10V to +10V), and 0 to 10V. The former
would be called bipolar, the latter unipolar.
Conversion time: time required to perform conversion, e.g. 10s.

M.D. Brown, 2000. 32


Analogue signals are quantised when Digital
converted into digital form. For example a 12- Output 3
bit 0-10V ADC converts 0 to 10V into the 2
digital range 0 to 4095. Therefore the 1
quantisation is 10 / 4095 or 2.44mV. This is Quantisation
also called the resolution of the ADC.
Analogue
Ideal input (V)
Accuracy depends on linearity and calibration
effects it is not the same as resolution.
-3
Actual

Example 5.1 : choosing an ADC see class notes.

Digital to analogue converters (DACs)

A DAC converts a binary digital signal into an analogue signal. DACs are specified in a similar way to ADC's:
Number of 'bits': e.g. a 12-bit DAC converts a 12-bit binary number into an analogue signal.
As 212 =4096, the binary number has to be in the range 0 to 4095.
Output range: typical ranges are 10V (i.e. -10V to +10V), and 0 to 10V. The former
would be called bipolar, the latter unipolar.
Settling time: time delay before the analogue signal is valid, e.g. 10s.

5.5 Counting operations


Some serial digital signals are simply a series of pulses which need to be counted. The pulse output of an
incremental encoder falls into this category: each pulse must either increment or decrement the count value
depending on whether the direction bit is high or low (i.e. depending on whether the direction line is 5V or 0V).

Counters are devices which electronically count pulses and generate a binary number equal to the count value as
required by a computer. Counters are specified in terms of:
Number of 'bits': e.g. a 12-bit counter can count a maximum of 212-1, or 4095, pulses.
Maximum count rate: e.g. a 100kHz counter can count a maximum of 100 000 pulses per second.

Example 5.2 : choosing a counter see class notes.

Computer control: Conclusions


Internally a computer uses binary numbers which are represented by parallel digital signals. Any external signals of a
different type have to be converted to or from parallel digital signals in order to allow communication with the
computer. The conversion is performed by an appropriate interface.
An analogue interface performs analogue to digital conversion using an ADC, and digital to analogue
conversion using a DAC.
A serial interface converts to or from a series of pulses. If the series of pulses simply needs to be
counted, a counter can be used.

M.D. Brown, 2000. 33

Vous aimerez peut-être aussi