To boldly go where no one ( sane ) has gone before
zenocorp said:
hi, this is my first post in this forum.
i am a final year electrical student from one of the University in Malaysia.
Duh.
i currently have a project which involve running a DC motor using PLC.
A PLC will not output enough power except for the smallest DC motors.
the speed of the DC motor is control by LQR algorithm(linear quadratic regulator).
Why an LQR? Don't tell us it is the professor's stupid idea, ... again. Do you think you are the first student with a stupid professor problem? You can read that as a stupid problem or stupid professor. I don't care they both apply.
Give your self and us a break and get a DSP evaluation kit. They are cheap and much better for this kind of work. You need a matrix library and you will not find one on a PLC.
The problem is, how can i use the PLC to pograme my LQR controller?
With great difficulty without the matrix library. You are using the wrong tool. You should be doing this in Scilab or Matlab. I would give you an 'F' right at the start for using hammer to cut down a tree.
The fastest and cheapest way to do motor control is to buy an already made motion controller that fits or communicates with whatever PLC you are using. As a future engineer your job is to make optimal decisions and this is going to be one of them.
You are the first to ask about LQR.
Why would anybody use LQR for motion control?
What is your cost function? How are you going to find the values to stick in the arrays for your cost function?
How are you going to change speeds? By step or by gentle ramp?
How do you keep a LQR from overshooting position?
How many states do you think you will need?
Are you really going to calculate the feed back gains on a PLC? This is the part that is insane. ( For the PLC people, calculating the gains involves minimizing a cost function. This is done using the Ricatti equation which is a bad a$$ equation involving lots of matrices and inversions etc and we all know that PLCs can do that stuff easily
)
Now for the simple questions we get around here:
What is the size of the DC motor and load,
What is the control output to the DC motor?
How much power ( voltage, current)?
What kind of feed back are you using?