Download Modeling electric drivetrains (as covered in class)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Brushless DC electric motor wikipedia , lookup

Fault tolerance wikipedia , lookup

Alternating current wikipedia , lookup

Electric motor wikipedia , lookup

Electric vehicle conversion wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Distribution management system wikipedia , lookup

Dynamometer wikipedia , lookup

Metadyne wikipedia , lookup

AC motor wikipedia , lookup

Induction motor wikipedia , lookup

Brushed DC electric motor wikipedia , lookup

Stepper motor wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Transcript
Outline
Modeling the drivetrain
Simulation
Robot with slip
Modeling electric drivetrains
Prof. R.G. Longoria
Department of Mechanical Engineering
The University of Texas at Austin
February 3, 2015
ME 379M/397 Cyber Vehicle Systems (Longoria)
Summary
Outline
Modeling the drivetrain
Simulation
Robot with slip
1
Modeling the drivetrain
Model of H-Bridge
PMDC Model
Drivetrain models
Experiments for measuring motor parameters
Examples
2
Simulation
PWM/PMDC drivetrain
DaNI with open loop speed-controlled drivetrain (no-slip)
DaNI with closed loop speed-controlled drivetrain (no-slip)
3
Robot with slip
4
Summary
ME 379M/397 Cyber Vehicle Systems (Longoria)
Summary
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Drivetrain with speed control
Consider the direct-electric drive configuration shown below. A motor
amplifier/driver ‘modulates’ how (high) power flows between the battery and the
motor1
The (low power) drive signal from a controller essentially modulates the voltage
to the motor, enabling speed to be controlled. With measured motor shaft speed,
feedback control can be used to regulate wheel speed.
1
Many of these drivers feature regenerative control, so power flows back to the
battery during ‘braking’.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Modeling PWM/PMDC motor drivetrain
A specific drive configuration with pulse-width modulated (PWM) control of a
permanent-magnet dc (pmdc) motor is shown below. The speed controller is
commonly of H-bridge type for brushed dc motors.
The schematic details the armature circuit model for the pmdc motor, coupled to
motor inertia and losses. The back-emf voltage is vm , and ωm is motor shaft
speed. A model will be described to study factors that influence deviation from
ideal behavior (i.e., instantaneous wheel speed control, no slip, etc.).
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Model for PWM of H-bridge
A schematic of an H-bridge used as a reversible drive for a PMDC motor in PWM
mode is shown below.
The transistors (e.g., IGBTs or MOSFETs) are switched to achieve desired input
to the motor, and reversal of polarity is also possible. This type of speed
controller can be modeled as an ideal power transformer so bus power equals
power into the motor, vb ib = vin im , thus vin = mc vb , where mc is a modulus
related to the on/off switching duty cycle. Also, ib = mc im . With efficiency
information, loss effects can be accounted for as well.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Average model for PWM using H-bridge
The simple ‘average’ model of the H-bridge under PWM control assumes that
power flows ideally and reversibly. In bond graph modeling, an ideal power
transformer is used to represent this type of physical process/device.
General PWM/H-bridge ideal (power-conserving/reversible) equations:
v1 i1 = v2 i2 , and v2 = mc v1 , i1 = mc i2 , with mc a duty-cycle modulus. A
resistive element can be added to account for losses, sized according to efficiency.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
PMDC dynamic model
The full PMDC motor dynamic model is represented by the equations,
λ̇ = −Rm λ/Lm − rm h/Jm + vin
ḣ = rm λ/Lm − Bm h/Jm − TL
where λ = Lm im is the flux linkage, and h = Jm ωm is the angular
momentum. It is often more convenient to use ωm and im as the dynamic
states.
Given input voltage, vin , these equations model transient current and shaft
motion of the motor. This model relies on relations for ideal
electromechanical power conversion, Tm = rm im and vm = rm ωm , where
rm is the torque constant. Linear torque losses are TB = Bm ωm , and TL
is external load torque.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
PMDC steady-state model
At steady-state speed, ωo , use
momentum equation,
ḣ = Jm ω̇m = 0 = rm io −Bm ωo −To ,
letting To be the load torque at
steady state. The steady-state
current, io , is determined from the
voltage equation,
λ̇ = Lm i̇m = 0
or,
Combining these steady-state
relations results in a theoretical
torque-speed curve, To (ωo ).
Since,
To = rm io − Bm ωo ,
we find,
2
rm
rm
vin − Bm +
ωo .
To =
Rm
Rm
Note stall torque is predicted from
this model when ωo = 0,
0 = −Rm io − rm ωo + vin .
To (0) = Tstall = rm vin /Rm
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Parameters from motor specifications
Some parameters for a Maxon RE040
PMDC motor are listed in
specifications:
1
terminal resistance (line 8),
2
terminal inductance (line 18),
and
3
rotor inertia (line 17)
Other parameters may need to be
estimated or measured.
For example, the mechanical losses,
represented by Bm , can be estimated
from the given no-load conditions
(lines 3 and 6).
ME 379M/397 Cyber Vehicle Systems (Longoria)
At no load: ino-load = 137 mA
(line 6), ωno-load = 7580 rpm (line
3). From torque at steady-state,
rm ino-load = Bm ωno−load , implies
Bm = 5.2 × 10−6 N-m-sec rad.
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Practical considerations on PMDC model
The dynamic and steady-state models presented are a good start for
understanding performance of many mobile robot drivetrains. Some factors not
considered in this model are gearbox characteristics, nonlinear mechanical losses,
and thermal limits, which can be important in some critical applications. The
torque-speed characteristics for a Maxon RE040 PMDC motor include maximum
power line as well as thermal limits.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: LabVIEW Robotics Starter Kit
In the drivetrain design on the DaNI 2.0, the real-time controller (sbRIO) sends
pulse-width-modulation signals via digital I/O lines to a ‘motor controller’, which
controls the flow of high power from the battery/bus to the motors.
Both driving and braking is managed using the speed controller.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
PWM/PMDC drivetrain model
The DaNI drivetrain fits our model for a PWM/PMDC drivetrain:
As in our working concept, a ‘modulation’ control signal varies over (±1),
modeling the averaged voltage applied by the controller to the motor.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Sabertooth R/C motor controller
Specific motor controller used on the
DaNI robot:
The dip switches are used to manage many options,
including how the drive channels work.
Operation options are set by dip
switches (see appendix):
This controller is particularly suited for differential-drive
vehicles. For example, in the mixing mode, this controller
accepts inputs for controlling forward and yaw velocity.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
DaNI controller settings
The DaNI 2.0 has the dip settings set as shown below:
This sets mixed mode off (1 down) and auto-calibrate off (5 down).
Note that specific PWM pulse-width settings are set at this point. This is
relevant to the PID controller output (to be studied later).
ME 379M/397 Cyber Vehicle Systems (Longoria)
Summary
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Dynamic model equations - PWM/PMDC motor drivetrain
The dynamic model for a PWM-driven PMDC motor drivetrain takes the
following form, where it is assumed that the bus (or battery) voltage, vb is a
known constant.
States: im , ωm
Inputs: vb , mc
ib = mc im
vin = mc vb
1
dim
=
[vin − Rm im − rm ωm ]
dt
Lm
dωm
1
=
[rm im − Bm ωm − TL /GR]
dt
Jef f
In these equations, TL is the torque applied at the output shaft.
If bus voltage changes depending on current drawn, a simple Thevenin model is,
vb = vo − Rb ib , where Rb represents losses in the source.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Complete drivetrain model
The model just described can be described as shown below. The bond graph can
guide the equations, which are given on the next slide.
If motor inductance is relatively small, the dynamic model is simplified to one
differential equation for motor speed. In some cases, it may be sufficient to use a
torque-speed curve. Each case requires using a model sufficient for the goals of
the analysis.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Drivetrain model, no inductance, with and
without bus/battery model
If the inductance in the motor model is not included, the dynamic equations are
simplified to just one, namely,
1
dωm
=
[rm im − Bm ωm − TL /GR]
dt
Jef f
where now im = (vin − rm ωm )/Rm . If there is no need to model the battery,
then vin = mc vbo , where vbo is a constant bus/battery voltage.
To account for changes in bus/battery voltage, vin = mc vb = mc (vbo − Rb ib ),
where, ib = mc im . Since, im = (vin − rm ωm )/Rm ,
vin
−1
2 Rb
(mc vbo + m2c rm ωm Rb /Rm )
= 1 + mc
Rm
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Considerations in selecting motor/drivetrain model
1
If motor inductance is relatively small, current transients occur over a very
short time period compared to the mechanical response.
2
Including inductance when it is very small can lead to a computationally stiff
simulation, so it should only be included when necessary to study critical
transient current effects.
3
In particular, large ‘in-rush’ currents can be induced when there is negligible
shaft motion, since back emf (vm = rm ωm ) is also small. Sometimes the
large current spikes induced under these conditions need to be understood.
4
It has been shown how changes in what is included in a model depends on
what needs to be studied, and these changes may require need for more
parameters and/or lead to difficulties in deriving and solving the equations
numerically.
5
Fortunately, methods exist to make equation derivation much more reliable
and convenient (e.g., bond graphs), and modern computational solvers can
typically resolve many of the issues that can arise.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Experiments for measuring PMDC motor parameters
It is sometimes necessary to experimentally determine motor model parameter
data. For a pmdc motor, two common experiments are the no-load and
‘blocked-rotor’ tests. Assume the motor terminal resistance, Rm , can first be
measured using an ohmmeter.
No-load test (rm , Bm ): In a no-load test, the motor input voltage, vin , is varied,
and armature current and motor speed are measured. From KVL on the armature
circuit: vin − Rm im − rm ωm = 0, which allows determination of rm . Once rm is
found, the mechanical rotational losses can be found since, Tm = rm im = Tloss .
Assuming a linear model, Tloss = Bm ωm , then Bm = rm im /ωm .
Blocked-rotor test (stall properties, Ts , is ): While holding the motor shaft
speed to zero, ωm = 0, with motor input voltage, vin , stall current is measured,
is . Given rm , stall torque can be found, Ts = rm is .
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Tetrix PMDC motor
Key parameters for a model of a Tetrix PMDC motor can be found from
steady-state testing. The table below summarizes data from three no-load tests.
No-load test data:
vin
im
ωm
rm
Bm
(V)
(A) (rad/s) (Nm/A) (mNms/rad)
3.7 0.25
84
0.037
0.11
8.3 0.28
209
0.036
0.05
11.7 0.30
304
0.036
0.04
Torque-speed curve:
2
rm
rm
To (ωm ) =
vin − Bm +
ωm
Rm
Rm
Note: Using speed-dependent Bm
seems insignificant but it can
affect power calculations.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Example: Tetrix PMDC motor (cont.)
The inductance, Lm , and inertia, Jm , of the motor can also be found, but both
tests require setting up transient experiments and measurements.
Motor inductance. The motor inductance can be found by setting up a
blocked-rotor test and measuring the transient current. The current trace follows
an exponential trend, from which a time constant is found, which is equal to
τ = Lm /R. The inductance can be determined from the time constant and the
effective armature resistance, R.
Motor inertia. One way to measure the motor inertia is to drive the motor with
a step input. The value of inertia, Jm , can be estimated until the dynamic model
prediction reasonably approximates the measured speed response.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Simulation of models
1
PWM/PMDC drivetrain with open loop speed control (no-load)
2
Mobile robot with open loop speed-controlled drivetrain (no-slip)
3
Mobile robot with closed loop speed-controlled drivetrain (no-slip)
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Open loop PWM/PMDC drivetrain
Consider open loop speed variation of
the PWM-driven dc motor. In this
example, let mc = sin(2πfd t), where
fd is a fixed frequency. This will vary
the motor speed to ± maximum
values. The following parameter set is
for the Tetrix pmdc motor:
Tetrix PMDC motor data
GR = 20; % measured directly
vr = 12; % motor rated voltage
is = 4.55; % stall current, A (from specs)
rm = 0.036; % measured, Nm/A; motor side
Rm = vr/is; % ; close to measured
Ts = rm*vr/Rm; % stall torque, Nm
Bm = 6.4e-5; % estimated from measurements
vbo = 12; % battery voltage, open
Rb = 0.0; % not used
Jm = 0.5*1.34e-5; % guess, 1/2 RE040
BL = 0.0; % no load case
ME 379M/397 Cyber Vehicle Systems (Longoria)
Model function file
function [xdot y] = pwmdrive_1(t,x)
global vbo Rb rm Lm Rm
global GR Bm Jm BL
global fd
% neglecting inductance in PMDC motor
% assume perfect battery
vb = vbo;% - Rb*ib;
mc = sin(2*pi*fd*t); % open loop speed variation
vin = mc*vb;
omegam = x;
im = (vin-rm*omegam)/Rm;
ib = mc*im;
Tmo = rm*im - Bm*omegam;
% this has a load torque referred to motor side of GR
wmdot = (Tmo - (BL/GR^2)*omegam)/Jm;
xdot = [wmdot];
y(1) = mc;
y(2) = vin;
y(3) = im;
y(4) = vb;
y(5) = Tmo;
Outline
Modeling the drivetrain
Simulation
Robot with slip
Open loop PWM/PMDC drivetrain (cont.)
With the sinusoidally varying mc , the
drive voltage varies over full range of
± 12 volts. This is a no-load case, so
motor speed varies to peak value of
about 15 rad/s as expected.
Note that the load power is zero and
the torque power is small, as it
overcomes internal losses. Most of the
batter power is to drive those losses.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Summary
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
DaNI with open loop speed-controlled drivetrain (no-slip)
To model the drivetrain coupled to
wheel/vehicle assuming no slip at
ground, just increase the inertia and
add appropriate ‘road loads’ as a load
torque. Only changes to the previous
parameter set are shown below.
Vehicle load data
BL = 0.1; % simple linear road load
% model as torque-driven wheel, no slip
rw = 2/39.37; % wheel
Jw = 0.5*0.05*rw^2; % estimate wheel inertia
mv = 3.6/2; % 1/2 total vehicle mass
% add inertia of wheel, translation
Jm = Jm + Jw/GR^2 + mv*rw^2/GR^2;
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
DaNI with closed loop speed-controlled drivetrain (no-slip)
We will later show how to close the
loop. This case adds a simple PID
loop on the motor to control speed.
Specify the peak speed, and for
demonstration let command dictate a
sinusoidal speed with that peak.
PID control parameters
% specify peak of forward velocity
wmax = 15.9; % rad/s (max at no load)
% specify peak forward speed command
vdm = 0.75*rw*wmax % 75 percent
% control gains
Kp = 0.02
Ki = 0.0075
Kd = 0.002
taud = .5; % for D control
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Model of robot drivetrain with wheel slip
The model of the drivetrain can now be adapted to study conditions when there
is slip between the running gear and the terrain. Now there are up to three
dynamic states to account for: motor current (or flux linkage), motor/wheel
speed, and vehicle forward speed. A bond graph for this case is shown below.
NOTE: ideal source for the battery, Jef f combines drivetrain inertia (motor,
gears, shafts, wheel, etc.).
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Robot performance model with drivetrain
The dynamic equations for the drivetrain are the same as before but now it is
necessary to track vehicle forward speed through,
v̇x = (Fx − FL )/m
where as seen before we need model equations for the traction and road loads, Fx
and FL , respectively. Recall from discussions on performance that the traction
force depends on both vehicle forward speed as well as wheel speed, and an
appropriate model for the friction (or adhesion) coefficient, µ, as a function of slip
must be adopted. Road loads also depend on vehicle velocity, among other
factors.
This model can now be used to study cruise, traction, and braking control of a
mobile robot under more realistic conditions. The details will be dealt with in
homework problems.
ME 379M/397 Cyber Vehicle Systems (Longoria)
Outline
Modeling the drivetrain
Simulation
Robot with slip
Summary
Summary
These notes describe modeling and control of a basic mobile robot
drivetrain.
Details on how to parameterize the models from manufacturer’s
specifications and/or from experimental testing are provided.
Simulation code examples and results are presented to demonstrate how
these models can be used for drivetrain evaluation, component selection,
and for feedback control studies.
Comparison to practical implementation on hardware will be discussed in
another set of notes and studied in the lab.
ME 379M/397 Cyber Vehicle Systems (Longoria)