Wednesday, December 9, 2009

DC Motor Control the Control Method

When it comes to motor control, a lot can be discussed. There are a lot of type of motor. The o'famous dc brushed motor, brushless motor, stepper motor, induction motor, ac phase motor et cetera. The cheapest of all motor with high torque would be a power window motor used to raise window in automobile.

Motor control is an interesting subject to discussed because of the characteristic of a motor.

As shown in the picture above, is a motor transfer function. From the function, we can see that the motor contains a integrator element. Of course you need to take basic in control system engineering to understand this.

Why the motor is called an integrator. Because it integrates. It takes the value of voltage applied and outputs position. Because there is no spring in a motor, the position will stay static after the voltage is removed.

There is two issue that concerns a dc brush motor. The speed and torque. Voltage will control the speed and current will control the torque. When an amount of voltage is applied to the motor, it will draw current to reach the value of speed corresponding to the value of voltage.

Of course this don't sounds that easy. There are at least three non-linearity in a dc brushed motor. A dead zone, saturation, and back lash. Dead zone means motor cannot handle too low a voltage. For example if one volt means one revolution per minute, it does not mean one tenth of volts produce one tenth of revolution per minute. Probably the motor won't even move!

Saturation deals with the maximum voltage the motor can handle. Probable the motor can handle a maximum of 100 volts and 110 volts still produce the angular speed as the 100 volts gives. Sometimes too the power that drives the motor cannot reach the value that are required. For example an operational amplifier driven motor can only produce a voltage of the op amp's saturation voltage.

Back lash is when the gear in the dc motor do not contacts well. This will affects the operation of dc motor in two direction. All this three (or more) non linearity makes a motor hard to control. But it is not an impossible thing to do.

With a proper control system, one may turn a useless power window motor into a super productive motor. This is a great advantage for those who are not be able to purchase an expensive motor or an expensive motor control module.

Some user that do not know about control might use a lot of money to purchase an expensive motor or motor control module. There are several reasons. One of them is the tedious method in constructing a proper control system. One might need to do a lot of experiment just to find a motor transfer function. Like the equation above, the K and a value are not easy to come by.

Another is the elements needed to construct a control system, analog or digital. A simple PID using operational amplifier need at least seven operational amlifiers while for digital control, it takes a lot of memory and program counter.

Third, one might not have the knowledge to apply a control system. The maths in control system engineering is not an easy subject. Especially the La Place Transform, Z-Transform, and such. The hard part is to realize the actual controller.

I have come up with a motor control using the blocks shown in the diagram above. I will input the desired position and the position value will be feed into a fuzzy controller and lastly the fuzzy output will be feed into a speed control. Of course the diagram just a simple representation of my system. The actual system is complex with feed backs and synchronizing elements.

The application? To drive a differential drive robot. I am able to tune the gains to produce several types of movement including straight, curves, turns, rotates and reverse. Of course this still do not solve the non-linearity of a dc motor.

Result? I would say the control system is hard to tune and takes up a lot of space in my microcontroller. And the robot is still laggy with minor error which accumulates at the end to form large error.

But what the heck, I do not need to burn my wallet for a motor control module.

No comments: