Re: dc motor control for a balancing platform (segway)



On Aug 27, 4:59 am, Boniq <nils.christian.bonne...@xxxxxxxxx> wrote:
I have just bought an arduino microcontroller and as one of my first
projekts I would like to make a small self balancing platform like
segway (but tiny one). There is a dc motorcontroller add on to arduino
that lets me control two motors (a motor shield). It seems to me that
the only thing you can control with any of the shelf controllers is
motor speed.

If you can only control speed its not a servo controller. Drives
giving you the abillity to control both speed and torque by giving of
a setpoint of either are quite common in industrial applications.
Traditional DC motors offer this abillity intrinsically.

But if the platfor is a bit out of balance a would like
to stter the motor torque to get it back in balance. Not the speed.
The speed would naturally follow. Does that make sense? But how do you
control the torque output of (any) dc (brushless?) motor??  Or am I
way of here...

Boniq

The term "DC brushless motor" is a misnomer. They are in fact AC
motors controlled via a variable frequency exciting the stator. The
term is a marketing term designed to empahsise the lack of maintenance
and performance equal to that of so called DC servos. The rotor is
usually either a permanent magnet or a classic squirel cage induction
motor for larger types.

They are really servo motors, the term servo is subjective but
emphasizes that the motor is suitable for control of not only speed
but rapid precise control of torque so that acceleration, speed and
position can be controlled precisely and quickly.

If you have some angle measurement device, eg a encoder or resolver
mounted on the permanent magnet rotor shaft that is aligned with its
magnetic axis it possible to calcuate PWM (Pulse width modulation)
derived set of sine waves in the three phses of a controller to
produce a current in the stator of frequency equal to the rotation of
the rotor but whose physical magnetic field is 90 degrees ahead of the
magnetic axis of the rotor. The torque produced will then be
proportional to the current. Today the parameters for the motor
model required to calulate this angle is automatically tested and
calculated via encoder angles and stator currents and an auto tune (ie
measure rotor motor parameters as resentence and L with a DC decay
test and maybe no load test) but when Felix Baschke of Siemens did it
in the 1950s he used magnetic field sensors in the windings. (He only
had analog computers)

Don't worory about the very complicated calculations, they are taken
care of for you. A servo motor with its appropriate servo controller
will give you at least two analog inputs as setpoints for you speed
and torque. One will be a setpoint signal for speed (typcally 0-10
volt signal or rather -10 to +10v) that is proportional to desired
speed (eg for a 1500rpm motor 10v = 1500 rpm, 5v = 750rpm, 1v =
150rpm, - 5v = -750rpm)) the other 'setpoint inpput will give you say
a -10 to +10V input for the torque of the motor.

Technically the torque loop works as a torque limiter. IE if you
demand 750rpm of the motor but and allow it only 10% of its rated
torque/current to avoid breaking a reel of cable you are winding this
may mean that the motor never achieves 750 rpm due to the friction and
back tension being to great. You will know this as the drive
controller will give you actual speed and torque as feeback. This
also works the other way around, if you allow a motor 100% of its
torque but limit the speed to say 1% the speed loop will reduce torque
so this speed is not exceded.

Basic servos allow you to control only speed and torque and usually
set a ramp rate limit through another analog input (eg from 0 speed to
1500 rpm in 3 seconds, no more). So 3 analog inputs are typical
though I must add the real industrial stuff tends to use field buses
such as profibus, CAN-open and lately industrialised ethernet with
special real time switches and routers (profinet)

Most modern sophisticated units also allow you to count pulse from the
resolver/encorder (after zeroing on a limit switch say) and therefore
control position as well and will allow you to tabulate 'cam profiles'
in a sort of look up table so that you can produce say a 'flying
shears' to slice carboard or sheet steel moving on a conveyor say or
push something of. Of course you can do this with a higher controller
as well. You won't need that for the 'segway' thoiugh.

DC motors are much easier to understand and from your point of view
will work the same way: you can control speed, torque and limit
acceleration. In a DC motor a magnetic field is produced in the
'stator' by either a permanent magnet or a field winding with a
current. The rotor (also called the armature) windings are
alternatly switched in and out of circuit by a rotating swich called a
commutator. This is made up of copper segments on which ride graphite
brushes. The switching is arranged to ensure that the magnetic field
of the rotor(also called armature) is 90 degrees ahead of that of the
magnetic field from the field winding/permanent magnet. Torque is
entirely proportional to the armature current due to this. Back emf
is entirely proportional to armature speed.

DC motor controllers have an inner PID loop to control current and
therfore torque and an outer PID loop to control speed by controlling
the current loop. You can 'limit' the maximum current demand and
therfore torque demand by claming limits (via software or comparators)
to the analog loop.

One subtley of DC motors is the 'compensating winding': this is a
winding around the stator through which the armature current passes
before going to the armature. It is set up in opposition to the
armature mmf so that as the armature mmf interacts with the stator mmf
and distorts the overall torque mmf from the 90 degree optimal.


A servo motor using induction motor is basically usally what is called
a 'flux vector drive'. In this an algorithm based on a motor model
tries to induce a mmf magnetic field in the rotor that is 90 degrees
out of phase of that in the stator. This is quite difficult as the
reactance of the motor varies not only with rotor rpm and excitation
but also acceleration. The algoritm is often based on the clark park
transformation and tries to reduce a two phase equivalent cicuit model
where one phase (the direct current or magnetising current) represents
the current through the non moving parts of the motor and the
quadrature or torque producing current is that at producing a magnetic
field 90 degrees ahead of the stator.

I would say it would be a little more difficult to produce a segway
without motor torque control.
.



Relevant Pages

  • Re: More fun with a 6522
    ... simultaneity in communication and motion control. ... actually going for a networked, intelligent, high-power servo motor and controller. ... First is to come up with a suitable configuration then characterize how many phases/poles are needed to get sufficient low end torque. ... With width control resolution of 1 cycle, ...
    (comp.sys.apple2.programmer)
  • Re: Controllable torque electric motor questions
    ... I further suggested that a DC motor might be a good choice, high torque at low RPM. ... The amount of power involved is not a great deal, since rapid operation is not important, and a lot of gear reduction makes sense. ... It is not clear how precise the torque control needs to be, probably +/- 10% would be more than adequate, given that we are automating something that has been done by hand by a craftsman. ...
    (rec.crafts.metalworking)
  • Re: Two-speed motors with inverters (again)
    ... distinct motor maps, and you could just select which map ... The basic Siemens instructions seem wonderfully vague, ... have has no control panel & basic operation is possible using the ... Can be used for variable and constant torque applications, ...
    (uk.rec.models.engineering)
  • Re: Two-speed motors with inverters (again)
    ... distinct motor maps, and you could just select which map ... The basic Siemens instructions seem wonderfully vague, ... have has no control panel & basic operation is possible using the ... Can be used for variable and constant torque applications, ...
    (uk.rec.models.engineering)
  • Re: Magnets
    ... The torque from a permanent magnet motor is a function of the magnetic ... field strength and the current in the windings. ...
    (rec.models.railroad)