Jump to content
Sign in to follow this  
Brija na max

M90-TA2-CAN feedback control loop (PID)

Recommended Posts

Hi to all!

 

I am new to unitronics and PID, serched on internet how pid works and i understood theory well, but..... :D

 

I've have idea to controll 3ph motor inverter with analog output from PLC (0-10V will be 0 to full rpm) and feedback to plc will be proxy sensor which will send impulses to HSI input of plc, and set value which will be entered to plc.

 

So far i am trying to use PID example from flow controll, but no mather what i put in as values or what input is (frequency) i do not get anything to analog output.....in short, my idea was this:

 

When motor is not running i should have max value on analog output, so 10V, when i start inverter set ramp will gonna try to rotatate motor to max, since i read impulses as frequency, when we reach impulses to be same as set point controller should start to lower analog output so to negative feedback start working and controll rotation in such way.....so basicly, on max rpm i will have something like 100Hz from proxy switch to plc, when motor is stopped i shoudl have 10V on analog output, and proportionaly while input frequency is rising up i should have lower analog output.......later i can do scaling values to fit my range.

 

To start now, what is best possibly way to do this, as i can see PID function? Since, i can have some +/- 1-3% offset from nominal i would like to start with P (proportional) function only, but do not know how to set PID to work as P only?

 

best regards,

Share this post


Link to post
Share on other sites

To set PID for P only you assign a value of 0 to the I and D variables.

 

 

Your wording makes it a bit harder to understand what you want to do though, to even know if PID is right.

 

1) What exactly is the motor driving?

2) Are you expecting load changes on the motor?

3) Will the motor run at constant speeds?

4) You want to use pulses per minute (or second) to specify the output voltage?

 

P only PID doesn't have scaling.  Your process control signal to the motor is either 100% on or 0% off outside of a defined range like +- 10% of target (There's other hacks you can use with P only but it's not ideal)  the ID portion allows for scaling based in the process values deviation from target.

 

-Chris

 

 

*edit*

 

Also, some motors have a form of PID built into the controller which could lead to two PID loops fighting each other for stability. 

 

Do you have the make and model of the motor and controller?

Share this post


Link to post
Share on other sites

Hi! Today i did some test and figured to get some results, but not on real condition, just sending square pulses from signal gen to PLC to see what happends when measured value reaches and goes over or lower than set value.....i see it is working, so i can set how fast will raspond etc.....

 

Anyway, motor will be running spool who is collecting rope, catch is that roope speed in meters per minute needs to be constant and is measured by small drum driven by rope only and with shaft encoder. So if i set speed to say 200m/min i can do calculation to know frequency which will need to be on encoder output to achive that speed, acordingly will make input for PID set value....thing is as spool getting bigger it will "pull" rope faster because of higher diameter, so that motor rpm needs to get lower to maintain rope speed constant.....just normal negative feedback in regulation, so the motor will probably need to run from some 20% up to 100% (depending on chosen speed before start) and regulation will be from max 100% to some 30% when spool is full......i do not need regulation to be exact, variations in some +/- 4-5% are ok.....

 

Will use small 0,5kW inverter and motor with encoder on shaft in weekend to try some tests......

 

I know inverters have build in PI or PID, but would like to do this on PLC as desired values needs to be entered on plc as well some other commands like start, stop, reverse will be controlled from PLC.

Share this post


Link to post
Share on other sites

I, personally, wouldn't use a full on PID algorithm for this.  I would go simple with a poor man's PID.

 

I would create a 5 second timer, longer or shorter as needed, that calculates current frequency from the encoder, then increment or decrement the voltage going to the controller if it falls outside a certain range.

Share this post


Link to post
Share on other sites

if I did understood corectly, you think to use PID function (or P only as i think it will be suficient) and to set timer to 5 sec, so to send error signal to inverter every 5 sex or so?

 

Also, besides PID, i was think to use something like this:

 

pout two loops, one would be increase, other decresase, depending of setvalue/measured value from encoder. So every say 1sec plc will calculate error between setvalue and measured and we will have on plc to inverter voltage proportional to it, i think pretty much similar to P only controller, but slower.

 

One more thing i concidering is choice of encoder, was think to use 100 pulse per rotation encoder, even now i have proxy switch on shaft which will gave me something like 100Hz when rpm is max and around 15Hz on min rpm....is this suficient, because it will be less resolution than with encoder which would provide some 1700Hz on max.......I do understand i do not need higher resolution, but just thinking are there any issues i will need to be taken care off?

 

Thanks!

Share this post


Link to post
Share on other sites

I did some test setup today, i have U90, inverter with 0-10V analog input and three phase motor which has max 1500rpm and proxy switch on shaft used as encoder, on max motor rpm 1500, i have 100Hz from "sensor" to PLC.

 

PID is now working ok, it is not so accurate because of low encoder resolution (only 4 pulses per rotation) but that is not issue, since even now stability is ok.

 

Thing that is problem to me is this: When i start inverter motor start to max rpm than after few secounds when probably pid starts working than it falls to set value and everaything is working fine, but i would like to work, if i set to 900rpm that motor spins up to 900 and holds like now.

 

I am useing PI only (Kd is 0) and tried parameters in numerous way, but this problem persist. Even i tried to send start signal from inverter, or to start it from plc, also tried acceleration and deceleration ramp on inverter but same.

Share this post


Link to post
Share on other sites

I think the solution to your problem is your startup sequence.  The PID *should* turn on automatically at start up and be functioning immediately. What I think is happening. The PID loop is outside the P band, so it's going to turn the motor on full until it gets within that band.

 

There's multiple ways to address the problem. 

 

 

1) For your stop sequence try storing the current control value to another integer.  Disable PID.  On start sequence set the output to the control value integer you stored for a few seconds, depending on how long it takes to get spinning, then enable PID. 

 

2) Increase the P band range from 5 or 10% to 25%, or 100%.  This allows the Integral portion to start calculating earlier, however, it can slow down the overall response.

 

3) Decrease the time between calculating your RPM and the PID response time.  This one might not be possible with your current setup or system to get stable results.

Share this post


Link to post
Share on other sites

Will try those, even while looking some things on examples under PID i did set it today to achieve very good control, probably need to play around mor with some values, but i am thinking to go on right direction. One thing more regarding encoder, ow i am having max 100Hz on HSC input, and while trying to set low rpm it works but it does not stabilizate soo good as on higher rpm, i can see that is due to fact, i do multiply frequency by 60 (so 6000 max) and then comparing that to setvalue .....it is abvious than minimum change is 60 when input goes +/-1Hz and that resolts in some 0,5Hz steps on inverter at end.....so i think using encoder with some 100P/R will get me around 2500Hz max and more "accurate" regulation?

Share this post


Link to post
Share on other sites

More accuracy is never a bad thing, unless it's cost prohibitive.

 

I forgot to say above, I would go with option 2, logically it's the easiest to implement.  I would probably set the P band to 100 percent for your application and see how the system responds.  If it still has issues on start up, I would consider option 1.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...