12-13-2009 02:15 AM
12-13-2009 06:41 PM
Are you sure you have vibrations in your speed signal?
I see some variations in both the command voltage and in the speed pickup. Could it be due to electrical noise?
You said the speed is calculated by taking the derivative of the shaft angle. Could you be getting quantization error in the measurement of the shaft angle? Could the time between readings be varying? How fast is your loop running? Perhaps if you show some LV code as well as your flowchart, we can see if anything about your LV program and control loop is contributing to the problem?
12-14-2009 12:49 AM
Hi,
Thanks for the suggestions..
I am not sure if its electrical noise, but shouldnt the speed signal be smooth and not wavering? and because of it i cant really distinguish the transient vibrations from the steady state.
I am attaching a better flowchart this time , i cant put the LV program here coz its too big and i cant fit it in paint..!!
Is there any way to minimise the electrical noise or quantisation error?
The shaft angle is measured by an angular encoder attached to it and data transfered through DAQ.
I have used DAQs ( two BNC2120) for the entire data communication between the program , function generator and experimental set up.I have configured all the DAQ assistants i have used at '1 sample on demand' acquisition rate. and flat sequence for sequencing the program..
I am attaching the speed calculation part of the program also in here..
thanks again..
ruser.
12-14-2009 02:24 AM
ruser wrote:
Hi, I am trying to do real time control of DC motor speed using PID controller. I have selected a suitable PID gains after developing a mathematical model for the motor (with load) system and tuning its step response. [...]
I underlined some text in the quote. Does your model have parameters for effects like:
- Non-linearities like torsion of the shaft
- Time delays in sampling (In and Out)
- ...
So i assume that the model itself could be quite good, but not the exact representation of the actual control circuit. So the PID parameters you tuned on the model are in general ok for the setup, but not the optimum.
You did not tell us what hardware you are using to control the motor. Please give us this information (BNC 2120 is a terminal block, no DAQ device!).
Furthemore, are you using LV real time and a real time system or do you use Windows?
The questions mainly target on your system setup (controller side). There are dedicated motion control devices available, but it seems to me that you do not use those. Why not?
Norbert
12-14-2009 02:40 AM
Hi,
I went through the manual... i simply had the wrong notion abt BNC 2120!!..thanks for the info..
ok.. the hardware i am using are a function generator, two BNC 2120, and the power amplifier connected to the motor.. all the programming iam doing is with labview..
iam trying to do some research on controlling the motor speed with different controllers..but the speed data is fluctuating..
i found some literature which uses a butterworth filter in the feedback loop..ie angle speed is passed through one before subtracting it from the command speed..my program currently gives me around one sample in a second i think..or is there any way to see what the sampling frequency is ?
because i use 1 sample on demand everywhere .. how do i figure it out?
ruser
12-14-2009 03:02 AM
So i take it that you running in Windows.
Update time depends on your control algorithm. Untimed, you have 100% CPU load (at least on one core) and get the fastest possible control loop with the system. If you time the control loop, the smallest time slice is 1ms.
Regardless of timed or untimed control loop, you do not have any determinism. So one cycle of your control loop could easily take 200% of the time the previous cylce did and the next is maybe 90% of it.....
This is my primary assumption why you have variations in your controlling signal. If the control value is not updated properly, you have situations where the control circuit reacts.... unpredictable.
Traditional control circuits work "by sample"; so you acquire a single sample, compute a new output value, pass that one out, sample new "current value", compute new "target value", .....
Filtering mainly is used to prevent noise from high(er) frequent signals. The filter has to match the control loop timing, so you cannot simply insert "any filter you like".
Getting your "sampling frequency" can be done like this: Simply benchmark your control loop and this is your sampling frequency. This assumes that you are working on single values (acquisition and output) as you stated.
Norbert
12-14-2009 03:20 AM
Hi,
i think my situation is exactly as you said..
and my control circuit is .. unpredictable..
is there any way i can get over this and sort things out? so that i dont get these "variations" in the output signal??
it would be great if you can also explain whats 'benchmarking the control loop'...
thanks a lot..
ruser.
12-14-2009
03:30 AM
- last edited on
04-06-2025
07:50 PM
by
Content Cleaner
ruser,
the best you can do to prevent such jitter is to use dedicated hardware for motion control. Please note that this hardware does not necessarily supply a motion power amplifier.
Another option would be using FPGA devices for the PID algorithm.
Third option to reduce jitter is using a real time system (e.g. LV Real Time).
If you stick to the Windows system, you have to live with unpredictable jitter leading to strange behavior of the motion system. If the requirements allow this, the Windows system is sufficent and a switch to another hardware is not necessary.
To answer your question regarding benchmark, please see this document. I think the screenshot of the LV code is the most interesting part for you.
Norbert
12-14-2009 03:35 AM
Nobert,
Thanks for your prompt reply..
i shall go through the options you suggested , and the document..
inshaAllah i will get back to u as soon as i decide on the options..
thanks again,..
ruser.