Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Controling Position and Velocity of trolley

Hey,
 
I am working on an application for a engineering design project that requires me to control the position and velocity of a trolley on a linear track.
 
I have done some work in LabWindows before controlling the speed and position of a linear movement but am having some troubles shifting my knowledge from a small application to what I am working on now. This is what my plan is; I currently have a motor (DC 24V 88A), String potentiometer to determine linear distance travelled (there was risk of slip and need of high precission), sufficiently sized power supply and BNC-2110 DAQ.
 
My plan (which I am looking for some feedback on ... no pun intended) is to use LabView to create a PWM (which has already been done) to control the speed of the motor via the counter turning on and off a power mosfet completing the Motor's circuit. By varying the time on and off I hope to control the speed. 
 
After this has been completed I hope to hook up my string potentiometer to the Trolley and see how it's position changes over time (i.e. determine the speed at which the trolley is moving at for a variety of different % time on and off). This will act as an open loop test, which I was hoping to then figure out a practical transfer function for the motion of the trolley and then somehow use the String Pot as a feedback sensor to complete the loop and create a PI controller. I am having a hard time wrapping my mind around how I am suppose to put the later bit into practice. It all sounds fine on paper but actually approaching an implementation of this idea is boggling my mind.
 
Any input or pointers would be greatly appreciated. Am I on the right track or am I looking at something completly wrong... being a student I guess I don't know exactly how things are done in practice in industry, just what is written in books so any help would greatly appreciated.
 
Thanks!
Mac
0 Kudos
Message 1 of 13
(4,647 Views)
Mac,

starting with an open loop system, determining the transfer function and designing the control algorithm is a reasonable approach albeit a little bit academic.
A more empiric approach is tuning the closed loop motion control system by means of test functions like white noise or a setpoint step. Here you can find some information about tuning a motion control system by analyzing the step response of the closed loop system (Please note, that this document refers to NI motion control boards, but the general approach of the tuning process is universal).

This brings me to something very essential. Stable control systems require a deterministic real-time environment. You haven't provided explicit information about the environment that you are intending to use, but it sounds like you are planning to use a Windows based system with LabVIEW. This is not recommended, as such a system can't guarantee stable control loop timing, which is at least as important as the right set of PID parameters.

So my recommendation here is to use either a motion control board which runs the control algorithm onboard or to run the application with the DAQ board under LabVIEW RealTime (could run on a PXI-system or on desktop PCs that meet certain requirements). If you are going for the second approach, you may also consider using the NI SoftMotion Development Module.
If there is any kind of campus license of NI-Software available at your university, all the required software components should be already available for you.

Last but not least here are some considerations about the power circuitry. You have suggested to use a PWM signal that controls a single mosfet. This approach is not feasible in most applications, as it doesn't allow you to control the position and the speed of the motor accurately. To do this, you need to be able to drive the motor in both directions. You could do this by using an H-bridge circuitry, but this requires some more considerations when designing the control algorithm. In fact in most cases you would work with two cascaded control loops. The inner control loop is the current control loop, that generates the signals for the H-bridge, while the outer control loop is the position/velocity control loop.
Depending on the focus of your project, you may also consider using a commercial motion drive that provides the power circuitry and the current control loop. Those devices typically provide a +/- 10 V input for an external control signal that is provided by the outer control loop.

I hope this information provides some ideas to getting started.

Kind regards,

Jochen Klier
National Instruments



0 Kudos
Message 2 of 13
(4,637 Views)
Thank you, very much for your ideas. They are definitely going to point me in the right direction.

As a bit more information I can add about the project. Right now the project is more of a "proof of concept" prototype project. It is for a company external to my campus (so the campus licensing isn't accessible, so I will see what is included with the licensing we are using) and they are using this project as a concept for a larger system. Right now I am only in need of providing motion in one direction (other wise an H-bridge would definitely be in order).

Your thoughts of appropriate software is what I would like to discuss a bit more. Seeing as I have very knowledge with real-time programming, would I be able to pick this software up fairly quick or is it a big step? Will this software likely come with a business based licensing?

I intend to do more research on the ideas you have given me and see where they take me.

Your response has been very helpful and I look forward to hearing from you again,

Mac

Message Edited by MacMosher on 06-25-2008 08:28 PM
0 Kudos
Message 3 of 13
(4,620 Views)
Oh, and just to add to what I had said. In order to account for the fact that I will only be using the motor in one direction, my plan was to have an over damped system.
0 Kudos
Message 4 of 13
(4,611 Views)
Hey Mac,

LabVIEW Real-Time is honestly very easy to learn (basically as easy as LabVIEW programming).  Some businesses may have the LabVIEW Real-Time Module and some may not, it just depends on their software package.

That being said, using a motion control board, as Jochen suggested, is most likely the easiest method to program.  You can both program the motion control on a Windows PC, and have a real-time control algorithm running on the board.
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 5 of 13
(4,586 Views)
I have found a copy of LV Real Time 7.1, but I don't know if I will be able to get access to a motion control board with the budget I am on and time constraints of ordering a new DAQ. Right now all I have access to are:

PCI 4452
PCI 6110
PCI 6602

None of which can run Softmotion on them, do I have any other choices for controllers that would suit these devices... As I am a student I don't exactly get a lot of funding unfortunately. I think the goal of this project will be to do the best possible with what I am given. Because it is proof of concept I may be able to get away with attempting to writing some of my own controller concepts (very basic... if this is even remotely feasible?) I have done a basic one in LabWindows, to be honest it didn't work all that well but it demonstrates knowledge of the application... i.e. autocontrols, CLTF's, and a controller. I could run this with the Real time LV and it will at demonstrate control, and then just say if this was put past a "proof of concept" and into practice a motion control board would be necessary.

On a different note, I was told that there might be some risk of using PWM on an application such as this where the load will be varying depending on what is attached to the trolley. I am currently trying to figure out why there would be any sort of problem... I mean I know the motor will have non-linear characteristics but I don't think that they would have that much of an effect would they?

Thanks again, you are a great help both for this project and how I will look at projects in the future.

Mac
0 Kudos
Message 6 of 13
(4,580 Views)
 
Because I am using such a large motor the current will be pretty high and using the PWM at a reasonable rate that the DAQ counter can put out, I think I will be running into troubles of producing Radio Frequency Interference (RFI). I am unable to create a proper shield for the system and I don't know how effective filtering will be (unless there is a filter that is within my very limited budget and can get in within my time constraint).
 
As such I am looking into using a linear voltage regulator (less effiecint but possibly more practical?) with the DAQ controling a voltage line as a reference for the regulator (I will need a multiplier in the circuit because the DAQ can't produce suffice voltage for the application) and have  a feedback to ensure the voltage is being met. Has anyone done this before? Is it worth my while to make one myself or just get one from a manufacturer.
 
Thanks again,
Mac
 
0 Kudos
Message 7 of 13
(4,564 Views)
Hi Mac,

PWM is widely used in the industry to control DC motors. Of course noise is an issue, but commercial products keep the emissions below the legal limits. Controlling a servo with a DC signal doesn't make things easier, as you will see non-linearities in the system's behavior (e. g. a deadzone around the zero-point of the output voltage).

Just some general "heretic" thoughts:
The equipment that you are going to use seems to be less than ideal for your task and the solution that you are going to develop will be probably not very satisfying. So the questions are what will you learn from that and how expensive is failure?

Sorry for these harsh words, but I have seen many of these situations before - all with similar outcome...

Regards,

Jochen




0 Kudos
Message 8 of 13
(4,543 Views)
Hi Jochen,

No worries about your words being "harsh," I intend to take it in a constructive manner.

I have spoken with my client and have informed them what the cost of a properly controlled system would be and to see if we are able to change up some of the goals of the project such that it is feasible. The project has become much simpler and will allow me to use just open loop structures.

New goal:
-Velocity can be set (based on open loop tests) and actual velocity read out (which can differ just have to be within the same ballpark)
-Potion to be read out to millimetric precision (which can be done with the CET)
-Creating stops so it recognizes where the ends of the tank are such that it won't collide with it (which can be done with the CET)

All of this can just be done with open loop I think... making it much simpler to do.

The non-linearities that you have mentioned I would see regardless whether I am using a PWM or a servo with a DC signal, would I not? If thats the case, would either one of those options more favorable then the other? I am assuming the PWM from the comment "PWM is widely used in the industry to control DC motors" and as such I will be looking at commercial products to keep the emissions below legal limits.

Thanks again,

Mac
0 Kudos
Message 9 of 13
(4,534 Views)
Hi Mac,

this sounds like a more feasible approach.
The main reason for using PWM is the fact that typically a motor doesn't move at all if the power provided by a drive is below a certain threshold. Especially in  a closed loop system such a behavior is critical as it introduces dead time to the control loop, which is hard to handle. A PWM power signal helps to overcome this issue. In your system this issue could be less critical, as you don't need to invert the direction of the motors (I still feel a bit uncertain about that point. Running the motors in only one direction means, that you can't stop the motors in a controlled way, too.).

Some more questions:
  1. Could you please help me with the term CET? What does it mean?
  2. What are "stops"? Are these limit switches? How fast do you need to react on these?
  3. Are you going to use a real-time system now?
Regards,

Jochen
0 Kudos
Message 10 of 13
(4,528 Views)