On PID control

2»

Comments

  • Great. So now your task is to heat a room. Clearly the room has a specific heat capacity. So what you say can be applied.

    But now, that room is going to be a venue for a party with 200 people crammed in. What is the specific heat capacity of the party goers? How much heat do the put into the room?

    Now the sun goes down. Heat is running out of the room faster than it comes in. What to do?

    One of the most effective heater controls is "bang-bang". Too cold, turn the heater on. Too hot, turn the heater off. Let thermal inertia take care of the details.
  • Heater, right! Due to heat conduction there normally is a time delay. Whatever strategy you select: PID is not appropriate ;-) But what about introducing natural intelligence? heater control by heater?
    no reason to reason if you feel feelings: in love with the propeller

    How-2-TACHYON
  • PID's are widely applied to heating and cooling systems, because the overall logic of Propritional, Integral, Derivative is not specific to any particular device or control problem. It applies to many types of systems (some better than others, true). As ErNa said the heat capacity is key : like mechanical interia, it makes sense to have as low a heat capacity as possible. In a building, that translates into having zone controls, one per room ideally. The way that PID device designers describe their tuning parameters is sometimes counter-intuitive ... it can be based on the cycle times as the controller gets around to measuring a zone's temperature in a finite, stepped loop. Omega Engineering has pagefulls of PID temperature controllers in their catalogs.

    http://www.omega.ca/prodinfo/temperaturecontrollers.html

  • Controlling temperature has to be considered on a case by case basis. What works for an incubator or oven in a controlled environment will not work well in an uncontrolled environment like the outdoors.

    Bang bang control is fine for a house or small building, but even there some rooms may be warmer or colder than the desired temperature.

    In a larger building bang bang is not enough. I spent three and a half years in Edmonton trying to get the heating systems in 12 buildings to keep the occupants comfortable with only limited success. There are a lot of factors that have to be taken into account. Ambient temperature range, building orientation, wind speeds and direction, insolation, insulation, window area, number of floors, occupancy load and load range, and air exchange rate are some of the factors.

    By comparison maintaining temperature in an incubator, reflow oven, or crock pot is simple.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • I believe there is consensus: PID is not the first choice for temperature control. One simple reason: in P the response is independent of error direction. In temp control heating and cooling normally is of different character. So I only have to guess, what the characteristics of the system are, what I don't like.
    If I understand correctly, a very simple arrangement like a two wheel bot, driven by a p-controller will oscillate and only friction will in the end bring this movement to zero. In the case of speed proportional friction the set position will be reached, but if there is a constant friction, the bot will likely stop in a distance from the set point.
    no reason to reason if you feel feelings: in love with the propeller

    How-2-TACHYON
  • PID is commonly used for temperature control, although maybe not so much in residential housing. The detailed interaction may be more complex than servos but it's still using tried and true PID principles. If you ever buy a general temperature controller then it will default to an autotuned PID based control loop.
    "We suspect that ALMA will allow us to observe this rare form of CO in many other discs.
    By doing that, we can more accurately measure their mass, and determine whether
    scientists have systematically been underestimating how much matter they contain."
  • Heater. wrote: »
    I get the idea.

    Problem is that many systems are not simple to model. And hence not simple to derive control strategies for.

    For example, as far as I'm told by people that study these things, it's not possible to balance a two wheel bot using a PID.

    Turns out that people do that, perhaps with some hack or other, anyway. Without getting deeply into the maths of the thing.
    Hanno Sander used cascading PIDs and fuzzy logic, in SPIN for his Dance-Bot. This is chapter 6 of "Programming And Customizing The Multicore Propeller Microcontroller".

    Heater. wrote: »
    I'm not sure where the stepper motors fit in here.
    That was me, stressing a point. One wouldn't design a temperature control system without feedback so why blindly throw a bunch of pulses at a motor and assume it reached the desired position.
    Heater. wrote: »
    Every situation is different. For example:

    1) You want to control the position of an object from left to right horizontally. OK, wrap a PID loop around it and see what you can do.

    2) But now we turn everything through 90 degrees so the position is up/down rather than left/right. Now you have a constant force of gravity acting on it. That means that in the stable, zero error, situation you have to be applying an upward force that exactly counters the force of gravity. Well, perhaps the PID can sort that out but it might be an obvious idea to just apply that upward force constantly thus giving the object "neutral buoyancy" as it were. Then let the PID work on that.

    3) But what if this system is sometimes horizontal and some times vertical and whatever in between? Perhaps it's an idea to measure the inclination and adjust that force required to achieve neutral buoyancy.
    Yes, it's pretty much standard practice to include a programmable offset that is superimposed on the output of the PID. I have mine working adaptively due to the varying conditions that you mention.

    Heater. wrote: »
    I really start to think I have to build some actuator system and play with this.

    I once had a good friend who was seriously into control systems engineering, he designed the active suspension control system for the Williams F1 cars when they were winning all the time. He was always on about "poles" and "zeros" whenever we got together for a beer. Sadly I never understood what he was talking about!

    Hmmm, I wonder if he was using a Galil Motion Control microprocessor. In the early days it was all Gain, Pole, Zero. Now they have a regular PID.

    I'm a huge F1 and MotoGP fan, BTW....Season's off to a great start for both sports.
    Failure is not an option...it's bundled with the software.
  • ErNa wrote: »
    ...As far as I know, most house heatings are controlled manually and roi of automatic heating control is very poor ;-)

    Ever heard about a wall mounted thermostat? Cost is about $25 and usually you can put on and off times for each day of the week including the temperature you are looking for. Here in the US they work with heating and cooling, quite helpful instead of switching manually.

    So I think the ROI is pretty fast reached.

    Enjoy!

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • msrobots wrote: »
    Here in the US they work with heating and cooling, quite helpful instead of switching manually.

    So I think the ROI is pretty fast reached.

    Enjoy!

    Mike
    OK, the moment energy is rare, control strategies change. While we fight for evers µW in an activity tracker (smart phone) we control room temperature by burning gas and opening the windows ;-)
    no reason to reason if you feel feelings: in love with the propeller

    How-2-TACHYON
  • This is the way that I would like to see this thread evolve, including code for the Prop.

    http://m.machinedesign.com/sensors/motion-control-meets-adaptive-control
    Failure is not an option...it's bundled with the software.
  • Yes. Only: replace the NI stuff by NO stuff and do it with a propeller. Funny: system identification loop runs at 5Hz!
    no reason to reason if you feel feelings: in love with the propeller

    How-2-TACHYON
  • Yeah, I picked up on the 5 Hz thing as well. I wonder if they left a "k" out there.
    The Prop should be the perfect platform for this application.
    Failure is not an option...it's bundled with the software.
  • evanhevanh Posts: 7,877
    edited 2016-03-29 - 21:48:38
    The 5Hz will be correct. I note that the usable PID gains are manually entered into a preset table in that write up, the adaptive part is selecting or interpolating from the preset table. So it's not an auto-tune method at all.

    "We suspect that ALMA will allow us to observe this rare form of CO in many other discs.
    By doing that, we can more accurately measure their mass, and determine whether
    scientists have systematically been underestimating how much matter they contain."
  • but great advertising ;-)
    no reason to reason if you feel feelings: in love with the propeller

    How-2-TACHYON
  • Some years ago, I tested someone's Self Tuning Regulator code that required very little computing power but was very effective. Can't seem to find anything like it on Google.
    Failure is not an option...it's bundled with the software.
  • Mickster,
    Hmmm, I wonder if he was using a Galil Motion Control microprocessor.
    No, the Williams active suspension system was all custom coded and ran on custom hardware. His design proposal used the Intel 80960, not sure what they ended up using.

    F1 banned active suspension shortly after.

Sign In or Register to comment.