modeling and control of a dc servo motorbisonacademy.com/ece761/lectures/11 servo motors.pdf ·...
TRANSCRIPT
Modeling and Control of a DC Servo Motor
http://www.pittman-motors.com/Brush-DC-Motors.aspx
In order to drive a robot arm, you need a motor. There are several types:
Stepper Motors: Motors with a digital input, allowing you to control the position of the motor with aresolution of 0.9 degrees typically. Stepper motors are easy to control (you specify the number of steps themotor turns at 0.9 degrees per step). However, they are very inefficient and have a limited holding torque.
Brushless DC Motors (AC Synchronous Motors): Like a stepper motor but with a 3-phase AC input. Here,speed is frequency and torque is phase lead angle. Harder to control but smaller and more efficient thanbrush-type DC motors. Typical motor used in quadcopters due to their power vs. weight ration.
Brush DC Motor: Common motor used in RC cars. Speed is determined by voltage and torque by current.
Here, we will focus on brush-type DC motors to control a robotic arm.
Brush-Type DC Motor Modeling:
A brush-type DC motor consists of a rotor and a stator.
Inner Workings of a DC Servo Motor (http://www.zgcmotor.com)
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 1 rev March 15, 2016
The rotor is the part that spins. It consists of a shaft which contains electromagnets. To provide electricalconnection to the outside world, carbon brushes are often used. These rub against the commutator, whichswitches different portions of the stator coils in and out.
Without the commutator, the voltage produced when the motors is spun will be sinusoidal. (From duality, motorsand generators are the same thing. When you apply torque to a motor, it acts as a generator, convertingmechanical power to electrical power. When you apply current to a motor, it acts the other way, convertingelectrical power to mechanical power.) Likewise, you need a sinusoidal voltage to drive a motor without acommutator (termed an AC synchronous motor or (inaccurately) a brushless DC motor.) With the commutator,the polarity is switched, resulting in a voltage with a DC offset.
Brushless Motor Brush-Type DC Motor
Without a commutator (brushless motor), the voltage produced by a motor is sinusoidal. With a commutator (brush-type motor), different coilsare turned on and off, resulting in an output voltage with less ripple and a DC offset.
To reduce the ripple, several coils are often used, with only one energized at a given time. To further reduce theripple, the rotor is 'twisted' to even out the voltage (and torque when used as a motor).
Rotor of a DC Servo Motor showing multiple windings, twisted to reduce the ripple in the voltage (and torque) producedhttp://image.slidesharecdn.com/chapter4-dcmachineautosaved-140915220206-phpapp01/95/
Equations for a Brush-Type DC Motor (DC Servo Motor)
The equations that describe a DC servo motor are as follows:
Motors and generators are one and the same. If you spin a motor, you produce voltage proportional to the speedof the motor:
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 2 rev March 15, 2016
Back EMF = Kt KtdQ
dt
where Kt is a constant of the motor and Q is the motor angle. Similarly, if you apply current to a motor, youproduce torque
Torque = KtIa
where Ia is the armature current. Note that power out must equal power in
Pin Pout
VaIa T
Substituting:
Kt Ia KtIa
It isn't obvious, but the two constants are the same:
Kt Vrad/sec
NmA
The circuit model for a DC servo motor consists of an electrical side (an electromagnet) and a mechanical side(the motor).
The electrical side (the armature) has a resistance and inductance inherent with an electromagnet.
The mechanical side has inertia and friction, inherent with the rotor
The two are coupled by the torque constant, Kr:
+
-
Q
Js 2 Ds
KtIa
Kt*dQ/dt
LasRa
Va
Ia
Model for a DC Servo Motor
The equations of motion are then:
Va KtsQ Ra LasIa
KtIa Js2 DsQ
Solving gives
Q
1s
Kt
JsDLasRaKt2Va
if the output is angle (Q) or
dQ
dt
Kt
JsDLasRaKt2Va
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 3 rev March 15, 2016
if the output is speed.
Example: Determine the transfer function for a Pittman 14207 Motor operated at 76.4DC.
http://www.pittman-motors.com/Brush-DC-Motors.aspx
From the table:
Kt = 0.226 Nm/A
L = 8.93mH
J = 4.73E-5 kg m2
R = 5.78 Ohms
D = unknown
No-Load Speed = 3140 rpm @ 0.090 A
You can compute the resistance through a power balance
Pin 76.4V 90mA 6.88W
The electrical losses are
PR Ia2R 90mA2 5.78 46.8mW
The remaining losses must be the rotational losses
T 6.829W
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 4 rev March 15, 2016
The no-load speed is 3140 rpm (328.8 rad/sec)
The torque is
T 6.829W328.8rad/ sec
0.02077Nm
This then tells you the friction
T D
D T 63.17E 6 Nm
rad/sec
Plugging in numbers:
Kt
JsDLasRaKt2Va
535,050
s2648.6s121,790Va
The step response of a motor with no load is then
>> G = tf(535050, [1, 648.6, 121790]) Transfer function: 535050----------------------s^2 + 648.6 s + 121790
The 2% settling time is approximately 4 / the real part of the dominant pole >> Ts = 4 / 324
0.0123
Plot the step response for a 50V step out to 20ms
>> t = [0:0.001:1]' * 0.02;>> y = step(G,t);>> plot(t*1000,y * 50);>> xlabel('Time (ms)');>> ylabel('Speed (rad/sec)')
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 5 rev March 15, 2016
Step Response of a Pittman 14207 Motor with No Load and a 50V Step Input
Of course, from a robotics standpoint, what we care about is torque. If you make the input current, the torque isfrom
T KtIa
With a current source, you are specifying the torque directly (which is more useful from a control standpoint for arobotic arm).
Motors and Gears:
One problem with using a motor to drive a robotic arm is that motors are designed to spin whereas robots tend toremain at a certain spot. To couple a motor to a robot, a gear is often used.
Gear Reducer: http://motiontek.ca/gear_reducer.html
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 6 rev March 15, 2016
Gears reduce the speed of the shaft (or conversely, a slow speed at the output corresponds to a high speed at theinput - which is good since motors want to spin.) The relationship for a gear is
N11 N22
or
1
N2
N1
2
With a 12:1 gear reduction (N1 = 12, N2 = 1), the output shaft spins 12x slower than the input shaft.
Power has to balance, meaning
T11 T22
Substituting
T1
N1
N2
T2
With a 12:1 gear reduction, the output shaft has 12x higher torque than the input shaft. Gears act as torqueamplifiers.
One interesting feature of gears is they reduce the impedance's as seen by the motor. Using the analogy
V IR
2 T2Z2
then an impedance at the output of the gear (Z2) looks like
N1
N2
1
N2
N1
T1Z2
1 T1
N2
N1
2
Z2
The impedance as seen through a gear increase as the turn-ratio squared.
For a 12:1 gear reduction, the motor sees the outside world (the robot) as an impedance, reduced by a factor of144 (122). With a 300:1 gear reduction (not uncommon with robotics), the motor sees the outside world reducedby a factor of 90,000.
One way to make the coriolis and other forces negligible is to severely gear down the motor. This has the badside-effect of making the motor oblivious to the outside world, making things like touch difficult (upcominglecture).
Going the other way, with a 12:1 gear reduction, the motor's inertia gets amplifier by a factor of 144 (122). Thus,to model the inertial of the motor at each joint, a term of 0.0068 should be added to the diagonal of the M-matrix(which we added previously to avoid singularities in the M matrix). (slightly more if you add in the rotationalinertia of the gear itself - hence the 0.01 from before).
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 7 rev March 15, 2016
N2
N1
2
J 0.0068 kg; m2
The net result is the current applied to this motor is related to the torque as follows. The torque produced by themotor is:
Tm KtIa
The torque as seen by the robot with a 12:1 gear reduction is:
T1 12Tm
The current required at the motor is then
Ia Tm
Kt T1
12Kt 0.3678 T1
Ia 0.3678 T1
If you know the torque you want to apply at a given link, you also know the current.
If you use a current amplifier, you really don't care about the motor dynamics that much. All you really careabout is current (and hence torque).
Feedback Control of a DC Motor
The transfer function for a DC motor with a current input is
Gs Ia
Kt
Js2Ds Ia
To control the angle, you can use a feedback control law
Ref QIaK(s) G(s)
MotorCompensator
where G(s) is the transfer function of the motor and K(s) is a compensator to be designed. Since this motor is tobe attached to a robot with inertia of 1kg m2 (approximately), the motor dynamics on the motor-side of the gearare:
J 4.73 105 1
144 0.00699 kg m2
D 63.17 106 Nmrad/s
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 8 rev March 15, 2016
giving
32.33
s20.009s Ia
32.33
s2 Ia
If you let K(s) be a constant, k, then the closed-loop system will be
GKE
E R
GK1GK
R
or substituting in the transfer function for G(s)
32.33k
s232.33kR
This has roots on the jw axis, meaning the closed-loop system will not be stable.
Assume isntead that the control law is a PD compensator:
Ia w
D
PR Q
1/s32/s
Motor
Motor with PD Control
Ia PR DsThen
s2 32.33Ia
s2 32.33PR Ds
s2 32.33Ds 32.33P 32.33PR
32.33P
s232.33Ds32.33PR
With this control law, you can place the poles pretty much wherever you like. These poles then effect theresponse of the motor as
The real part of the pole tells you the 2% settling time as
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 9 rev March 15, 2016
t2% 4real(pole)
The overshoot for a step input comes from the angle of the pole
cos
OS exp
12
For 4% overshoot, the angle of the poles should be 45 degrees.
For a 2% settling time of 100ms and 4% overshoot,
The poles belong at -40 + j40
32.33P
s232.33Ds32.33P
32.33Ps40j40s40j40
32.33P
s280s3200
D = 2.474
P = 98.98
This has the following step response:
Closed-Loop Step Response of the DC Motor
Matlab Code:>> G = tf(3200, [1, 80, 3200]);>> t = [0:0.001:1]' * 0.2;>> y = step(G,t);>> plot(t*1000,y)>> xlabel('Time (ms)');>> ylabel('Angle (radians)');
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 10 rev March 15, 2016
Note that this is an error-driven feedback loop: the ouput will lag behind the set point (R) with the current drivingthe motor dictated by the error. This can be seen by looking at the frequency response of the transfer function:
3200
s280s3200Rm
The DC gain is one: the angle goes to the reference angle eventually
The high frequency gain is zero: the angle does not responsd imediately.
To speed up the transient, feedforward terms can be added:
Ia sQm
D
PRm Qm
1/s32/s
Motor
Ds
s2/32
feedforward terms
Feedback Control of a DC Motor with Feedforward Control
If you know the set point (R) and its derative and 2nd derativive, you can make the current
Ia PR Ds D R.
m 132.33R̈m
This results in the transfer funciton being
s280s3200
s280s3200Rm Rm
meaning you're tracking the reference angle of the motor (Rm) exactly. Assuming you know Rm and itsderivatives. Assuming the current commanded is possible.
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 11 rev March 15, 2016
Current Amplifiers
For robotics, you really want to operate a DC motor with a current source (since current is torque). One way todo this is to use an off-the-shelf amplifier such as a Advanced Motion Control ($40 on ebay, $500 retail)
Advanced Motion Control Brush-Type Servo Amplifier (www.ebay.com)
With this amplifier, you can operate it in
Voltage Mode (where the output voltage is proportional to the voltage input - making it look like a bighoggin op-amp capable of 80V and 30A, or
Current Mode (where the output current is proportional to the current input)
To set this, you need to connect the current monitor inputs (see the data manuals).
You can also turn a voltage-amplifier into a current amplfier with a resistor. Conceptually, the circuit looks likethe following:
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 12 rev March 15, 2016
0.1 Ohm
Vin
Motor
Vr
Vm
Using an op-amp as a current amplifier. Im = 10 Vin
The 0.1 Ohm resistor is a current sensor, which outputs 0.1V per amp. With negative feedback, the op-ampoutputs whatever voltage it takes to force V+ = V-. With the 0.1 Ohm current sensor, this controls the current tothe motor so that
Im 10Vin
The output of the Advanced Motion Control amplifier is actually a differential output (motor + and motor -outputs), resulting in a slightly different circuit to allow for a floating ground, but the idea is the same.
NDSU Modeling and Control of a DC Servo Motor ECE 761
JSG 13 rev March 15, 2016