Two sources of reference value for PID controller

Steven01

Member
Join Date
Oct 2015
Location
Prague
Posts
25
Hello,

I have been solving following problem. I have one speed controller and two sources of the desired speed. One source
is the CAN bus and the second one is an analog input. I need algorithm for bumpless transfer between them. For example at the CAN bus is 1000 rpm and at the analog input is 500 rpm. The speed controller uses CAN bus value and suddenly the communication fails and I should use the value at the analog input. The problem is that there is a different desired speed. If I blindly use this value, I produce sudden disturbance and it is obviously wrong. I have tried to solve this with the FSM in the attachment but I am not sure if it is applicable. Please can anybody give me his meaning about my suggestion? Thanks a lot for any ideas.

FSM.jpg
 
This is easy.
speed=f*speed0+(1-f)*speed1
f is a fraction between 0 and 1
If speed0 input fails keep the last speed 0 and ramp f to 0. If speed 1 fails keep the last value for speed 1 and ramp f to 1.

May be simple but nicely done. Goes in my bag of tricks
 
Mostly I have a bag of tricks that I have accumulated over a lot of time.
I have come across problems like that before.
What I provided assumes that f ramps linearly between 0 and 1. f(t)=t/RampTime but a motor may not like the sudden acceleration. I have formulas for ramping f(t) as 3rd order and 5th order ramps so the velocities and accelerations are smooth.
f(t)=(-2*(t/RampTime)+3)*(t/RampTime)^2
for 3rd order ramps. There have been threads on this before.
 

Similar Topics

im new at Allen bradley rslogix programming; i have something to ask you guys , and i will be happy to get answers so thank you in advance. when...
Replies
1
Views
602
Using TIA Portal v17, SIMATIC S7-1500 PLC. I am trying to write an alarm that will trigger for multiple sources, and output the triggering...
Replies
6
Views
2,550
I am working on a project using AB PLCs and PanelView HMIs. There is a desire to allow control loop setpoints to be provided through the HMI or...
Replies
11
Views
3,729
Does anybody have links to serial ascii resources? (specifically, for AB Logix 5000) Never used it before and it's in a project I'm jumping into...
Replies
5
Views
3,217
Is there any issue introducing wires from a different power supply to my enclosure? Currently, I have an HMI that will be powered by one...
Replies
6
Views
1,777
Back
Top Bottom