News:

  • October 26, 2026, 01:21:12 PM

Login with username, password and session length

Author Topic: Comprehensive PID information  (Read 19429 times)

JLD

  • Newbie
  • *
  • Posts: 2
Comprehensive PID information
« on: June 09, 2014, 09:38:57 PM »
Can anyone point me to a more comprehensive explanation of the PID equation utilized by the Do-more platform. I'm looking for more in depth explanations of the various structure members and how they affect the equation.

I noticed in the PID view that the output shows a full -100% to +100% range, yet I cannot find any documentation regarding whether or not the PID loop can be configured to drive the output split range.

I really enjoy working with this processor, but it seems like the PID documentation for the koyo D2 processors is more "complete".

Thank you for your time, and help.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #1 on: June 09, 2014, 10:50:40 PM »
The PID equation in Do-more is essentially the same as DL.

The output is 0-100%, expressed as 0.0f to 100.0f. The output pain is -100 to 100 to allow the bias to be negative.

Do-more was developed and documented almost exclusively by Host. It was a huge undertaking for us, our largest ever, and we are still learning. We are currently working with our product management team at ADC in a major review of all forms of documentation, with the goal of addressing issues like this. So yeah, we hear you and are already working on it. The biggest single complaint about Do-more usually comes in some form of "we love it...once we got over the learning curve". Our goal is to keep you loving it, but greatly reduce the learning curve.

An easy way to get your feet wet with PID on Do-more is to use DmSim's PID Simulator. Start the Sim and select "Setup PID Process Simulator" from the Sim menu. Read what's there, and then follow the instructions on the "What else do I need to do?" button. Once you have a PID instruction in your program (and written to the Sim), right-click the PID instruction and select "Trend Instruction" to open the PID trend page. Make sure you are in RUN mode, the PID instruction has power flow, set the WX1 slider (which will be driving .SP) to mid scale, and select "Auto-Tune..." from the PID view.

I'll go through the process, and post some pictures back here...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #2 on: June 09, 2014, 11:12:24 PM »
Step one: Start the Sim and select "Sim->Setup PID Process Simulator". You should see the following dialog. Note the highlighted button.

Note: If the menu item is grayed out, it's because the Sim doesn't yet have a system config. Just save the blank project in DmD back to the Sim, and it should enable the menu item. This is only an issue in empty Sims.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #3 on: June 09, 2014, 11:17:43 PM »
Step two: Enter the program described after you selected the "What else do I need to do?". Basically just a PID box, a SCALE box, and a single contact powering them. I'm using the PID loop's internal scale function to scale WX0 into .PV and .Output to WY0, and using the SCALE box to scale WX1 from 0-4095 to 0.0-100.0 to write it into .SP.
« Last Edit: June 09, 2014, 11:21:53 PM by BobO »
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #4 on: June 09, 2014, 11:24:34 PM »
Step three: Enable the process sim and write the values back to it. The setup values are actually being written into a structure called $IntProcSim, which can also be accessed from the Simulator's program.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #5 on: June 09, 2014, 11:26:50 PM »
Once the process simulator is configured and enabled, the Sim's WX0 will change from a slider to a bar graph indicating that WX0 is now being driven by the sim by applying the time const to the value being written into WY0.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #6 on: June 09, 2014, 11:29:49 PM »
Step four: Right click the PID instruction and select "Trend Instruction" to bring up the PID view. You can also get there from the PID Overview or PID View menu/toolbar items.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #7 on: June 09, 2014, 11:32:11 PM »
Step five: With WX1 to mid scale, the Sim in Run mode, and the PID instruction energized, press "Start Tuning".
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #8 on: June 09, 2014, 11:35:52 PM »
In a handful of seconds, the loop is tuned. Bump WX1 and watch it work...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #9 on: June 09, 2014, 11:38:51 PM »
...now I realize that didn't begin to answer your questions, so please ask them. My goal was to get you (or anyone else confused by Do-more PID) some initial success and a basis to ask questions. *BTW, this is where you chime in telling me that you had already done everything I just described  ;)*
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

JLD

  • Newbie
  • *
  • Posts: 2
Re: Comprehensive PID information
« Reply #10 on: June 10, 2014, 12:26:37 AM »
I have played with the simulator a little.

Bias, its a read/write variable.

Can you explain this variable more clearly? Why would you want to set the bias negative? How does changing the bias affect the loop? Does the PID equation ever have an effect on the bias set point, or will only the user program/user input change the bias value?

Thank you for your response, although I must say I was not expecting anything until business hours.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Comprehensive PID information
« Reply #11 on: June 10, 2014, 12:40:11 AM »
Bias is added to the proportional term to produce the initial state of output and is effectively just an offset...a bias. The proportional term is essentially just "Output = Gain * Error + Bias".

For loops with 'I' terms, the integral affects the loop's output by integrating error into the bias over time. So yes, the user can change the bias, and yes, the loop can as well.

I'm here too much. I live very close (less than 1/4 mile) and sometimes lack the motivation to make the 30 second drive home...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO