csu dan simon

36
Modeling and Analysis of Signal Estimation for Stepper Motor Control Dan Simon Cleveland State University October 8, 2003

Upload: uttam-mn

Post on 28-Aug-2014

11 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Csu Dan Simon

Modeling and Analysis of Signal Estimation for

Stepper Motor Control

Dan SimonCleveland State University

October 8, 2003

Page 2: Csu Dan Simon

Outline

• Problem statement• Simplorer and Matlab• Optimal signal estimation• Postprocessing• Simulation results• Conclusion

Page 3: Csu Dan Simon

Problem statement

• Speed control for PM DC motor• Aerospace applications

– Flywheel energy storage– Flight control trim surfaces– Hydraulics– Fans– Thrust vector control– Fuel pumps

Page 4: Csu Dan Simon

Problem statement

DC Machine Permanent Excitation

JTJkILkLRILVI

L /////

−=−−=

ωω

&

&

I = armature currentV = armature voltageL = inductanceR = resistancek = motor constant

ω = rotor speedθ = rotor angleJ = moment of inertiaTL = load torque

Page 5: Csu Dan Simon

State assignment:• x1 = I• x2 = ω• x3 = θ• x4 = TL / JMeasurements: • y = current (and possibly position)

Problem statement

Page 6: Csu Dan Simon

Problem statement

Estimate velocity x2

noise01000001

y

noise

000/1

00000010100/

00//

+

=

+

+

−−

=

x

V

L

xJk

LkLR

x&

Page 7: Csu Dan Simon

Simplorer and Matlab

• Simplorer– Circuit element models– Electric machine models– Data analysis tools– Interfaces with Matlab /

Simulink

Page 8: Csu Dan Simon

Simplorer and Matlab

• Matlab– Powerful math and matrix

capabilities

• Co-Simulation– Link Simplorer and Matlab– Plot and analyze data in

either environment

Page 9: Csu Dan Simon

Simplorer and Matlab

• Use the SiM2SiM tool inAdd Ons / interfaces6

• Begin the simulation in Simulink

Page 10: Csu Dan Simon

Simplorer and Matlab

Define Simplorer inputs and outputs in the property dialog of the SiM2SiM componentSimplorer ? Simulink

Page 11: Csu Dan Simon

Simplorer and Matlab

• Use the S-function property dialog in Matlabto link Simplorer / Matlab signals

Page 12: Csu Dan Simon

Simplorer and Matlab

• Begin the simulation in Matlab• Couple Simplorer’s and Matlab’s strengths

– Simplorer: power electronics, electromechanics, data analysis, state diagrams

– Matlab: matrix algebra, toolboxes

• Data analysis / viewing can be done in either Simplorer or Matlab

Page 13: Csu Dan Simon

Optimal signal estimation

Given a linear system:

DvCxy

wBuBAxx wu

+=++=&

x = statey = measurementu = control inputw, v = noise

Find the best estimate for the state x

Page 14: Csu Dan Simon

Optimal signal estimation

Suppose w ~ N(0, Q) and v ~ N(0, R).The Kalman filter solves the problem

{ }

)ˆ(ˆˆ

)ˆ()ˆ(min

11

xCyKxAx

DRDPCK

KCPQBBPAAPP

dtxxxxE

TT

Tww

T

T

−+=

=

−++=

−−

−−−

&

&

Page 15: Csu Dan Simon

Optimal signal estimationThe H∞ filter solves the problem

θ1

)0(ˆ)0(

ˆ222

2

1110

<++−

∫ ∫∫

−−− dtvdtwxx

dtxx

RQP

S

This is a game theory approach.Nature tries to maximize the estimation error.The engineer tries to minimize the error.

DvCxy

wBuBAxx wu

+=++=&

Page 16: Csu Dan Simon

Optimal signal estimation

Rewrite the previous equation:

J

J

dtvwdtxxxx

xvwx

RQSP

)0(,,ˆ

2222

maxmin

0

01ˆ)0(ˆ)0(

1111

0

<

<+−−+−− ∫∫ −−−

θθ

Game theory: nature tries to maximize J and the engineer tries to minimize J

Page 17: Csu Dan Simon

Optimal signal estimation

The H∞ filter is given as follows:

)ˆ(ˆˆ

11

xCyKxAx

DRDPCK

PSPKCPQBBPAAPPTT

Tww

T

−+=

=

+−++=−−−

&

& θ

Note this is identical to the Kalman filter except for an extra term in the Riccati equation.

Page 18: Csu Dan Simon

Optimal signal estimation

• The Kalman filter is a least-mean-squares estimator

• The H∞ filter is a worst-case estimator• The Kalman filter is often made more

robust by artificially increasing P• The H∞ filter shows exactly how to

increase P in order to add robustness

PSPKCPQBBPAAPP Tww

T θ+−++=&

Page 19: Csu Dan Simon

• Steady state:

Optimal signal estimation

)ˆ(ˆˆ

011

xCyKxAx

DRDPCK

PSPKCPQBBPAAPP

TT

Tww

T

−+=

=

=+−++=

−−−

&

& θ

• This is an Algebraic Riccati Equation• Real time computational savings

Jacopo Riccati1676-1754

Page 20: Csu Dan Simon

Postprocessing

Transfer Matlab data to Simplorer for plotting and analysis

Page 21: Csu Dan Simon

Postprocessing

• Start the Matlab postprocessor interface before starting the co-simulation

• After running the co-simulation, the Day postprocessor can exchange data with Matlab

Page 22: Csu Dan Simon

Postprocessing

Drag data between Day and Matlab

Matlab commands

Matlab output

Matlab variables

Page 23: Csu Dan Simon

Postprocessing

• Day cannot handle arrays with more than two dimensions – use Matlab’s “squeeze” command

• Make sure Matlab data is not longer than Simplorer’s time array

Page 24: Csu Dan Simon

Postprocessing

Simplorerdata

Matlabdata

Page 25: Csu Dan Simon

Postprocessing

AnalysisàCharacteristicsto view statistical information

Select the desiredoutput variable

Export to table

Page 26: Csu Dan Simon

Simulation results

motor parameters

measurements

control input

Ouput from Matlab

Page 27: Csu Dan Simon

Simulation results

equationsˆandimplement xP &&

motor

PI Controller

Page 28: Csu Dan Simon

Simulation parameters:• 1.2 ohms, 9.5 mH, 0.544 Vs, 0.004 kg⋅m2

• Initial speed = 0cmd speed = 1000 RPM

• External load torque changes from 0 to 0.1

• Measurement errors0.1 A, 0.1 rad (1 σ)

Simulation results

Page 29: Csu Dan Simon

Simulation results

Page 30: Csu Dan Simon

Steady state parameters:• Initial speed = 1000

commanded speed = 1000 RPM• External load torque = 0• Measurement error = 0.1 A, 0.1 rad (1 σ)

Simulation results

Page 31: Csu Dan Simon

Simulation results

Page 32: Csu Dan Simon

Simulation results

Page 33: Csu Dan Simon

Simulation results

0.0580.035L = 2 L

938941k = 2 k

0.0820.078J = 2 J

0.1200.122R = 2 R

828834k = k / 2

0.0600.060J = 0.6 J

0.0560.032L = L / 2

0.1060.102R = R / 2

0.0570.033Nominal

H∞ filterKalman filter

RMS Estimation Errors (RPM)current and position measurements

Page 34: Csu Dan Simon

Simulation results

Now suppose we measure winding current but not rotor position. Can we still get a good estimate of motor velocity?

[ ] sigma) one amps, (0.1 noise0001y

noise

000/1

00000010100/

00//

+=

+

+

−−

=

x

V

L

xJk

LkLR

x&

Page 35: Csu Dan Simon

Simulation results

0.0380.036L = 2 L

959959k = 2 k

0.0810.081J = 2 J

0.1540.154R = 2 R

939941k = k / 2

0.0600.060J = 0.6 J

0.0360.034L = L / 2

0.1020.102R = R / 2

0.0360.034Nominal

H∞ filterKalman filter

RMS Estimation Errors (RPM)current measurement only

Page 36: Csu Dan Simon

Conclusion

• Motor state estimation is required for motor control

• Kalman filtering and H∞ filtering can be used for motor state estimation

• Steady state filtering saves time• Simplorer / Matlab co-simulation• Estimate motor parameters R, L, J, k