Go Down

Topic: Arduino PID Library (Read 59 times) previous topic - next topic

br3ttb

Quote
how would one best invoke a reverse action control function, as required in industrial controllers for working with fail open and fail close control valves?

change the sign of the P_Param.  (I know you know what this means Lefty, but for the benefit of others reading...)

if your P_Param is 3.2 say, and the controller seems to be going in the wrong direction,( i.e. opening when it should be closing,)  you would want to change that to a -3.2.

usually it is really obvious that this needs to be changed.  the output starts to go the wrong way, which makes your input get farther from setpoint, which makes your output go FARTHER in the wrong direction.  the cycle continues until your output is pegged at one of the limits.

I was teaching a class on pid and asked "what happens if you set this wrong?"  expecting the answer above.  the answer I got was much better:  "you get a nickname"

Brett  

Flotec

I have plans to design an autopilot for my boat and have read this post with great interest. Before starting I should want to ask you two questions that has puzzled me:
- I have seen that some boat autopilots does not need a rudder feed-back. I suppose that all PID regulators do need some sort of feed-back. Do you have any idea how they can do this?
- Some autopilot claims that they are adaptive. They can learn the characteristics of the boat. I know you cannot give us an adaptive controller, you told us that,  but can you hint to me how this is done. Is it still a PID regulator that is used with some other program tuning the parameters or do they use some other type of controller?

retrolefty

"I have plans to design an autopilot for my boat and have read this post with great interest. Before starting I should want to ask you two questions that has puzzled me:
- I have seen that some boat autopilots does not need a rudder feed-back. I suppose that all PID regulators do need some sort of feed-back. Do you have any idea how they can do this?
- Some autopilot claims that they are adaptive. They can learn the characteristics of the boat. I know you cannot give us an adaptive controller, you told us that,  but can you hint to me how this is done. Is it still a PID regulator that is used with some other program tuning the parameters or do they use some other type of controller? "

Well all closed loop controllers need some kind of feedback measurement(s) to function, otherwise it is  'open loop' control, kind of like a steering wheel, where it's up to the human operator to know where the car is aimed at and make adjustments or not.

In the Classic PID controller the feedback is called the 'PV' for process variable. It is the actual measured temperature in a temperature controller, or the actual level measurement in a level controller. For you autopilot steering the feedback would either have to be something that can measure actual heading like a electronic compass or a GPS heading, etc. Measuring the actual rubber angle would work to a degree but wind and current variables could cause a change in heading regardless of the rudder angle. I'm not sure what the standard measurement used in for boat auto pilot controllers. Interesting applications and I would favor GPS but autopilots have been around longer then GPS so there must be other effective measurements.

Lefty



Flotec

An autopilot use heading information from a fluxgate compass so of course that will be used as a feed-back. However in my understanding of an autopilot it usually consists of two cascaded loops. The first one for heading and the other one for setting the rudder position. The first one use heading as feed-back and the last one a "rudder feed-back unit". Some autopilot manufacturer has taken away the need fro that last unit and I just wander how that can be done.

retrolefty

Quote
An autopilot use heading information from a fluxgate compass so of course that will be used as a feed-back. However in my understanding of an autopilot it usually consists of two cascaded loops. The first one for heading and the other one for setting the rudder position. The first one use heading as feed-back and the last one a "rudder feed-back unit". Some autopilot manufacturer has taken away the need fro that last unit and I just wander how that can be done.


Now I understand your question. Yes cascade control where the rubber has it's own PID control function allows one to optimize the controller tuning settings for the rudder controller and the heading controller independently such that the heading controller outputs a 'desired setpoint' to the rubber controller as it's PV measurement.

In such a configuration the rubber controller is said to be the slave controller and the heading controller the master controller.  It gives better controllability. However with more the powerful control possibilities with a microprocessor this can all be done inside the micro and could take advantage of feed-forward or adaptive or other 'smart' control algorithms. So I guess it's a trade off, saving the cost of the hardware needed to generate a rudder position measurement while still having good control behavior by compensating by using more advance software control features.

As a hardware guy, I would prefer having actual rubber feedback measurement in that it then is easy to add additional alarm functions if say the rubber linkage was to break and the actual rubber commands were not being performed.

Lefty

Go Up