Using model-based simulation in automation.

Using computer to model a P&ID to its closest level to the reality is not a new concept in industrial control. There are many applications and devices especially developed to fulfill this goal, to simulate the actual pumps, valves, tanks, and even physical and chemical processes defining the real behavior of the different parts of the process to make it as real as possible. In some situation the communication processes are also simulated to minimize the effort needed to get to a successful control system.

I am currently using a very simple environment using Siemens PLCSIM, to simulate the actual PLC device, and a self developed environment in Delphi that communicate with the PLCSIM, to mimic the various parts of the process, including various kind of pumps, valves, level transmitters, analog values, switches, and likes, to simulate as close as possible to reality before deploying the system control at site. Some parts of process are simulated in the background code, to simulate other parts of process that needs more sophisticated models involving some sort of mathematical modeling of physical and chemical behavior of that element. The complexity of the model depends of many factors, but usually some very simple assumptions eliminate the use of complex parts, and let me to concentrate more on the behavior of the control system itself. But it doesn’t prevent me to use complex algorithms when they are available and necessary.

The processes I usually worked with are mostly very simple in nature, involving only simple conditions that can be simulated with very simple physical laws, and even this simple and none mathematical simulation environment has its own benefits.

  1. Allowing the process expert of the contractor to see what their designed system will look like from an automatic control system point of view. It will help them to apply the final touch before even turning on/off an actual device.
  2. Allow us to test the control system, and to test various working and error scenarios with the designed control system.
  3. It will help us to find errors and correct them, in a very peaceful environment, without worrying about the issues if this would happen in a real place with real devices. In some situation the control sequences can be very complex, and testing and debugging this algorithm, and finding implementation bugs, in real circumstances can be very hard, if not impossible.
  4. This will help us to be open to apply changes even after the system has been deployed in the site, and to test the new needs, that usually arise in fields from an operator point of view, because of the new conditions that no one has been faced with it before.
  5. All the above benefits decrease the time, effort and negative effects on devices and experts involving in all steps of design, implementation and deployment. This will minimize the time and financial impact that is inherited in situation that these modifications and debugging would be done in the site with real operators and devices.
  6. My own simulating system doesn’t have automatic code generation ability, but I have compensated it with writing and using pre-built components in the Delphi programming environment to be able to use these blocks as building brick of the model-based simulated process. In future effort this approach can be diverted as close as possible to a real model-based simulation.

Choosing a suitable redundancy for Siemens S300/400 PLCs.

I agree with “Control&Automation Systems” and “Mr. Masood Syed”, it is possible to use S300 with software redundancy. But you need to take into account many aspects, from choosing compatible hardware, to the changes you need to apply to the program. Even size of program has effect on the choosen hardware. The size of data to be kept redundant is also a role player in this respect. In its simple case, you may use CPU S300 with HMIs also, even on MPI.

So I propose to first follow all the rules to convert a normal program based on a single CPU to its redundant counter part. I am sure in many cases you may succeed to do this replacement. But in cases you need fast responses, and big control programs and data, as it is proposed by “Mr. Stephen Burke” and “Mr. Rodrigo Pinto Cardenas”, it is better to deploy S400 redundancy. In this case also you have two choices, software and hardware redundancy. The software redundancy aspects in S400 is very similiar to that of S300, but you may use the benefits of more speed and better memory structure of S400 series.

Also keep into account if you need to have redundant I/O. But in your case, as I understood you don’t need it.

So follow the following steps. Have in mind that using S400 let you have more options and senario to choose, but the price may be considerably high.

  • Check for harware needs and compatibility. Sometimes even the Stand version of backplane can also be a concern. Once I have faced with this problem that even Siemens experts was not aware of it.
  • After changing the PLC program, check for memory usage. The aspects to change are clearly written in Siemens manual for software redundancy. You should then choose a proper CPU, having enaugh memory, plus some more space in work memory, as when the program starts, the redundancy software needs more than what you see in S7 manager, to build its own working memory data structures.
  • If you have an HMI also, please choose a proper communication bus. In many normal cases, like what I worked in Water and Waste Water Treatment, a MPI bus is the best option. Its cheap and simple to implement.
  • Check exactly for hardware, software and licenses. You may build a comparision table, and then decide, based on price, availability, future expansion, and flexibility.