Guidance on Simulating Interacting PID Logic Loops in FlexSim for a Continuous Process
Hello everyone, I hope you are doing well. I am working on a project where I am trying to use FlexSim to simulate a simplified version of a continuous manufacturing process. The real system I am basing this on is a PVC extrusion line. The physical process involves an extruder melting and pressing plastic into a film. The machine produces material at a continuous linear rate, and the output becomes a roll.
My goal is to build an artificial PID control concept in FlexSim that will let me explore how changes in Availability, Performance, and Quality can influence one another. I am not trying to build a fully accurate PID solver. I am only trying to create a learning tool that helps my team understand relationships in OEE. My professor confirmed that FlexSim can support a discretized feedback system if I sample values at regular intervals, but not a fully continuous one.
**What I am attempting to build in FlexSim:**
• Three PID style logic loops for Availability, Performance, and Quality
• Each loop uses: Source → Error Device (Queue) → Separator → P/I/D Queues → Combiner → Processor (Plant) → Sink
• Each loop creates an updated value for A_actual, P_actual, and Q_actual
• Each value needs to influence the others. For example:
• Performance affects Quality
• Availability affects Performance
• Quality affects Availability
The structure works in theory, and I have been experimenting with item labels, parameter tables, and queues that assign values. However, I am struggling with several parts of the implementation.
**I would appreciate guidance on the following questions:**
1. **Assigning and updating labels:**
How should I assign and update the P, I, and D values on each flow item so that the Combiner can reliably sum them? I have tried several label methods but I keep running into errors related to missing labels or invalid value properties.
2. **Splitting and routing items:**
What is the simplest and most reliable way to split one item into three items for P, I, and D? I tried using a Separator with custom script and also tried a Round Robin router. Both approaches gave mixed results.
3. **Passing values between loops:**
What is the best practice for allowing one PID loop to read calculations from the others? Should I use:
• Global Tables
• Flowitem labels
• Network nodes
• Parameter tables
• Custom triggers
I want the values to update continuously across the simulation without introducing instability in item routing.
4. **Dynamic processing times:**
Is there a recommended method for making a Processor adjust its cycle time based on a formula that references another loop’s output? For example, letting P_actual adjust the “speed” of the A loop.
5. **Recommended model structure:**
Since this is a conceptual model and not a physics based one, is there a particular set of FlexSim objects or logic blocks that would be better suited for this type of feedback simulation?
6. **Debugging strategies:**
Several of my errors came from label access issues. What strategies do you recommend for verifying that labels exist when an item enters a queue or processor?
7. **General recommendations:**
My professor suggested posting here because more advanced users may have experience creating custom feedback or control logic systems in FlexSim. If you have tried something similar before, I would greatly appreciate your insights.
I would be grateful for any advice, examples, corrections, or even warnings about common pitfalls that I might encounter. Thank you in advance for your time and assistance. I have included a photo of a detailed flowchart of my PID logic for reference.