You are on page 1of 47

Multidisciplinary Engineering Senior Design

Project 6508 Controls Lab Interface Improvement


Critical Design Review
2/24/05 Project Sponsor: EE Department Team Members: Michael Abbott, Neil Burkell Team Mentor: Dr. Mathew, Dr. Sahin Coordinator: Dr. Phillips

Kate Gleason College of Engineering Rochester Institute of Technology

Project Overview

Current Controls Lab:


Current System used was purchased from Feedback for use in the Controls Lab which included Analog and Digital Control Boards to be used with a DC Motor.
System was designed for technicians not students The Digital Board is outdated Past work from a student Ruben Mathew has shown the digital board does not work

Project Overview
Current Controls Lab:
Digital control is taught through Simulink from varying sampling time and using different methods for converting continuous to discrete transfer functions

There are no hardware experiments using digital controllers

A new Digital Board is needed for the lab

Project Overview

Needs for the Controls Lab:


Need to use Simulink on Lab PC Need to use current Feedback 33-100 DC Servo Motor and Power Supply

The new digital interface must link Simulink to the existing DC motor Exploration into feasible interface concepts was needed (SD I deliverable)

Needs Assessment
System must interface Simulink to the motor Capture experimental results accurately User friendly for the students Change sampling time easily for student learning Use existing equipment Be expandable for future labs or projects Have a finished product by the end of Winter quarter Protected from students but also be accessible to be fixed

Requirements Developed The Requirements of the Project are as follows: Interface MATLAB/Simulink with the servo DC motor Simulink block diagram will control the servo DC motor Sampling time easily changeable from 1 ms to 300 ms Interface will return real time data and output real time signals Interface will have 4 additional digital inputs/outputs, 1 additional analog output, and 7 differential analog inputs

Requirements Developed The Requirements of the Project (continued) Interface will acquire motor speed and position data Analog inputs: resolution of 16 bits, range of +10V to -10V. Analog outputs: resolution of 16 bits, range of +10V to -10V. Interface will be covered Use the existing Feedback Power Supply

Overall System Diagram


Lab PC with Matlab and Simulink Feedback Power Supply
Gnd, +-15V, 5V

Communication

Analog to Motor +-8V to PA(+ve,-ve)

System Interface

Analog from Motor Tachogenerator +-8V Digital from Motor 6 Grey Code + Index for Position

Feedback 33-100 DC Servo Motor

PA +ve, PA ve, Tachogenerator +-, Grey code Position idicator

Input Shaft

Output Shaft

Tachogenerator

Mechanical Unit 33-100

MATLAB Software Layout

Analysis & Synthesis of Design


Multiple Concepts were developed
1) Using a DSP Development Kit 2) Using a USB Data Acquisition Board
Importing Simulink diagram into NI LabVIEW

1) Data Acquisition PCI Card in Windows 2) Separate PC with I/O Capability controlled by MATLAB

Analysis & Synthesis of Design


Concept 1: Using a DSP Development Kit
Simulink
USB RS232

DSP Kit

Interface Board

Motor

Concept 2: Using a USB DAQ Board


Simulink
USB

DAQ Board

Interface Board

Motor

Both concepts found not to be feasible

Analysis & Synthesis of Design


Concept 3: PCI DAQ Card
Simulink PCI DAQ Interface Board Motor

PCI Card meets all requirements for I/Os PCI Card is supported by Simulink and Real Time Workshop Runs Inside the Windows Environment No additional software would need to be purchased Additional breakout hardware would be necessary System Interface would not be portable Measurement Computing PCI Card has best value

Analysis & Synthesis of Design


Concept 4: Separate PC with PCI DAQ Controlled by MATLAB

Simulink

Ethernet RS232

Computer

PCI DAQ

Interface Board

Motor

PCI Card meets all requirements for I/Os PCI Card is supported by Simulink, Real Time Workshop, and xPC Target Runs external from the Windows Environment Additional breakout hardware would be necessary System Interface would be portable Measurement Computing PCI Card has best value

System Diagram
Both concepts use the Real Time Workshop in MATLAB
Real Time Windows Target Toolbox

Simulink

Real Time Workshop

Generated C Code

PCI Card

Interface Board

DC Motor

Computer

xPC Target Toolbox

Simulink

Real Time Workshop

Generated C Code

xPC Kernel

PCI Card

Interface Board

DC Motor

Computer

Second Computer

System Block Diagram

PCI DAQ Card

Measurement Computing PCI Card


16 Analog Inputs 2 Analog Outputs 24 Digital Inputs or Outputs

Gantt Chart Followed


Events Receive Software Receive Parts Learn xPC Target Toolbox Learn RTW Target Toolbox Interface Hardware and Simulink using xPC and RTW Debug Design PCB Interface Board Impliment Test Plan Demonstration Documentaion of xPC and RTW Order Additional Lab Setups Week 1 Week 2 Week 3 Week 4 Winter Quarter 05-06 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11

Desired Outcomes
A complete working digital control system:
Interfaces with Simulink Not dependant upon software versions Simple to use Can be used in other applications

Desired Outcomes
Compare the differences between using PCI DAQ Card and external computer with PCI DAQ Card
From transient testing for the Control System Design Class Using a more computationally intensive controller (Fuzzy Logic Controller) to see where each system fails

Desired Outcomes
Document the process for developing digital controllers to be able to implement them in a laboratory setting

Key Requirements

1)

Show that data can be acquired and output at the minimum sampling time of 0.001 seconds at the maximum range of 10V Use interface board, Feedback Mechanical Unit 33-100, Feedback power supply, and Simulink Control Algorithm to control the speed of the motor. Use interface board, Feedback Mechanical Unit 33-100, Feedback power supply, and Simulink Control Algorithm to control the position of the motor. Documentation, including a user guide, working Simulink models, and a service manual.

2)

3)

4)

Critical Parameters
1. Acquire 20 V peak to peak, 100 Hz sine wave using digital interface and output. Verify with oscilloscope.
Output Wave Input Wave

Critical Parameters
2. Velocity control of motor to a reference of 1.5 V (600 RPM) recorded on both an Oscilloscope and by MATLAB
Transient Results include Rise Time, Overshoot, Peak Time

OS =

M pt yss step

Critical Parameters
Use a Simulink Integrator Controller
Verify: -Tachogenerator voltage 1.5 V 5%

S te p

Add1 A dd

1 s In te g ra to r

5 G a in

A n a lo g O u tp u t A n a l o g O u tp u t
Meas urem ent C om puting PC I-D AS1602-16 [auto]

0 .5 Co n stan t

Power Amplifier on Motor

Analog In p u t A n a l o g In p u t
Meas urem ent C om puting PC I-D AS1602-16 [auto]

Results for Integrator Controller 1.5

Tachometer Voltage [V]

Tachogenerator Voltage from Motor

0.5

SIMULATION RESULT

0 10

11

12

13

14

15 time [sec]

16

17

18

19

20

Critical Parameters Use a Simulink PI Controller


Verify: -Tachogenerator voltage 1.5 V 5%

-Transient Results within 5%


Power Amplifier on Motor
Results for Integrator Controller 1.5

s+6 .5 S te p A dd 1 A dd 0 .5 Co n sta nt s T ra n sfe r Fcn

2 .5 Gain

A n al og O utp ut A n a l o g O u tp u t
Meas urem ent C om puting PC I-D AS1602-16 [auto]

Tachometer Voltage [V]

0.5

Analog Inp u t A n a l o g In p u t
Meas urem ent C om puting PC I-D AS1602-16 [auto]
0 10 11 12 13

SIMULATION RESULT

14

15 time [sec]

16

17

18

19

20

Tachogeneartor Voltage from Motor

Critical Parameters Use a Simulink One Pole Controller


Verify: -Tachogenerator Voltage within 5% Theoretical Steady State Error

Power Amplifier on Motor

-Transient Results within 5%


R usoO P C to r e lt f r n o o r lle s e le n 1 . 2 1

1 S te p Add1 Add 0 .5 Co n sta n t s+5 T ra n sfe r Fcn

20 Gain

Analog O u tp u t A n a l o g O u tp u t

0 . 8

Meas urem ent C om put ing 0 . 6 P C I -D AS1602-16 [ aut o]

Analog In p u t A n a l o g In p u t
Meas urem ent C om put ing PC I -D AS1602-16 [ aut o]

0 . 4

0 . 2

SIMULATION RESULT

Tachogenerator Voltage Output from Motor

-. 0 2 1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

2 0

Critical Parameters
3. Position control of motor output shaft from a initial value of 270 degrees to 90 degrees
Use a Simulink Feedback Controller
Verify: -Transient results within 5% of analog control
Febc P ii n eusMoI ii lly t20 er e ad oe t 9 dg e) edak oto R lt ( o r na a 7 dg s n m do 0 er s s s t t e v e
5

Output Shaft Voltage from Motor


A na l o g In p ut
Meas urem ent C om puting PC I-D AS1602-16 [auto]

A na l o g In p ut A na l o g Inp u t
Measurem ent C om put ing PC I-D AS1602-16 [auto]

1 Gain Add

A n a l og O u tp u t A n al o g O u tp u t
Meas urem ent C om put ing PC I -D AS1602-16 [auto]

P s nV lta e [V o itio o g s ]

A n a l o g In p u t1

OptSa V ae u u hf o g t t lt

I ptSa V ae nu hf o g t lt

Input Shaft Voltage from Motor

-0 1

1 0

tm[ e] i esc

Critical Parameters
4. Documentation:
Include all Simulink diagrams used in testing Step by step user guide on how to setup both xPC and RTW Target toolboxes and systems Full system design including part numbers, PCB layout files, and schematics of Feedback system Motor Connector
s+6 .5 S te p A dd 1 A dd 0 .5 Co n sta nt s T ra n sfe r Fcn Gain 2.5 A n al og O utp ut A n a l o g O u tpu t
Meas urem ent C om put ing PC I-D AS1602-16 [auto]

Analog In p u t A n a l o g In p u t
Meas urem ent C om puting PC I-D AS1602-16 [auto]

Simulink Diagram

Test Points

PCI Connectors

PCB LAYOUT

Major Design Challenges

Documentation on Feedback System was lacking


Traced servo DC motor board and analog board to develop schematics to understand the different signals

Establishing control of the servo DC motor with results similar to the analog controller
Preliminary testing using breakout box and wires with sockets verified the correct signals needed

Major Design Challenges

Understanding and using Real Time Workshop using xPC Target Toolbox and Real Time Windows Target Toolbox
Read manuals on both toolboxes and performed tutorials

Noise when reading sensor data from the servo DC motor board
Traced to Feedback switching power supply Noise eliminated when using HP power supply currently in lab

Interface Design
-Interface connections needed

PCI DAQ Card


6 Analog Inputs 1 Analog Output 6 Digital Inputs

Motor Board
5 Analog Sensors 1 Analog Input 6 Digital Outputs

Interface Board

Analysis of Design

Failure Analysis was done for the system


Measurement Computing contacted to find absolute max ratings for PCI card Maximum input/output voltages of Feedback system investigated Motor board and PCI card were determined to be safe from damage

Analysis of Design

Safety codes were investigated


OSHA code that applies:
Guarding of live parts. 1910.303(g)(2)(i) Except as required or permitted elsewhere in this subpart, live parts of electric equipment operating at 50 volts or more shall be guarded against accidental contact by approved cabinets or other forms of approved enclosures, or by any of the following means:

Highest rated voltage on interface board is 30 V Design safe for laboratory setting

Final Design

-Interface board is redesigned with the previous connections but with different test point locations and additional pads in case extra circuitry is desired

-Larger holes will be designed into the interface board to be able to put a Plexiglas cover

Final Design
-For Control Design Lab Real Time Windows Target Toolbox meets the criteria for all controllers that would be implemented -For other higher level classes the xPC Target Toolbox should be utilized (Fuzzy Logic, Modern Control, Signal Processing, etc)

Computer

Computer

RS-232

Computer

PCI Card

PCI Card

PCI Card

Interface Board Motor Board One Computer Solution

Interface Board Motor Board

Interface Board Motor Board

Two Computer Solution

Testing Results
Integrator Results

Control Algorithm Integrator Controller (Analog) Integrator Controller (RTW) Integrator Controller (xPC) Integrator Controller (Simulation)

OS (%) % Error OS Tr (sec) % Error Tr Tp (sec) % Error Tp 38.10 39.60 39.48 40.20 6.46 2.77 3.07 1.30 --0.68 0.65 0.64 0.66 0.63 7.94 3.17 1.59 4.76 --1.09 1.06 1.06 1.09 1.04 4.78 1.89 1.89 4.59 ---

Integrator Controller (Theoretical) 40.73

RusoI t g t rC to r( eus ht doVwg u oe) e lt f r n r o o r lle R lt Sfe f r i i Ppss s ea n s i en r


2

A lo C toB r Ru n g o r l o d e lt a n a s

T c o e r V lta e[V a h m te o g ]

OS =

M pt yss step

1 . 5

S uto C toRu i la n o r l e lt mi n s
1

DiaC toMLB elT e i dwRu i t l o r l A AR i W os e lt g n T am n s


0 . 5

DiaC toMLBP TgtRu i t l o r l A AxCa e e lt g n T r s


0

-. 0 5

-. 1 5 1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

2 0

tmsc i e e] [

Testing Results
PI Controller Results

Control Algorithm PI Controller (Analog) PI Controller (RTW) PI Controller (xPC) PI Controller (Simulation)

OS (%) % Error OS Tr (sec) % Error Tr Tp (sec) % Error Tp 24.30 25.80 25.35 25.20 3.57 2.38 0.60 --0.27 0.27 0.26 0.26 3.85 3.85 0.00 --0.46 0.47 0.46 0.45 2.68 3.79 2.68 ---

R usoP oto r( eus ht doVwg u oe) e lt f r IC r lle R lt Sife f r iein Pr ss s n s p


2

A lo C toB r R u n g o r l o d e lt a n a s
1 . 5

step

T c o e r V lta e[V a h m te o g ]

OS =

M pt yss

S u t n otoR u im io C r l e lt la n s
1

Dit lC toM LB elT e i dwR u iga o r l A A R i W os e lt n T am n s


0 . 5

Dit lC toM LBP Tr eR u i a o r l A A xCa t e lt g n T g s


0

-. 0 5

-. 1 5 1 0

1. 0 5

1 1

1. 1 5

1 2

1. 2 5

1 3

1. 3 5

1 4

1. 4 5

1 5

t esc im[ e]

Testing Results
One Pole Controller Results

OS =

M pt yss step

R usoO P C to r( eus ht doVwg u oe) e lt f r n o o r lle R lt Si e f r i i Pr ss s e le n s f en p


1 . 5

T c o e r V lta e[V a h m te o g ]

C o n tro l A lg o rith m O ne P ole C ontroller O ne P ole C ontroller O ne P ole C ontroller O ne P ole C ontroller O ne P ole C ontroller O ne O ne O ne O ne O ne P ole P ole P ole P ole P ole C ontroller C ontroller C ontroller C ontroller C ontroller

O S (%)% (A nalog ) 27 .0 3 (R TW ) 28 .0 1 (x P C ) 28 .1 0 (S im ula tion) .0 3 27 (Theo re tic al) .6 0 29 Tp (se c) % (A nalog ) 0.55 (R TW ) 0.54 (x P C ) 0.54 (S im ula tion) 0.54 (Theo re tic al) 0.52

Erro r O S r (se c) % T 8 .68 0.3 5 5 .37 0.3 5 5 .07 0.3 5 8 .68 0.3 5 --0.3 4 Erro r pT 5 .83 4 .85 4 .85 4 .85 --Vs s (V ) % 1.21 50 1.21 86 1.21 58 1.17 28 1.17 27

Erro r r T 4.48 4.48 4.48 4.48 --Erro r sV s 3.61 3.92 3.68 0.01 ---

A lo C toB r R u n g o r l o d e lt a n a s
1

S u to C toR u i la n o r l e lt mi n s

0 . 5

Dit lC toM LB elT e inos eu i a o r l A A R i W wR lt g n T a m d s

DiaC toM LBP Tr eR u i t l o r l A A xCa t e lt g n T g s

-. 0 5

-. 1 5 1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

2 0

T esc im[ e]

Testing Results
Sampling Time [sec] Simulation OS [%] Single Computer [% Error] Two Computer [%Error] Simulation Tr [sec] 0.0250 15.000 3.000 0.667 0.429 0.233 3.263 0.600 0.000 0.000 0.0375 19.900 2.010 1.508 0.430 3.488 1.163 0.610 0.000 0.000 0.0500 24.600 2.439 1.626 0.413 3.030 0.606 0.625 0.000 0.000 0.1000 39.800 3.015 3.769 0.410 6.098 7.317 0.650 0.000 0.000 --0.2000 --

Two Pole, One Zero Controller Results

Single Computer [% Error] Two Computer [% Error] Simulation Tp [sec] Single Computer [% Error] Two Computer [% Error]

R Tr eSp epneoDe nS pn T e w ZHqi a nDc t C to r T a t t R os f r if r t a li g i s it OEu let isr e o r lle Wg e s f e m m h v e n


1 . 8

R Tr eSp epneoDe nS p g im w ZHqi a nDc t C to r T a t t R os f r if r t a lin T e it OEu let i r e o r lle Wg e s fe m s h v se n


4

0 S pn T e . a li g im 2 m
1 . 6 3 1 . 4

T c o e e to V lta e[V a h g n ra r o g ]

T c o e e to V lta e[V a h g n ra r o g ]

0 35 a pn T e . 7 S li g im 0 m
1 . 2

0 . 8

0 . 6

0 . 4

0 . 2 2 0

-. 0 2

1 0

1 2

1 4

1 6

1 8

2 0

3 0

1 0

1 2

1 4

1 6

1 8

2 0

T es i [] m

T es i [] m

Testing Results
Position Control Results
Input Shaft

Output Shaft

Febc P it n eusMoI it lly t20 er ead oe t 9 dg e) edak o io R lt ( o r nia a 7 dg s n m do 0 er s s s t e v e


5

A lo B r Febc P ii n eusMoI ii lly t20 er e ad oe t 9 dg e) n g o d edak oto R lt ( o r na a 7 dg s n m do 0 er s a a s s t t e v e


5

P s nV lta e [V o itio o g s ]

OptSa V ae u u hf o g t t lt

P s nV lta e [V o itio o g s ]

OptSa V ae u u hf o g t t lt

I ptSa V ae nu hf o g t lt

I ptSa V ae nu hf o g t lt
-0 1 0 1 2 3 4 5 6 7 8 9 1 0

t esc im[ e]

-0 1

1 0

tm[ e] i esc

Testing Results
Power Supply Noise Results
PtoTco e rVlt g v.T eoDe nPw S p sS t doVwg u oe) lo f ahme oae s imf r if r t oe u lie ( h e f r iein Pr ss t fe r p if p
1 . 8

1 . 6

1 . 4

1 . 2

HE61 Pw Sply P 33A oe up r

T c o e r V lta e[V a h m te o g ]

0 . 8

0 . 6

0 . 4

Febc 0- 0 Pw Sply edak 1 0 oe up 1 r


0 . 2

-. 0 2 1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

2 0

t esc im[ e]

Testing Results
Fuzzy PI Controller Implementation Performance Comparison
Sampling Frequency 1 kHz 2 kHz 4 kHz 8 kHz 10 kHz Single Computer Two Computer Experiment: Processor Experiment: Task Percentage Execution Time 4% 7% 14% 29%--Stopped Running Stopped Running Immediately 49 s 50 s 53 s 51 s 54 s

Conclusions
-Both designs successful -Both can be used in Current Control Systems Design Lab -Two Computer Setup can be used in multiple applications

Computer PCI Card Interface Board Motor Board One Computer Solution

Computer PCI Card Interface Board Motor Board

RS-232

Computer PCI Card Interface Board Motor Board

Two Computer Solution

Thank You Dr. Phillips Dr. Mathew Ken Snyder Jim Stefano Jacob Slezak

Questions

Single Computer Setup BOM


Item Interface PCB (3 min. order) 50 Pin Connector 34 Pin Connector PCI-DAS1602/16 C100FF-2 (50 Pin Ribbon Cable) Total Cost Per Station Complete Lab Station $780.68 8 Itemized Cost $17.00 $1.47 $1.14 $715.50 $44.10 Qty. 1 2 1 1 1 Total $17.00 $2.94 $1.14 $715.50 $44.10 $780.68 $6,245.44

Two Computer Setup BOM


Item Interface PCB (3 min. order) 50 Pin Connector 34 Pin Connector PCI-DAS1602/16 C100FF-2 (50 Pin Ribbon Cable) RS-232 Cable xPC Target License (One Year for Entire Lab) Total Cost Per Pair Total Cost for Lab (Hardware) Total Cost for Lab with Software $1,569.36 4 Itemized Cost $17.00 $1.47 $1.14 $715.50 $44.10 $8.00 $600.00 $1,569.36 $6,277.44 $6,877.44 Qty. Total 2 $34.00 4 $5.88 2 $2.28 2 $1,431.00 2 $88.20 1 $8.00

Production Plan
Week 1 Order PCI Card from Measurement Computing Receive PCI Cards Install PCI Cards into PC's Order PCB Boards Receive PCB Boards Populate PCB Boards Test Setups Week 2 Week 3 Week 4 Week 5 Week 6

You might also like