Вы находитесь на странице: 1из 41

Outline

 Goals
 Project Description/Requirements
 Block Diagram, Functional Description, Requirements
 Equipment
 Implementation
 Progress Summary
 References
Goals
Decrease the learning curve for the use of the dSPACE
DS1103 Workstation by future students by:

 Writing a Tutorial for use of the new DS1103


Workstation.
 Designing a controller to control the speed of a DC
motor.
 Implementing the controller design using the DS1103
Workstation.
Suggested DS1103 Uses
 Motor Control
 Robotics
 Automotive
 Magnetic Suspension Systems
Project Description

Block Diagram
ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder
Description/Requirements I
 ControlDesk software:
 Installed on PC.
 Downloading, Monitoring, Changing (Speed) Inputs.

 Controller:
 One or more designs.
 Simulink and RTI blocks.

 PWM Output.

 Optical Encoder Input.


Description/Requirements II
 Motor System:
 PWM Signal sent through Control Panel and
Additional Hardware before entering motor.
 Optical Encoder:
 Optical Encoder Input directly to Incremental
Encoder Input of Control Panel.
 CLP1103 LED/Connector Panel:
 Connect Inputs/Outputs between DS1103 Board
and Hardware.
Controller Requirements
 DC motor speed controller designed/simulated using
Simulink and dSPACE blocksets, Matlab-to-DSP
interface libraries, the Real-Time Interface to
Simulink, and Real-Time Workshop.

 Overshoot less than or equal to 5%.


 Rise time less than or equal to 110 ms.
 Minimize Steady-state Error.
Equipment: Workstation
 $14,000 dSPACE DS1103 system consisting of:
 DS1103 Board.
 Expansion Box.

 CLP1103 PPC Connector and LED Panel.

 ControlDesk Version 3.2.2/Other dSPACE


provided Software Applications.
 PC dedicated to the workstation containing
other software applications required
(Matlab/Simulink Version R2008a and libraries).
DS1103 Workstation
Equipment: Other
 Pittman GM9236C534-R2 DC
Motor.
 Magtrol HB-420 Brake.
 TIP120 Transistor.
 IN4004 Diode.
 SN7407 Hex Inverters.
 Other electronic components, power
supplies, and measurement devices.
Implementation
ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder

Block Diagram
ControlDesk

Simulink Model
Connector Panel

ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder

 PWM Output to Motor


 Incremental Encoder Input
PWM Output I

PWM
Output

z2 +1.932751 z+0.932751
.00003 PWM Channel 1
z 2 -1.39989 z+0.399894 TF_out Duty DutyCycle

Gc Hz_DutyCycle 0_to_1 PWM Channel 2

PWM Channel 3

PWM Channel 4
Ground DS 1103 SL _DSP _PWM

1
PWM Output II

To Motor
System
(PWM Ch. 1)
Incremental Encoder Input I
Encoder
Input

RTI Data

0 50 .2996 .001 5871 .7


RPM_in Hz pulses_ms_in Sum Gain_out
RPM _in RPM_to_Hz Hz_to_pulses _ms K

ENCODER
MASTER SETUP

DS1103 ENC_SETUP

Enc position
Terminator
Enc delta position 1000 .019881
pulses_ms_out Hz
DS1103 ENC_POS _C1
pulses _ms_to_Hz Hz_to_RPM
Incremental Encoder Input II

From
Encoder
Motor System & Brake

ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder
Motor System
+

Hex Inverters (Buffer), NPN Darlington Transistor, and Diode


Unit Step (238.57 RPM) Input
 Ch 1: Supply Voltage
 Ch 2: Voltage at Collector  Ch 1: PWM
 MATH: Motor Voltage  Ch 2: Encoder

 Ch 3: Motor Current
 Ch 4: Diode Current
Motor Model
Simulink Model

See “Current Motor Model” reference on Reference II slide.

Transfer Function (Torque components ignored):


502852 19.4699

s  14.54s  1776.78  s  1 s  1
 14.54  1776.78 
Motor Model Response
50
Bode Diagram
Gm = Inf dB (at Inf rad/sec) , Pm = 84 deg (at 279 rad/sec)  Phase Margin = 84°.
 ωc = 279 rad/s
Magnitude (dB)

-50

-100
0

-45
Phase (deg)

-90

-135

-180
10
-1 0
10 10
1
10
2
ωc 10
3
10
4 5
10
Frequency (rad/sec)
Brake

 Systems Stops at approximately:


 0.375 Nm -OR- 50 OzIn
Speed Input/Output I

ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder
Speed Input/Output II
RTI Data

z2 +
0 50 .2996 .001 5871 .7 .010417
RPM_in Hz pulses_ms_in Sum Gain_out Kz_out z2
RPM _in RPM_to_Hz Hz_to_pulses _ms K Kz

ENCODER
MASTER
RTI Data SETUP
DS1103 ENC_SETUP

Enc position
Terminator z2 +1.9
0 50 .2996 .001 5871 .7 .010417
Enc delta position
RPM_in Hz pulses_ms_in Sum1000 Gain_out
.019881 Kz_out z 2 -1.3
pulses_ms_out Hz RPM_out
RPM _in
DS1103 ENC_POS _C1 RPM_to_Hz Hz_to_pulses _ms K Kz Terminator 1
pulses _ms_to_Hz Hz_to_RPM

ENCODER
MASTER SETUP

DS1103 ENC_SETUP

Enc position
Terminator
Enc delta position 1000 .019881
pulses_ms_out Hz RPM_out
DS1103 ENC_POS _C1 Terminator 1
pulses _ms_to_Hz Hz_to_RPM
Controller I

ControlDesk
(Desired Speed
Input)

Load Applied to
Motor System Motor Shaft
CLP1103 By Brake
DS1103 Connector
Panel
Optical Encoder
Controller II
Controller III
Controller V
 Overshoot less than or equal to 5%.

 Rise time less than or equal to 110 ms.

 Minimize Steady-state error.


Controller VI
 Analog Controller designed and pre-warping and
bilinear methods used to convert to a Digital Controller.
 12kHz Sampling Frequency

72.0631(0.482282) s  28.8 z  1z  0.9976


 72.0631(0.482282)
(0.000040278) ss  857.6 z  1z  .931
z 2  0.0024 z  0.9976
 72.0631(.482282) 2
z  1.931z  0.931

Additional Gain adjustments have been made in


MATLAB calculations and Simulink Models.
MATLAB:
Motor Model and Controller
Bode Diagram

50
Gm = 24.2 dB (at 1.22e+003 rad/sec) , Pm = 69.5 deg (at 157 rad/sec)
 Actual:
0
 Phase Margin = 69.5º.
Magnitude (dB)

ωc = 157 rad/s.
-50

-100

-150
-90

-135
 Designed for:
Phase (deg)

-180  Phase Margin = 69.01º.


-225
(5 % O.S.)
-270
10
0
10
1
10
2
ωc 10
Frequency (rad/sec)
3
10
4 5
10
 ωc = 157.08 rad/s.
(20 ms Rise Time)
MATLAB: Step Response
Step Response
1.4

System: sys
System:1.2
sys Time (sec): 249
Time (sec): 165 Amplitude: 1.06
Amplitude: 1
1

System: sys
0.8
Amplitude

Time (sec): 125


Amplitude: 0.901

0.6

0.4
System: sys
Time (sec): 25
0.2 Amplitude: 0.104

0
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Samples (sec)

 Overshoot = 6%
 Rise Time = 8.33 ms
Simulink: Model I

MATLAB controller with added Gain of 7 Block


Simulink: Model II
Simulink: Step Response
1.4

1.2 X: 0.2237
X: 0.1608 Y: 1.05
Y: 1.001
1

X: 0.1242
0.8 Y: 0.9009

0.6

0.4

X: 0.01342
0.2 Y: 0.1003

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

 238.57 RPM = 1 pulse_in


 Overshoot = 5%
 Rise Time = 110 ms
System Response I
(200 RPM Input, 2.14 second Step Time)
250
250

X: 3.636
Y: 238.6
200
200
X: 2.53
Y: 200
X: 3.424
Y: 178.9 150
150

100
100

50
50

X: 2.141 X: 2.422
Y: 0 Y: 0
0
0 0 0.5 1 1.5 2 2.5 3 3.5 4
0 0.5 1 1.5 2 2.5 3 3.5 4

Actual System: ControlDesk Simulink Simulation


(Possible Time Delay, Rise
Time < 108 ms)
System Response II
250

200

150

100

50

0
0 0.5 1 1.5 2 2.5 3 3.5 4

Simulink/Actual System Actual: Frequency-to-Voltage


(RPM Output Only, Rise Time Converter
appears similar) (No Visible Overshoot)
Project Status: Timeline
Week Goal Task Completed
1 January 27 Write tutorial introduction January 22
2 February 3 Verify motor parameters Not Complete
Simulate motor model in MATLAB February 10
3 February 10 Design/Simulate controller in MATLAB March 10
Design/Simulate controller in Simulink April 9
4-5 February 24 Make required adjustments to model and download to DS1103 March 12
6 March 3 Design/Build/Test hardware for motor subsystem February 12
7 March 10 Design/Build/Test hardware for optical encoder system February 17
Make required adjustments to controller model to work with motor
8 - 10 March 31 March 12
and hardware and download to DS1103
11 - 13 April 21 Improve controller or Design/Build/Test additional controllers April 23
14 April 28 Work on presentation/final report/tutorial In Progress
15 May 5 Presentation May 5
16 May 11 Final Report Due In Progress
Project Status
 A Controller has been designed and
implemented using the DS1103 Board.
 The Controller functions correctly but may not
meet the rise time specification.
 The tutorial is still being put together but will be
completed.
 The motor/brake model was
verified/developed in a previous project.
References I
 Guides/Manuals:
 ControlDesk Experiment Guide For ControlDesk 3.2, Germany:
dSPACE GmbH, 2008, Release 6.1.
 dSPACE System First Work Steps For DS1103, DS1104,
DS1005, DS1006, and Micro Auto Box, Germany: dSPACE
GmbH, 2007, Release 6.0.
 DS1103 PPC Controller Board Hardware Installation and
Configuration, Germany: dSPACE GmbH, 2007, Release 6.0.
 Real-Time Interface (RTI and RTI-MP) Implementation Guide,
Germany: dSPACE GmbH, 2008, Release 6.1.
References II
 dSPACE Product Descriptions:
 “DS1103 PPC Controller Board”, Germany: dSPACE,
July 2008.
 “Connector and LED Panels,” Catalog 2008, Germany:
dSPACE GmbH, 2008, p. 302.

 Current Motor Model:


 Sabbisetti, Amulya Sabbisetti. "Discrete Time Gain
Scheduled Adaptive Control of DC Motor Speed",
Masters Project Report, Bradley University ECE
Department, December 2008.
Acknowledgments
 Mr. Nick Schmidt:
 Motor/Brake System Construction

 Mr. Mattus:
 Initial Setup of DS1103 Workstation
 Construction of Slave I/O and Encoder Connectors

 Larry Kendrick of Caterpillar:


 Funds for purchase of DS1103 system.

Вам также может понравиться