model of moving coil meter - mechanical engineering · model of moving coil meter prof. r.g....
TRANSCRIPT
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Experimental and Theoretical
Model of Moving Coil Meter
Prof. R.G. Longoria
Updated Summer 2012
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
System: Moving Coil MeterFRONT VIEW
REAR VIEW
Electrical circuit model
Mechanical model
Meter
movement
Series resistor
‘needle’
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Moving Coil Meter Movement
From Figliola and Beasley,
“Theory and Design for
Mechanical Measurements”,
John Wiley and Sons, 1995.
This D’Arsonval meter movement is a basic EM
device that responds to electrical voltage or current
signals.
In the particular meter being used, the
coil pivots such that the conductors
are always perpendicular to the
magnetic field generated by a
permanent magnet, as shown here.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Physical Modeling of System
• We focus on a 2nd order model that neglects inductance.
• The appendix shows a 3rd order model with inductance, and a frequency response comparison of the 2nd order and 3rd order model shows that the simplification is reasonable.
• Methods for deriving transfer functions are reviewed.
• Frequency response derivations are summarized and examples provided in Matlab and LabVIEW.
• These tools should allow comparison of model and experimental data directly on the same or similar plots.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Meter Movement Bond GraphA bond graph of the meter is shown below. The coil has resistance, Rm, and inductance,
Lm. The needle has moment of inertia, Jm, and there is some damping, Bm, as well. The
spring has stiffness, Km. These are parameters for linear constitutive relations for each
of the elements shown in this model. Note, the meter also has an external series resistor
that is not shown here, but the value of that resistance can be added to Rm.
We seek a mathematical
model that relates needle
position, θ, to input
voltage, v.
This model can be
derived from the bond
graph, or by application
of Newton’s Laws
(mechanical side) and
KVL (circuit side).
Causality
assignment shows
this is a 2nd order
system.
Ignore
inductance
(very
small)
See appendix for 3rd order system model with inductance included.
: mJI
ωhɺ
Gmv
mi
mT
mω
mr••
1
BωB
T
:m
BR
KT
Kθɺ
1
:m
LI
:m
RR
Ri
λɺ mi
Rv
v
i:1
mKCE
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Simplified Model Equations
( )
angular momentum
angular position of needle/spring
where,
( )
m m
m s m m
m
m m m
m m m
m
m
c s
h J
h T K B
T r i
v r
v vi
R R
ω
θ
θ ω
θ ω
ω
= =
=
= − −
=
=
=
−=
+
ɺ
ɺ
The mathematical model for the meter, neglecting inductance,
States:
State
equations:
EM gyrator
relations: If you know how to derive the
equations from a bond graph, you
see how current is here
determined by the voltage drop.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
State Equations – 2nd order
�
21
100
mm m m
m m
m
m
rB K r
hR JhR v
J
θθ
− + −
= + B
A
ɺ
ɺ
�����������
In state space form:
[ ]�
[ ]�
0 1 0h
y vθθ
= = +
DC
State equations:
Output equation:
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Transfer Functions (TF)
• To derive a transfer function (TF), you have several options:
1. Use G(s)=C(sI-A)-1B+D (state-space to TF)
2. Change the state space equations into an ODE of nth order, and use Laplace transform
3. Use a bond graph, and apply impedance methods
• It is likely that you may have learned one or two of these approaches for deriving the TF.
• Method #1 is available in LabVIEW and Matlab, but only if numerical parameters are available.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
2nd order SS Model to TF
G s( ) 0 1( )
s Bm
rm2
Rm
+
1
Jm
⋅+
1−
Jm
Km
s
1−
⋅
rm
Rm
0
⋅ 0+
G s( )1
Rm s Bm⋅⋅ Rm Km⋅+ rm2
s⋅+ Rm s2
Jm⋅⋅+
rm⋅
G s( )1
Rm s2
Jm⋅⋅ Rm Bm⋅ rm2
+
s⋅+ Rm Km⋅+
rm⋅
numrm
Rm Jm⋅
den s2
Bm
rm2
Rm
+
1
Jm
⋅ s⋅+Km
Jm
+
In a similar manner as in the
previous case, the G(s)
function is derived here
symbolically.
Keep in mind, this G(s)
function has been defined by
the A,B,C,D system as:
So ( )G sv
θ⇒ =
( )y
G su
=
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
TF to Frequency Response
• Given G(s), you can determine the frequency response
function (FRF), by setting s = jω, and determining the
amplitude and phase functions of G(s).
• Use:
• Example (1st order system):
( ) ( ) jG j G j e
φω ω=
�1 1
( ) ( )1 1s j
G s G js jω
ωτ τω=
= ⇒ =+ +
( )
( )
2
Im( )1 1
Re( )
1( )
1
0 tan tan ( ) ( )den
num den den
G jωτω
φ φ φ τω φ ω− −
=+
= − = − = − =
Amplitude function
Phase function
Both of these functions are
plotted versus frequency, ω.
These functions are also referred to as ‘Bode plots’, and are commonly found functions in Matlab
(Control Toolbox) and LabVIEW (Control Design Toolkit). If these packages are not available,
you must derive the functions analytically so you can plot in Excel, Matlab, or LabVIEW.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Meter: TF to FRF (2nd order)( ) ( ) j
G j G j eφω ω=
�
( )2 2
22
( ) ( )1 1
m m
m m m m
s jm m m mm m
m m m m m m
r r
R J R JG s G j
r K r Ks B s j B j
R J J R J J
ω
ω
ω ω=
= ⇒ =
+ + + + + +
( )
222
2
2
Im( )1 1
Re( )2
( )
0 tan tan ( )
m
m m
m mm
m m m
mm
den m m
num den denm
m
r
R JG j
K rB
J R J
rB
R J
K
J
ω
ωω
ω
φ φ φ φ ωω
− −
=
− + +
+
= − = − = − =
−
Amplitude function
Phase function
( )2 2Note: 1jω ω= −
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Meter: dc gain
222
2
1( 0)
00
m m
m m m m m
m m mm m
m m
m m m
r r
R J R J rG j j
K R KK r
B JJ R J
ω
= ⋅ = = =
− + +
The dc gain is the value of the TF or FRF when ‘s’ or ‘ω’ go to zero,
respectively. So, from the amplitude function,
The dc gain for the moving coil meter is,
0
1( 0) m
m m
rG j j
v R Kω
θω
=
= ⋅ = =
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
DC Gain from this TFG s( ) 0 1( )
s Bm
rm2
Rm
+
1
Jm
⋅+
1−
Jm
Km
s
1−
⋅
rm
Rm
0
⋅ 0+
G s( )1
Rm s Bm⋅⋅ Rm Km⋅+ rm2
s⋅+ Rm s2
Jm⋅⋅+
rm⋅
G s( )1
Rm s2
Jm⋅⋅ Rm Bm⋅ rm2
+
s⋅+ Rm Km⋅+
rm⋅
numrm
Rm Jm⋅
den s2
Bm
rm2
Rm
+
1
Jm
⋅ s⋅+Km
Jm
+
The DC gain can be found from the G(s)
function by making s=jω go to zero.
( )2 2( ) m m m
m m m m m m
r R JG s
v s B r R s J K J
θ= =
+ + +
So, the DC gain is,
0
1( 0) m
s m m
rG s
v R K
θ
→
→ = = ⋅
�
,
dc current
m dcm dc m dcdc
m m m m
Tr v r i
K R K Kθ
= ⋅ = =
Other relations:
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Plotting the FRF
• The FRFs are commonly plotted as amplitude and phase functions (sometimes called Bode plots, although strictly speaking a Bode plot is an approximated ‘sketch’ of the FRF plots).
• LabVIEW and Matlab may have build-in packages:
– In Matlab, if Control Toolbox is available, use: bode().
– In LabVIEW, the Control Design Toolkit has CD Bode.vi.
– Use the online help if you have or want to use these tools.
• For this course, you should generate these plots without these tools, since it is instructive to develop the code for computing the amplitude and phase functions.
• It is important to notice that the amplitude is often plotted in terms of decibels (dB). In this context, the decibel is defined,
• Also, make note of the frequency axes used (rad, deg, etc.).
10dB 20log ( )G jω=See Matlab
example on next
slide.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Example Script
101
102
103
104
-30
-20
-10
0
101
102
103
104
-100
-80
-60
-40
-20
0
% Basic script for plotting amplitude and phase plots
% Example: 1st order system. RGL, 4-15-06
% Plot at selected frequencies
f = [10.000
20.000
50.000
100.00
200.00
400.00
500.00
1000.0
2000.0
5000.0
10000];
%
w = 2*pi*f;
N = length(w);
R=81.36e3;
C=0.005e-6;
tau = R*C;
j = sqrt(-1);
for i=1:N,
gsys(i) = 1/(j*w(i)*R*C+1);
magsys(i) = abs(gsys(i));
dbm(i) = 20*log10(magsys(i));
angsys(i) = atan(imag(gsys(i))/real(gsys(i)));
end
%
subplot(2,1,1), semilogx(f,dbm,'o')
subplot(2,1,2), semilogx(f,angsys*180/pi,'o')
Note, you can handle the
complex function in Matlab
directly.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Appendix
Details on the physical modeling and
on the 3rd order model
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Basic Electromechanics
F
B
q V F = q V × B
N
S
+
−
B-fieldcopperrod
current
flow direction
GFv
i•x
Permanentmagnet supplies the
B-field
The differential force on a differential element of charge, dq, is given by:
where B is the magnetic field density, and i the current (moving charge).
It can be shown that the net effect of all charges in the conductor allow us to write:
where dl is an elemental length.
For a straight conductor of length l in a uniform magnetic field, you can integrate to find the total force:
With angle α between the vectors, you can arrive at the desired relation:
dF dqv B= � ��
dF idl B= �� �
F il B= �� �
( )gyrator modulus
sinF Bl iα= ⋅�����
sinr Bl α=
We find this
modulation as:
F r i
v r V
V x
= ⋅
= ⋅
≡ ɺ
This slide summarizes the basic force-current relation in each conductor. In a bond graph, this can be
modeled by a gyrator, which gives a net relation between torque and current.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Meter Movement Bond GraphA bond graph of the meter is shown below. The coil has resistance, Rm, and inductance,
Lm. The needle has moment of inertia, Jm, and there is some damping, Bm, as well. The
spring has stiffness, Km. These are parameters for linear constitutive relations for each
of the elements shown in this model. Note, the meter also has an external series resistor
that is not shown here, but the value of that resistance can be added to Rm.
We seek a mathematical
model that relates needle
position, θ, to input
voltage, v.
This model can be
derived from the bond
graph, or by application
of Newton’s Laws
(mechanical side) and
KVL (circuit side).
Causality
assignment
shows this
is a 3rd order
system.
:m
JI
ωhɺ
Gm
v
mi
mT
mω
mr••
1
BωB
T
:m
BR
KT
Kθɺ
1
:m
LI
:m
RR
Ri
λɺ mi
Rv
v
i:1
mKCE
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Full Model Equations
angular momentum
flux linkage
angular position of needle/spring
( )
m m
m m
m s m m
c s m m
m
m m m
m m m
h J
L i
h T K B
v R R i v
T r i
v r
ω
λ
θ
θ ω
λ
θ ω
ω
= =
= = =
= − −
= − + −
=
=
=
ɺ
ɺ
ɺ
The mathematical model for the meter, including all the effects
described is,
States:
State
equations:
EM gyrator
relations:
Note: the needle and the
spring have the same
velocity.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Simplified Forms and Relations
2
2
flux linkage
angular position of needle/spring
( )
m m m
m m
m m m s m
mm c s m m
m
h J J
L i
d dh J J T K B
dt dt
diL v R R i v
dt
ω θ
λ
θ
θ θθ θ
λ
θ ω
= =
= = =
= = = − −
= = − + − =
ɺ
ɺ ɺɺ
ɺ
ɺ
We often choose to make use of simplified formulations; the state
space equations may not be suited for answering questions we have.
Note how the state
variables are related
to other useful
variables.
The state equations
are related to both 1st
and 2nd order forms
that we might use.
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
State Equations
�
0
1
0
01
0 0
m m
m m
m mm
m m
m
R r
L J
r Bh K h v
J J
J
λ λ
θ θ
− − = − − +
B
A
ɺ
ɺ
ɺ
���������
In state space form:
[ ] [ ]�
0 0 1 0y h v
λ
θ
θ
= = + DC
�����
State equations:
Output equation:
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Full Model SS to TF
G s( ) 0 0 1( )
sRm
Lm
+
rm−
Lm
0
rm
Jm
sBm
Jm
+
1−
Jm
0
Km
s
1−
⋅
1
0
0
⋅ 0+
G s( )rm
s3
Lm Jm⋅⋅ s2
Lm Bm⋅⋅+ s Lm Km⋅⋅+ Rm s2
Jm⋅⋅+ Rm s Bm⋅⋅+ Rm Km⋅+ rm2
s⋅+
G s( )rm
s3
Lm Jm⋅⋅ Rm Jm⋅ Lm Bm⋅+( ) s2
⋅+ Rm Bm⋅ Lm Km⋅+ rm2
+
s⋅+ Rm Km⋅+
numrm
Lm Jm⋅
den s3
Rm
Lm
Bm
Jm
+
s2
⋅+Rm Bm⋅
Lm Jm⋅
Km
Jm
+rm
2
Lm Jm⋅+
s⋅+Rm Km⋅
Lm Jm⋅+
Using the G(s) formula,
apply directly to the
derive the form shown
here to the right.
With a symbolic
processor, this is easily
accomplished (e.g.,
Matlab, MathCAD, or
Mathematica).
C
(sI-A)-1
B
D
ME 144L – Prof. R.G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Example using bode()
clear all
% examples parameters for moving coil
% this example plots both the 3rd and 2nd order system
global Rm rm Jm Km Bm Lm
Rm = 15085;
rm = 0.003;
Jm = 2e-7;
Km = 10e-6;
Bm = 9e-7;
Lm = 0.05;
% 3rd order case
A1 = [-Rm/Lm -rm/Jm 0;rm/Lm -Bm/Jm -Km;0 1/Jm 0];
B1 = [1;0;0];
C1 = [0 0 1];
D1 = [0];
sys1 = ss(A1,B1,C1,D1);
[num1,den1]=ss2tf(A1,B1,C1,D1)
% 2nd order case
A2 = [-(Bm+rm*rm/Rm)/Jm -Km;1/Jm 0];
B2 = [rm/Rm;0];
C2 = [0 1];
D2 = [0];
sys2 = ss(A2,B2,C2,D2);
[num2,den2]=ss2tf(A2,B2,C2,D2);
bode(sys1,sys2)
-400
-300
-200
-100
0
Magnitu
de (
dB
)
100
102
104
106
-270
-180
-90
0
Phase (
deg)
Bode Diagram
Frequency (rad/sec)
2nd order system3rd order
system
Note how the two models only deviate at very high frequency –
we will never excite the meter at this frequency range!! The 2nd
order system is clearly applicable for all cases of interest.