sensor wiring diagram for proximity.

65
Digital Signal Controllers and their Applications in Mechatronics Dr. Tarek Tutunji SSD08, July 20-23, 2008 Amman, Jordan

Transcript of sensor wiring diagram for proximity.

Page 1: sensor wiring diagram for proximity.

Digital Signal Controllers and

their Applications in

Mechatronics

Dr. Tarek Tutunji

SSD08, July 20-23, 2008

Amman, Jordan

Page 2: sensor wiring diagram for proximity.

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.

Page 3: sensor wiring diagram for proximity.

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

Page 4: sensor wiring diagram for proximity.

1. Mechatronic Systems Overview

Page 5: sensor wiring diagram for proximity.

Definition: What is Mechatronics?

Mechatronics Engineering is the

• Analysis

• Design

• Manufacturing

• Integration

• and maintenance

of mechanics with electronics through intelligent computer control.

Page 6: sensor wiring diagram for proximity.

History

Mechanical Engineering experienced an exponential growth in the early 19th 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.

Page 7: sensor wiring diagram for proximity.

Mechatronics Main Components

Source: Wikipedia

Page 8: sensor wiring diagram for proximity.

Block Diagram for General

Mechatronic System

ActuatorsElectrical Motors,

Pneumatic, Hydraulic

Mechanical system

SensorsInductive, Capacitive, Resistive, Ultrasonic,

Photo

Conditioning & Interface

Input:A/D, Filter, Amplifier

Output:D/A, Power

Circuit

Control Architectures

mcontroller, PLC, PC, DSP Control Algorithm

Graphical display

LED, LCD, CRT

Page 9: sensor wiring diagram for proximity.

Examples of Mechatronic Systems

Page 10: sensor wiring diagram for proximity.

Examples of Mechatronic Systems

Page 11: sensor wiring diagram for proximity.

Examples of Mechatronic Systems

Page 12: sensor wiring diagram for proximity.

Examples of Mechatronic Systems

Page 13: sensor wiring diagram for proximity.

Examples of Mechatronic Systems

Page 14: sensor wiring diagram for proximity.

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.

Page 15: sensor wiring diagram for proximity.

2. Digital Signal Controllers

Page 16: sensor wiring diagram for proximity.

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 1980’s led major electronics manufacturers, such as Texas Instruments and Motorola, to develop Digital Signal Processor chips.

Page 17: sensor wiring diagram for proximity.

Commonly used DSP Operations

Convolution

Correlation

Fourier Transform

Power Spectrum

Digital Filtering

Page 18: sensor wiring diagram for proximity.

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(nh(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.

Page 19: sensor wiring diagram for proximity.

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.

1N

0n

knN

2πj-

k

0n

jω-jω

x(n)eX

x(n)e)X(eBy lettingz = ejw and w = 2pf = 2pk/N

Page 20: sensor wiring diagram for proximity.

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.

Page 21: sensor wiring diagram for proximity.

FIR Filter

Computing the result requires the following steps:1. Fetch instruction from program memory.2. Fetch two operands, ci and x(n-i) from memory.3. Multiply ci 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-16. Store the result, y(n), in memory.7. Update pointers for ci 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

0ii i)x(ncy(n)

Page 22: sensor wiring diagram for proximity.

FIR Block

Page 23: sensor wiring diagram for proximity.

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.

Page 24: sensor wiring diagram for proximity.

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

Page 25: sensor wiring diagram for proximity.

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

Page 26: sensor wiring diagram for proximity.

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.

Page 27: sensor wiring diagram for proximity.

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.

Page 28: sensor wiring diagram for proximity.

Digital Control Block Diagram

Page 29: sensor wiring diagram for proximity.

PID

)n(eT

T)n(e

T

T)n(e

T

T

T

TK)n(u)n(u

)in(eK)n(e)n(eK)n(eK)n(u

DDD

I

iIDp

212111

1

Page 30: sensor wiring diagram for proximity.

Neural Nets

TDL

TDL

Weights

Weights

Log

Function+ Weights +

Log

Function

Plant

Output

Plant

Input

Net

Output

First Layer Second Layer

Page 31: sensor wiring diagram for proximity.

Fuzzy

Fuzzifier Defuzzifier

Fuzzy

Inference

Engine

Fuzz Rule

Base

Page 32: sensor wiring diagram for proximity.

Architecture Features

Modified Harvard

Instructions Pipeline

Hardware Multiplier

Barrel Shifter

RISC

Page 33: sensor wiring diagram for proximity.

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.

Page 34: sensor wiring diagram for proximity.

Modified Harvard Architecture

DAGENA

DAGENBMemory

AMemory

B

ALUMultiplier

Shifter

Accumulators

ShifterMemory

C

DAGENC

Page 35: sensor wiring diagram for proximity.

Instruction Pipelining

Up to six levels of pipelining are implemented.

DSP can execute instructions in parallel

Overall execution times are accelerated so that high

Page 36: sensor wiring diagram for proximity.

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.

Page 37: sensor wiring diagram for proximity.

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.

Page 38: sensor wiring diagram for proximity.

Digital Signal Controllers

Manufacturers

Texas Instruments.

• TMS320C2000™ DSP Platform

Microchip.

• dsPIC30F3010

Motorola

Page 39: sensor wiring diagram for proximity.

TMS320C2801

Page 40: sensor wiring diagram for proximity.

dsPIC: DSP Engine Block Diagram

Page 41: sensor wiring diagram for proximity.

Custom made DSP Engines

Page 42: sensor wiring diagram for proximity.

3. Digital Signal Controller

Applications

Page 43: sensor wiring diagram for proximity.

DSP Applications

Filtering

Speech Processing and Recognition

Signal analysis

Image Processing

Data Communication

Waveform Generation

Target Track and RADAR processing

Control

Page 44: sensor wiring diagram for proximity.

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

Page 45: sensor wiring diagram for proximity.

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

Page 46: sensor wiring diagram for proximity.

DSC Applications

Automotives.

Military.

Hard Disc Drives.

Industrial Applications.

Office Equipment.

Robotics.

Page 47: sensor wiring diagram for proximity.

DSC Applications: Automotives

Automotives: engine performance, cruise control, power steering, and anti-lock brakes.

Page 48: sensor wiring diagram for proximity.

DSC Applications: Military

Military: missile control, targeting, aircraft and jet engine control

Page 49: sensor wiring diagram for proximity.

DSC Applications: HDD

HDD: Head seek and tracking control, spindle motor control, data READ/WRITE filtering, and bus control.

Page 50: sensor wiring diagram for proximity.

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.

Page 51: sensor wiring diagram for proximity.

4. Hard Disc Drives

Page 52: sensor wiring diagram for proximity.

Hard Disc Drives: HDD

Hard disc drives are the main storage units in

• Personal Computers.

• Network Storage Systems.

• Enterprise Workstations.

• DVD Players.

• Game Boxes.

Page 53: sensor wiring diagram for proximity.

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

Page 54: sensor wiring diagram for proximity.

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

Page 55: sensor wiring diagram for proximity.

Mechanical: Actuators

Page 56: sensor wiring diagram for proximity.

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

Page 57: sensor wiring diagram for proximity.

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

Page 58: sensor wiring diagram for proximity.

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

Page 59: sensor wiring diagram for proximity.

5. DSC in HDD

Page 60: sensor wiring diagram for proximity.

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.

Page 61: sensor wiring diagram for proximity.

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

Page 62: sensor wiring diagram for proximity.

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

Page 63: sensor wiring diagram for proximity.

Block Diagram for Track Following

Page 64: sensor wiring diagram for proximity.

5. Summary

Page 65: sensor wiring diagram for proximity.

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.