Sunteți pe pagina 1din 65

Digital Signal Controllers and

their Applications in
Mechatronics
Dr. Tarek Tutunji
SSD08, July 20-23, 2008
Amman, Jordan
Abstract
Mechatronics engineering has gained much
attention in recent years.
As the requirements for real-time, fast, and
accurate controllers increased, the use of Digital
Signal Processors (DSP) as controllers gained
momentum.
This is due to the fact that DSP architecture has
many advantages over regular microcontrollers.
DSP has many applications in mechatronics such
as hard disc drives.
Presentation layout
This presentation will be divided into:
1. Mechatronic Systems Overview
2. Digital Signal Controllers (DSC)
3. DSC Applications
4. Hard Disc Drives (HDD)
5. DSC in HDD
6. Summary
1. Mechatronic Systems Overview
Definition: What is Mechatronics?
Mechatronics Engineering is the
Analysis
Design
Manufacturing
Integration
and maintenance
of mechanics with electronics through
intelligent computer control.
History
Mechanical Engineering experienced an exponential growth
in the early 19
th
century because of the industrial
revolution.
The rise of semiconductors in the 1950s and computers in
the 1980s have revolutionized all engineering products and
processes which in turn affected mechanical engineering
systems.
The term mechatronics was first used in the late 1960s by a
Japanese Electric Company to describe the engineering
integration between mechanical mecha and electronics
tronics systems.
Since then it has spread throughout Europe and is growing
is the USA.
Today, many mechanical systems use some form of
electronics and computers to control its functionality.
Mechatronics system engineering has gained much
recognition and importance in the industrial world.
Mechatronics Main Components
Source: Wikipedia
Block Diagram for General
Mechatronic System
Actuators
Electrical Motors,
Pneumatic, Hydraulic
Mechanical
system
Sensors
Inductive, Capacitive,
Resistive, Ultrasonic,
Photo
Conditioning &
Interface
Input:
A/D, Filter,
Amplifier
Output:
D/A, Power
Circuit
Control
Architectures
controller, PLC, PC, DSP
Control Algorithm
Graphical
display
LED, LCD, CRT
Examples of Mechatronic Systems
Examples of Mechatronic Systems
Examples of Mechatronic Systems
Examples of Mechatronic Systems
Examples of Mechatronic Systems
Control in Mechatronic Systems
Control is an essential part of a mechatronic
system.
Since mechatronics involves intelligent software
design, programmable digital controllers are
often used.
These controllers are usually embedded in
microcontrollers or Programmable Logic
Controllers (PLCs).
Due to the rapid needs for fast and accurate
responses, Digital Signal Controllers (DSC) are
becoming the controller of choice.
2. Digital Signal Controllers
Digital Signal Processing (DSP)
Digital Signal Processing (DSP) is the
arithmetic processing of discrete-time
signals.
A/D is needed for analog signals.
The increasing importance of DSP in the
1980s led major electronics
manufacturers, such as Texas Instruments
and Motorola, to develop Digital Signal
Processor chips.
Commonly used DSP Operations
Convolution
Correlation
Fourier Transform
Power Spectrum
Digital Filtering
DSP Operations: Convolution
Consider a system h(n) with input x(n) and output y(n)
h(n)
x(n) y(n)
X(Z)H(z) Y(Z)
h(n) * x(n) y(n)
=
=
Then,
The convolution of two signals, x(n) and h(n), is given by

=
= =
- k
k) x(n)h(n h(n) * x(n) y(n)
One signal is flipped and shifted with respect to the other .
Each element of one signal is multiplied by the corresponding
element of the other.
All the elements are summed.
Correlation requires a lot of calculations.
DSP Operations
Correlation between two signals is a measure of the
degree to which the two signals are similar
The cross-correlation of two signals, x(n) and y(n), is
given by

=
=
- k
xy
k) x(n)y(n (k) r
The Discrete Fourier Transform(DFT) is a discrete
numerical equation that transforms signals from the time-domain
to the frequency-domain using sums of sinusoids.

=
|
.
|

\
|

=
=
=
1 N
0 n
kn
N
2
j -
k
0 n
j - j
x(n)e X
x(n)e ) X(e
By letting
z = e
je
and e = 2tf = 2tk/N
DSP Operations
Power Spectrum (or Frequency Spectrum)
Decomposes a signal into its basic frequency components
Shows the distribution of the power in the frequency domain
some signals are easier to visualize in the frequency domain
while others are easier to visualize in the time domain .
A digital filter uses a digital processor to
perform numerical calculations on sampled values of the
signal in order to pass wanted frequencies and block
unwanted ones.
The analog input signal must first be sampled and
digitized using an ADC.
FIR Filter
Computing the result requires the following steps:
1. Fetch instruction from program memory.
2. Fetch two operands, c
i
and x(n-i) from memory.
3. Multiply c
i
by x(n-i) to obtain the product.
4. Add product to the accumulator.
5. Repeat steps 2,3, and 4 for i=1 to L-1
6. Store the result, y(n), in memory.
7. Update pointers for c
i
and x(n-i) to get next sample and
repeat steps 2 6.
Finite Impulse Response (FIR) filters contain only zeros and
therefore depend only on inputs. FIR is presented as:

=
=
1 - L
0 i
i
i) x(n c y(n)
FIR Block
Digital Signal Processors (DSP)
DSP chips are specialized microprocessors (i.e.
programmable devices with its own instruction code) with
architectures designed to reduce the number of instructions
and operations necessary for efficient signal processing.
The programmable flexibility of DSP chips enables
developers to implement complex algorithms in software.
DSP chips are used to perform computationally efficient and
fast algorithms, such as Digital Filtering, Spectral Analysis,
Parameter Estimation, and Data Compression.
Implementing DSP, especially in real-time, is generally
treated separately from the theory.
DSP for Control Systems
The simultaneous development of digital control
theories" and Digital Signal Processing offers an
opportunity for practical implementation of
advanced control techniques.
As a result, sophisticated control-system
applications using DSPs have increased
exponentially in recent years.
The term Digital Signal Controllers (DSC)
refers to the use of DSP as control elements
Digital Signal Controllers
Additions and multiplications operations require
the following:
fetch two operands
perform the addition or multiplication
store the result or hold it for a repetition
delay operation require the following:
hold a value for later use
Array operation require the following:
fetch values from consecutive memory locations
copy data from memory to memory
DSC Features
DSC chips have a specialized architecture enabling
developers to close the control loop quickly
parallel processing
parallel multiply and add
multiple memory accesses (to fetch two operands and store
the result)
lots of registers to hold data temporarily
deep pipelines
specialized internal compute engines
integrated peripherals.
efficient address generation for array handling
special features such as delays or circular addressing
Communication peripherals used to reduce the burden of
interrupt servicing by the CPU.
Ultra-fast A/D with dual sample and hold enable controllers to
capture data efficiently with low peripheral overhead.
Controller Algorithms used in DSC
PID
if the parameters of the actuator (its
mass, new motor, friction) are changed,
new PID parameters can be
reprogrammed quickly.
Neural Networks.
Fuzzy.
Adaptive Control.
State-Space based-control.
Digital Control Block Diagram
PID
( )
(

+
|
.
|

\
|
+
|
|
.
|

\
|
+ + + =

+ + =
) n ( e
T
T
) n ( e
T
T
) n ( e
T
T
T
T
K ) n ( u ) n ( u
) i n ( e K ) n ( e ) n ( e K ) n ( e K ) n ( u
D D D
I
i
I D p
2 1 2 1 1 1
1
Neural Nets
TDL
TDL
Weights
Weights
Log
Function
+ Weights +
Log
Function
Plant
Output
Plant
Input
Net
Output
First Layer
Second Layer
Fuzzy
Fuzzifier Defuzzifier
Fuzzy
Inference
Engine
Fuzz Rule
Base
Architecture Features
Modified Harvard
Instructions Pipeline
Hardware Multiplier
Barrel Shifter
RISC
Modified Harvard Architecture
A Harvard architecture employs separate
program and data buses to access separate data
and program memories.
A modified Harvard architecture.
DSP use multiple data buses (and multiple associated
address buses) so that the processing of two signals can
be done in parallel.
The address buses are also separate. This multiple bus
arrangement increases speed since instructions and data
can move in parallel, and execute simultaneously rather
than sequentially.
Modified Harvard Architecture
DAGEN
A
DAGEN
B
Memory
A
Memory
B
ALU
Multiplier
Shifter
Accumulators
Shifter
Memory
C
DAGEN
C
Instruction Pipelining
Up to six levels of pipelining are implemented.
DSP can execute instructions in parallel
Overall execution times are accelerated so that high
Hardware Multiplier
A 16- by 16-bit hardware multiplier
multiplies and stores results in a 40-bit
accumulator (8 guard bits) in a single
instruction cycle.
Thus, multiply and accumulate operations
can be performed in a single clock cycle in
a DSP; conventional processors may
require tens of cycles for this operation.
Shifters and RISC
Hardware shifters allow scaling, prevent overflows, and
maintain required precision.
An on-chip hardware stack reduces interrupt response time
and minimizes stack pointer manipulations.
DSC use reduced instruction sets tailored to digital signal
processing operations. For example, the MACD command
implements four operations in one instruction:
multiplies two values
moves data
adds the product to a previous result
transfers the result to an adjacent register.
Digital Signal Controllers
Manufacturers
Texas Instruments.
TMS320C2000
DSP Platform
Microchip.
dsPIC30F3010
Motorola
TMS320C2801
dsPIC: DSP Engine Block Diagram
Custom made DSP Engines
3. Digital Signal Controller
Applications
DSP Applications
Filtering
Speech Processing and Recognition
Signal analysis
Image Processing
Data Communication
Waveform Generation
Target Track and RADAR processing
Control
DSP Tasks in Digital Control Systems
Command generation
Spline, polynomial, look-up tables
Controller
Efficient control algorithms, parameter estimation,
vector control transformations, sensorless algorithms
Signal Conditioning
Notch filter, data smoothing and correction
Power / Driver
PWM generation, commutation control for AC motors,
power factor correction
DSP Tasks in Digital Control Systems
Modeling
System and parameter identification, system simulation
Diagnostic and Supervisory
Current and voltage monitoring, temperature monitoring
Communication Networking
Host and peripheral communication and interface
Noise Control
Accoustic noise reduction, mechanical vibration control,
measurement noise reduction
DSC Applications
Automotives.
Military.
Hard Disc Drives.
Industrial Applications.
Office Equipment.
Robotics.
DSC Applications: Automotives
Automotives: engine performance, cruise control,
power steering, and anti-lock brakes.
DSC Applications: Military
Military: missile control, targeting, aircraft and jet engine control
DSC Applications: HDD
HDD: Head seek and tracking control, spindle motor control,
data READ/WRITE filtering, and bus control.
Other DSC Applications
Industrial Applications:
precision tooling machines, smooth operations
of nonlinear electric machines, and HVAC.
Office Equipment:
position and speed control using AC motor
control of copiers and printers.
Robotics:
Multi-axis and multi-variable linear and
nonlinear controllers for industrial, medical,
and military applications.
4. Hard Disc Drives
Hard Disc Drives: HDD
Hard disc drives are the main
storage units in
Personal Computers.
Network Storage Systems.
Enterprise Workstations.
DVD Players.
Game Boxes.
HDD Components
The Hard Disk Design include
Electronic Parts
Mechanical Parts
The Mechanical Parts are used to
Magnetically Store the data
Rotate the disks and move the arm
The Electronic Parts are used to
Control the Mechanical movement
Transfer Data between the Disks and the Host
Hard Disks are a good example of Mechatronic
Systems
Mechanical Parts
The Mechanical parts are all assembled in a
sealed chamber referred to as Head Disk
Assembly (HDA)
The HDA includes
Platters or Discs
Spindle Motor
Actuator Arm
Voice Coil Motor
Read/Write Heads

Mechanical: Actuators
Mechanical: Platters or Discs
Made of aluminum alloy coated with a
magnetic medium
Stores the data in magnetic patterns
Each Platter (Disc) is divided into tracks
The tracks have circular shapes around the center
spindle and are grouped into cylinders
The cylinders are divided into sectors of 512 bytes
each
Servo Information (stored between data sectors) is used for positioning
Mechanical: Spindle and
Voice Coil Motors
The discs are stacked on top of each other through a
shaft
The Motor Spindle turns the whole assembly
Magnetic read/write heads are mounted on the end of
an Actuator Arm that flies at each side of the platters
The Voice Coil Motor moves the actuator arm
Electronic Parts
The Electronic parts are assembled on a
Printed Circuit Board (PCB)
The PCB includes the following Integrated
Chips (ICs)
DSP
Interface Controller
R/W Channel
Motor Controller
Memory
5. DSC in HDD
DSC in HDD
DSP is becoming the standard in hard disk servo
systems.
Ever-increasing bandwidths of HDD control loops
requires a digital controller to complete
calculations in only a few microseconds.
HDD requirements impose the following on
control loops;
Thousands of tracks-per-inch to increase track capacity
Increased speed and accuracy for the spindle motor
Reduced power to maximize operating time from a
battery pack
Make the HDD resistant to disturbances coming from
numerous electrical and mechanical shocks.
Electronics Block Diagram for HDD
Electronics (PCB) Mechanical (HDA)
Motor
Controller
R/W
Channel
DSP
Memory
Interface
Controller
P
C
H
O
S
T
Platters
Spindle
Motor
Arm
DSC in HDD are used for
Head seeking and tracking controls.
Spindle motor control.
Arm position control.
Data READ/WRITE filtering.
Shock /vibration control
Bus control.
Supervises the transfer of data between the
host and the disks.
Organizes the Interaction between all the
other ICs
Block Diagram for Track Following
5. Summary
Summary
An essential block in Mechatronic systems is the Controller.
Digital Signal Controllers have unique architecture that
makes them ideal for Digital Control Algorithms.
DSC are becoming the controller choice in many
mechatronic systems.
One example is the HDD where the DSC controls the VCM
and spindle motors (for fast and accurate responses), R/W
data, communication protocols, and shock/vibration.

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