Top Banner
Title on all pages http://www.ro.feri.uni- mb.si 1 DC motor DC motor modeling modeling with hands with hands on experiments on on experiments on DSP2 DSP2 learning module learning module (introductory lecture to mini project) (introductory lecture to mini project) Doc.dr. Suzana Uran Address : Smetanova 17, SI-2000 Maribor, Slovenia; Address : Smetanova 17, SI-2000 Maribor, Slovenia; E-mail: E-mail: suzana.uran suzana.uran @uni-mb.si @uni-mb.si http://www.ro.feri.uni-mb.si http://www.ro.feri.uni-mb.si University of Maribor, Faculty of Electrical Engineering and Computer Science
26

Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Dec 30, 2015

Download

Documents

Phyllis Terry
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

11

DC motor DC motor modelingmodeling with hands on with hands on experiments onexperiments on DSP2 learning module DSP2 learning module

(introductory lecture to mini project)(introductory lecture to mini project)

Doc.dr. Suzana Uran

Address : Smetanova 17, SI-2000 Maribor, Slovenia; Address : Smetanova 17, SI-2000 Maribor, Slovenia; E-mail: E-mail: [email protected] @uni-mb.si http://www.ro.feri.uni-mb.sihttp://www.ro.feri.uni-mb.si

University of Maribor,Faculty of Electrical Engineering and Computer Science

Page 2: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

22

ContentsContents

• About DSP2 learning module

• DC motor modelling– hands on exercise:

current controlled DC motor model (we look for a model of current control loop )

• Conclusion

Page 3: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

33

http://www.ro.feri.uni-mb.si/projekti/dsp2/

DSP2 card

Exchangeable Control Plant

Control system: DSP2 learning moduleControl system: DSP2 learning module

Page 4: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

44

DSP2 DSP2 card: short descriptioncard: short description

• Signal processor TI TMS320C32-60,• 3 fast analog inputs 12 bit (2.6us conv. time) • 8 MUX analog inputs 12 bit ,• 1 analog bipolar output(12 bit)/2 unipolar outputs • 1 PWM output (3 phase)• 1 input for incremental encoder• 3 digital outputs and 1 digital input (isolated)• RS 232 duplex communication port

Page 5: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

55

Control plant: DC/AC motorControl plant: DC/AC motorhttp://www.ro.feri.uni-mb.si/projekti/dsp2/

H-bridge DC motor

Page 6: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

66

Control plant: Buck converterControl plant: Buck converter

buck

Page 7: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

77

RC oscilator: ADDA+RC control plantRC oscilator: ADDA+RC control planthttp://remotelab.ro.feri.uni-mb.si/experiments_rc_oscilator.asp

RC control plant

also REMOTE experiment!

Page 8: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

88

DSP2 module: Rapid Control PrototypingDSP2 module: Rapid Control Prototyping

MATLAB/SIMULINK and DSP Terminal on Personal computer

Page 9: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

99

SIMULINK libraries for DSP2 learning moduleSIMULINK libraries for DSP2 learning module

• Embedded Target for DSP-2 board

• DSP2 learning module

• DSP blockset

• Standard SIMULINK libraries

http://www.ro.feri.uni-mb.si/projekti/dsp2/documentation/ DSP2_Library_for_Simulink.pdf

Page 10: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1010

Modelling of DC motor current control loopModelling of DC motor current control loop

Hands on experiment:

Build a MATLAB/SIMULINK block scheme for open loop control of current controlled DC motor (ESCAP 28D2R-219P) using DSP2 learning module!

Measure motor speed with incremental encoder.

Page 11: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1111

DC motor, load, encoder dataDC motor, load, encoder data

DC motor ESCAP 28D2R-219P with incr. encoder.

Nominal voltage

12 V Torque constant

19.5

mNm/ANominal current

1.5 A Rotor inertia 1.76*10-6

kgm2

Nominal speed

5000 rev/min

   

    Load inertia 7.56*10-6

kgm2

    Incremental encoder

144*4=576 p/rev

Page 12: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1212

Getting started: DSP2 learning moduleGetting started: DSP2 learning module

• In MATLAB6p5/work directory create a new directory named: VILLACHvisit

• Run MATLAB6p5 and go to VILLACHvisit directory

• In MATLAB command window write command: dsp2lib

http://www.ro.feri.uni-mb.si/projekti/dsp2/documentation/ DSP2_Library_for_Simulink.pdf

Page 13: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1313

Getting startedGetting startedIn the new opened window ( see figure below)

double click New Model button and choose new file name!

Page 14: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1414

Getting startedGetting startedA new SIMULINK file for work with DSP2 learning module is opened with 3 buttons left above.

Now you can start building SIMULINK block scheme.

Page 15: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1515

Getting startedGetting started

• In DSP2 learning module library find blocks with name DCMOT

• choose block DCMOT tokovna regulacija (DCMOT TOKREG Ia – motor current control loop ) and put it in your SIMULINK scheme

• choose block DCMOT meritev hitrosti (DCMOT OMEGA – motor speed measurement) and put it in your SIMULINK scheme

Page 16: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1616

Getting startedGetting startedIn menu of your file choose:

Simulation/Simulation Parameters/Real-Time Workshop

For DSP-2 options 2 set:

576 number of lines per revolution for Incremental encoder

Page 17: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1717

Getting startedGetting started

• In Embedded Target for DSP-2 board library find block To Terminal – it is a block for data visualisation on your PC

• use three blocks To Terminal as shown on next slide

• In Embedded Target for DSP-2 board library find block From Terminal – it is a block for data input from keyboard of your PC

•use two blocks From Terminal as shown on next slide

Page 18: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1818

Getting startedGetting startedBuild SIMULINK block scheme below:

Page 19: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

1919

Getting startedGetting started

Set parameters on the left for Pulse Generator block

Page 20: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2020

Getting startedGetting started• Double click Edit Parameters (blue button)• Enter definitions for:

– T = 200e-6; % sampling time– amp (choose – carefully consider)– per (choose – carefully consider)– offset (choose – carefully consider)

• Double click Update Parameters (blue button)• Switch on DSP2 learning module and double

click Build (blue button)

Page 21: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2121

• after code buiding and download to DSP2 the DSP Terminal program starts. FIRST set Ioff as below (middle value to 0)

Getting startedGetting started

Page 22: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2222

Getting startedGetting startedAfter setting ENABLE=1, and selecting Ia, IaREF to view we get:

Page 23: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2323

Getting startedGetting started

• Did you get the same response?

• What happens if we choose offset=0? WHY?

• Determine the order and parameters of the model for the current control loop !

• If there is enough time left find the speed response of DC motor!

Page 24: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2424

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08-1

0

1

2

3

4

5

6

7

8

time(s)

wm(rad/s)

Motor speed response/SimulinkMotor speed response/Simulink

input signal IaREF

Speed response

Page 25: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2525

ConclusionConclusion

Current control loop is modelled as 1st order system.

-

KM

KT , TT

Md

m 1/JCIaREF

KT = 1,TT = 0.9 ms JC = 9.32. 10-6 kgms-2

KM=0.0195 Nm/A

Page 26: Http:// Title on all pages DC motor modeling with hands on experiments on DSP2 learning module (introductory lecture to mini project)

Title on all pages

http://www.ro.feri.uni-mb.si

2626

Motor speed measurementMotor speed measurement

Motor speed measurement is obtained from

position measurement of incremental encoder

by differenciation is very noisy.

To filter out the noise we use :

2.nd order Butterworth filter with

fcutoff = 200 Hz.