Professional Documents
Culture Documents
Project Overview
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
Project Overview
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
Communication
System Interface
Analog from Motor Tachogenerator +-8V Digital from Motor 6 Grey Code + Index for Position
Input Shaft
Output Shaft
Tachogenerator
1) Data Acquisition PCI Card in Windows 2) Separate PC with I/O Capability controlled by MATLAB
DSP Kit
Interface Board
Motor
DAQ Board
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
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
Generated C Code
PCI Card
Interface Board
DC Motor
Computer
Simulink
Generated C Code
xPC Kernel
PCI Card
Interface Board
DC Motor
Computer
Second Computer
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
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]
0.5
SIMULATION RESULT
0 10
11
12
13
14
15 time [sec]
16
17
18
19
20
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]
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
20 Gain
Analog O u tp u t A n a l o g O u tp u t
0 . 8
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
-. 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
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
-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
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
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
Motor Board
5 Analog Sensors 1 Analog Input 6 Digital Outputs
Interface Board
Analysis of Design
Analysis of Design
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
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 ---
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
-. 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 ---
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
-. 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
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
-. 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 --
Single Computer [% Error] Two Computer [% Error] Simulation Tp [sec] Single Computer [% Error] Two Computer [% Error]
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
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
T c o e r V lta e[V a h m te o g ]
0 . 8
0 . 6
0 . 4
-. 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
RS-232
Thank You Dr. Phillips Dr. Mathew Ken Snyder Jim Stefano Jacob Slezak
Questions
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