Full text
Master’s Thesis Report MASTER'S DEGREE IN ELECTRICAL SYSTEMS AND DRIVES Automatic routing of cables through cable trays and ducts using Python Author: Carles Bertran Pujol Tutors: Mónica Aragüés Peñalba and Eduard Bullich Massague Call: September, 2024
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 1
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 2 Table of Contents Table of Figures ..................................................................................................................................................... 4 List of Tables ......................................................................................................................................................... 5 Abstract .................................................................................................................................................................. 7 Acknowledgments ............................................................................................................................................... 10 1. Introduction .................................................................................................................................................... 12 1.1. State of art - Current tools for cable routing .......................................................................................... 13 1.2. Issues and challenges of existing tools ..................................................................................................... 15 1.3. Objectives ................................................................................................................................................. 17 1.4. Scope ......................................................................................................................................................... 18 2. Methodology ................................................................................................................................................... 21 2.1. Scheme control ........................................................................................................................................ 22 2.2. Used algorithm: Dijkstra ......................................................................................................................... 22 2.3. Input 1: Cableway Coordinates Excel (from NAVIS 3D) .................................................................... 24 2.4. Input 2: Devices Coordinates Excel (Manual) ....................................................................................... 29 2.5. Input 3: Cable List Excel (from Siemens) .............................................................................................. 30 2.6. Nodes generation ..................................................................................................................................... 31 2.7. Edges calculation ...................................................................................................................................... 31 2.7.1 Different Types of Edges .................................................................................................................. 32 2.7.2 Considerations for different types of edges...................................................................................... 34 2.7.3 Distance calculation of the edges ...................................................................................................... 36 3. Coding ............................................................................................................................................................. 37 3.1. Initial Data Processing and Setup ........................................................................................................... 37 3.2. Display and Data Selection: Interactive Interface for Data Filtering .................................................... 39 3.3. Cableway and Device Coordinates List (Nodes) ................................................................................... 40 3.4. Edges Calculation and 3D representation .............................................................................................. 41 3.5. Data unification ....................................................................................................................................... 48 3.6. Dijkstra Graph visualization .................................................................................................................... 48 3.7. Djikstra Algorithm ................................................................................................................................... 49 3.8. Final Output ............................................................................................................................................ 50 3.9. Conclusions from the Code .................................................................................................................... 53 4. Cost savings for the company when using the tool ....................................................................................... 54
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 3 5. Future projects and improvements ................................................................................................................ 56 6. Environmental Impact .................................................................................................................................... 58 7. Project Budget ................................................................................................................................................. 59 8. Conclusions ..................................................................................................................................................... 61 9. Bibliography .................................................................................................................................................... 65 10. Annexes .......................................................................................................................................................... 67 Annex 1: Python Code detailed explanation (Start) ..................................................................................... 67 Annex 2: Python Code detailed explanation (Display) ................................................................................ 73 Annex 3: Python Code detailed (Cableway and device coordinates list)..................................................... 75 Annex 4: Python Code detailed (Edges calculation) and 3D representation .............................................. 78 Annex 5: Python Code detailed (Excel list unification) ............................................................................... 88 Annex 6: Python Code detailed (Graph creation) ........................................................................................ 90 Annex 7: Python Code detailed (Djikstra Algorithm) ................................................................................. 92 Annex 8: Python Code detailed (Final Output) ........................................................................................... 96 Annex 9: Electrical Design Criteria (Siemens) .............................................................................................. 99 Annex 10: Siemens Cable List ...................................................................................................................... 140 Annex 11: More cable tray design details .................................................................................................... 144
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 4 Table of Figures Figure 1: General scheme of program operation ............................................................................................... 22 Figure 2: Djiktra Graph Example ....................................................................................................................... 22 Figure 3: Building coordinates dataset structure ............................................................................................... 24 Figure 4: Information extracted from the column “Name” ............................................................................. 24 Figure 5: Tray coding in Navis 3D software ...................................................................................................... 26 Figure 6: Transformation of 1 line of coordinates into multiple points .......................................................... 29 Figure 7: Device coordinates Excel List .............................................................................................................. 29 Figure 8: Scheme of the Python code ................................................................................................................. 30 Figure 9: Edges Type 1 ........................................................................................................................................ 32 Figure 10: Edges Type 2 ...................................................................................................................................... 33 Figure 11: Edges Type 3 ...................................................................................................................................... 33 Figure 12: Edges Type 4 ...................................................................................................................................... 34 Figure 13: Data transformation .......................................................................................................................... 38 Figure 14: Creation of Nodes table .................................................................................................................... 38 Figure 15: Display................................................................................................................................................ 39 Figure 16: Edges Type 1 recreation .................................................................................................................... 43 Figure 17: Edges Type 2 recreation .................................................................................................................... 44 Figure 18: Edges Type 3 recreation .................................................................................................................... 44 Figure 19: Edges Type 4 recreation .................................................................................................................... 45 Figure 20: 3D model with all the Edges calculated ............................................................................................ 45 Figure 21: UGJ cableway recreation vs UGJ cableway design (from Navis 3D).............................................. 47 Figure 22: Dijkstra graph (left from python, right conceptual) ........................................................................ 49 Figure 23: Specific routing visualization (with and without labels) ................................................................. 52
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 5 List of Tables Table 1: Cableway Type List .............................................................................................................................. 25 Table 2: Buildings List ........................................................................................................................................ 25 Table 3: Type of elements list definition ........................................................................................................... 27 Table 4: Type of elements representation .......................................................................................................... 28 Table 5: Type of elements and number of coordinates ..................................................................................... 28 Table 6: Considerations for each type of sections in edges ............................................................................... 35 Table 7: Same base (different elements) ............................................................................................................. 36 Table 8: Final result of a routed cable (Nodes) .................................................................................................. 51 Table 9: Final result of a routed cable (Cableways) ........................................................................................... 52 Table 10: Final result of a routed cable (Nodes) ................................................................................................ 55
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 6
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 7 Abstract The main objective of this project is to automate the routing of medium and low voltage cables, as well as instrumentation and control, fire and telecommunication cables. To achieve this, Python will be used as a fundamental tool, facilitating the determination of the trays or ducts through which these cables must pass using Dijkstra algorithm. Before getting into the main topic, this paper provides a brief introduction to the concept of routing, highlighting the typical challenges that may arise and the relevance of its automation. This will be followed by details of how the code was configured and developed. The case study will focus on a plant under construction in Grudziądz, Poland. This facility is a combined cycle power plant, equipped with a 560 MW gas turbine, currently under development in the Polish province of Kujawy-Pomorskie. The project will be executed in compliance with international industry standards, specifically IEEE and IEC standards. Finally, a demonstration of the Python code will be presented, together with an analysis of possible improvements and future targets to be considered. Keywords: Python Routing Automation MV Cable Dijkstra
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 8 Resumen El objetivo principal de este proyecto es automatizar el enrutamiento (también conocido como rutado) de cables de media y baja tensión, así como de cables de instrumentación y control, fuego y telecomunicaciones. Para lograrlo, se utilizará Python como herramienta fundamental, facilitando la determinación de las bandejas o ductos por los que deben pasar estos cables usando el algoritmo Dijkstra. Antes de adentrarse en el tema central, este trabajo proporciona una breve introducción al concepto de enrutamiento, subrayando los desafíos típicos que pueden presentarse y la relevancia de su automatización. A continuación, se detallará cómo se ha configurado y desarrollado el código. El caso de estudio se centrará en una planta en construcción en Grudziądz, Polonia. Esta instalación es una central eléctrica de ciclo combinado, equipada con una turbina de gas de 560 MW, actualmente en desarrollo en la provincia polaca de Kujawy-Pomorskie. El proyecto se ejecutará conforme a las normativas industriales internacionales, específicamente las normas IEEE e IEC. Finalmente, se presentará una demostración del código Python, junto con un análisis de las posibles mejoras y futuros objetivos a considerar. Keywords: Python Enrutamiento Automatización Cables Media Tensión Dijkstra
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 15 electrical safety standards. The software allows engineers to simulate different routing scenarios and evaluate the impact of environmental factors on cable performance. 1.2. Issues and challenges of existing tools Here lets a do a breakdown of the limitations associated with each of the cable routing tools discussed in the previous point: Autodesk AutoCAD Electrical - Complexity for Beginners: While AutoCAD Electrical is powerful, its extensive feature set can be overwhelming for beginners. It requires a significant learning curve to master its full capabilities. - Limited Optimization: AutoCAD Electrical is primarily a CAD tool and lacks advanced optimization algorithms specifically tailored for cable routing. Users may need to manually adjust routes to achieve optimal results. There is also little flexibility. - Integration Issues: While it supports electrical design, integrating with other disciplines within a large project (e.g., mechanical or civil) may require additional tools or apps, complicating workflows and all this makes the program much more expensive. - 2D Focused: Although it offers some 3D capabilities, the software is 2D-focused, which can limit the visualization of complex cable routing scenarios in three dimensions. EPLAN Electric P8 - Cost: EPLAN Electric P8 is a premium tool with a high cost of licensing, making it very difficult for small companies or individual engineers. - Resource-Intensive: The software requires significant computational resources to run efficiently, especially for large-scale projects, which can be a limitation for users with less powerful hardware. - Steep Learning Curve: Similar to AutoCAD Electrical, EPLAN Electric P8 has a steep learning curve due to its vast array of features and customization options. - Integration Limitations: While EPLAN integrates well with other EPLAN products, its interoperability with non-EPLAN systems may be limited, which could complicate workflows in multi-disciplinary projects. SmartPlant Electrical by Hexagon PPM - High Complexity: SmartPlant Electrical is highly complex, making it difficult for new users to navigate and utilize its full potential without extensive training. - High Cost: The software is designed for large-scale industrial projects and comes with a high price tag, making it less accessible for smaller projects or firms.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 16 - Limited Flexibility: While it is powerful in large industrial settings, SmartPlant Electrical can be less flexible for smaller or more customized projects where the standard workflows and templates may not apply. - Dependency on Other SmartPlant Tools: The software is designed to work best in conjunction with other SmartPlant tools, which can lead to additional costs and complexity if an organization needs to invest in a full suite of products. Bentley Raceway and Cable Management - High Cost: Bentley’s software is also on the expensive side, which may not be justifiable for all projects, especially those with smaller budgets. - Complex Setup: The initial setup and configuration of Bentley Raceway and Cable Management can be time-consuming, requiring significant expertise to tailor it to specific project needs. - Learning Curve: The tool requires specialized training, and new users may struggle with its advanced features and extensive customization options. - Interoperability Issues: While Bentley tools are powerful within their ecosystem, integrating them with non-Bentley systems can be challenging and may require additional software or customization. ETAP Cable System Design - Focus on Analysis: ETAP is primarily an analysis tool rather than a dedicated routing tool. While it offers cable routing features, these are more geared toward ensuring compliance and performance rather than optimizing the physical routing process. - Cost: ETAP is a high-end tool, with licensing fees that may be difficult for smaller projects or firms. - Specialized Use: The software is highly specialized, making it less suitable for projects that require a broader set of design tools. It excels in power system analysis but may not be the best choice if cable routing is the primary focus. - User Interface: ETAP’s interface can be less intuitive compared to some more modern tools, which might slow down the workflow, especially for new users.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 17 General Limitations Across All Tools: It can be said that all the software programs share the same limitations: - High Licensing Costs: Most of the specialized tools mentioned come with high licensing fees, which can be a significant barrier for smaller companies or individual users. - Learning Curves: Advanced features and specialized functionality often come at the cost of use, requiring extensive training and experience to fully understand the software. - Hardware Requirements: These tools generally require robust computing resources, which can add to the cost and complexity of their use, especially in large-scale projects. - Integration Challenges: While many of these tools are powerful within their domains, integrating them with other systems (especially cross-disciplinary tools) can be challenging and may require additional customization or third-party software. Understanding these limitations is crucial for selecting the right tool for a specific project, balancing the trade-offs between cost, complexity, and functionality. What happens with these programs is that you have to allocate human capital resources (in this case we are referring to engineers) to perform the routing, so you have to allocate resources for the worker to learn how to handle the program and the regulations and everything. These programs help to visualize, but do not make the task automated. In our case the project will use the NAVIS program as 3D viewer. 1.3. Objectives After analyzing the disadvantages of the tools currently available, this chapter will present the objectives of this work. The task of routing cables is laborious, regardless of the method employed: when done manually, the process is slow and tedious; whereas when using specialized software, a similar amount of time is often invested as that required to do it manually. This is due to the time required to set up the project in the software, understand its operation and learn how to use it efficiently, which can exceed the time that would have been spent performing the task manually. Generally, what is done is: The design of the trays and ducts is done by a person who is dedicated only to that role. The design is made in a 3D visualizer and then it is an engineer who determines and gives feedback to that design. Also, what happens is that the task of routing does not have a very high cost within the whole project. As it will be seen later in this work, it will be calculated when it will cost to hand sew and the numbers that come out may seem big, but when comparing them with the project, we are talking about that it represents between 2% and 5% of the total, so despite how important it is, the cost is so little that many times it is not worth introducing all these technologies that make the task much more expensive, which after all, is not important in the budget.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 18 Although automated programs offer significant advantages, they also have limitations that cannot always be overcome by the use of software alone. In these cases, the intervention of the engineer is crucial, allowing a more accurate interpretation of the regulations and achieving a more optimal and customized approach. The manual process provides a flexibility that is sometimes essential to optimize the design according to the specific needs of the project. Therefore, the objective of this project is to develop a tool that allows the engineer to apply his knowledge and experience, while significantly reducing the workload. This tool must be easy to use, adaptable to a wide variety of projects and capable of being integrated without extensive modifications. In addition, flexibility is critical, as projects often undergo multiple modifications due to unforeseen events, requiring the implementation of various changes over time. The following chapter will explain how these objectives will be achieved. 1.4. Scope Project Overview This chapter specifies the details of the different activities involved in the project development, as well as its limits and considerations. The aim is to provide a clear and structured view of the project components, ensuring that all essential elements are effectively covered and that the inherent limitations and challenges are understood. Objectives Recap The main goal of this work is to implement Python code to automate the cable routing task in a clear, simple, and practical way, without the need to rely on other programs. The final output will be an Excel file containing all the relevant information, thus facilitating the engineer's review and validation of the routing. This approach not only seeks to optimize the process but also aims to provide a flexible and adaptable solution that can be used in a wide variety of projects. Inclusions This project is rooted in the experience gained during my participation in cable sizing and routing tasks for a project managed by IDOM, an international engineering consultancy, under subcontract from SIEMENS. The cable routing will be carried out using ducts and cable trays, with the coordinates extracted from the NAVIS 3D program, a BIM 1 viewer that allows us to obtain the coordinates of key project elements. The tool developed in Python will be used alongside Excel to perform the routing, which will then be compared with the routing that was actually carried out in the original project, for which I have all the necessary documentation. This routing will include several buildings and cover medium-voltage cables, low-voltage cables, telecommunications, instrumentation and control, lighting, fire protection, and firefighting. 1 Building Information Modeling, digital representation of the physical of the facility
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 19 Exclusions This project will not include the direct implementation of IEEE and IEC standards in the Python code, as this aspect will not be automated. Therefore, a manual review by the engineer will always be necessary to ensure that the routing complies with the relevant international standards. Boundaries The conditions for completing this project have not been ideal, as I have been under a significant workload while developing it. Furthermore, my departure from IDOM, the company with which I started the project, has impacted its continuity. Despite this, both parties continue to evaluate the possibility of future collaborations, particularly in the automation of cable routing, as IDOM has shown interest in outsourcing this task. My involvement in this project has equipped me with the necessary skills to continue working independently in this area. Stakeholders The files, plans, and 3D models used for the development of this project belong to IDOM. These have been fundamental in the creation and validation of the developed tool, providing the necessary data for automated cable routing. Assumptions and Constraints Due to my departure from IDOM, I have been unable to maintain active collaboration with the company, which has led to the assumption that the results of the previously conducted manual routing are largely correct. This assumption is key to the validation of the automated routing being developed. Success Criteria Success will be defined by the automated routing that closely resembles the routing described in the original files provided by IDOM. Accuracy in replicating the original manual routing will be the primary indicator of the tool’s success. Conclusion In summary, this project seeks to develop a tool that allows engineers to combine their expertise with the efficiency of automation, significantly reducing the workload while ensuring precise routing that meets project expectations. Despite the limitations and challenges encountered, the developed tool has the potential to offer an innovative and practical approach to cable routing, with possibilities for future improvements and broader applications in the industry. The tools and methodologies for cable routing have come a long way from manual processes to sophisticated software solutions. Current state-of-the-art tools offer a range of features designed to optimize the routing process, reduce errors, and ensure compliance with industry standards. As
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 20 technology continues to advance, new trends such as BIM integration (Building Information Modeling, digital representation of the physical of the facility, for this project is NAVIS 3D), AI- driven optimization, and cloud-based collaboration are likely to further enhance the capabilities of cable routing tools. I noticed that the 3D visualization program itself allows the extraction of the information of the coordinates of the origin and destination points of each cable run. Using this information, the aim of the project is to create a graph model from the origin and destination coordinates of each cable section. Subsequently, an optimal path finding algorithm, such as Dijkstra, will be applied to determine the most suitable routes. This automated process will allow the resulting information to be extracted in Excel format. The task of routing cables is the most monotonous and manual part of the process, and takes several hours of work. Automating this task using Python will not only significantly reduce the time required, but also minimize human error, increasing the efficiency and accuracy of the work.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 21 2. Methodology The Python program developed for this project is designed to automate the cable routing process in complex industrial installations. The code uses input data related to the layout of electrical systems, including the coordinates of equipment, trays, and ducts, to find the most efficient paths for different types of cables (such as Medium Voltage, Low Voltage, Instrumentation and Control, Lighting, Fire Protection, and Fire Fighting). This automation is especially useful in large projects where the complexity makes manual routing not only slow but also more likely to have mistakes. By combining the different types of cables and their specific needs into one process, the program ensures that each cable is routed in the best way, making the most of available space and improving the overall efficiency of the installation. The program also needs the coordinates of the cableways, which are taken from a 3D model (probably from NAVIS). These coordinates are crucial for accurately mapping out the paths that the cables will follow. By automating this part of the process, the program greatly reduces the amount of manual work, increases accuracy, and makes sure the routing fits within the physical and technical limits of the installation. Additionally, the program includes the coordinates for the devices and elements that need to be connected later, providing a complete approach to the routing process. By combining 3D model data with routing algorithms like Dijkstra’s, the program not only simplifies the design process but also allows for real-time changes if the project requirements or installation layout are updated. The Dijkstra algorithm, which plays a key role in this process, will be explained in the following sections, showing how it is used to find the best routing. The final output of the program is the same cable list provided by Siemens but with the routing information filled in. This report includes the routing paths for all cables, the trays or ducts they pass through, and other important details needed to carry out the electrical system. Engineers can review this report to make sure it meets design standards and regulations. This report is an essential tool for verifying the project, allowing for easy comparison with design plans and regulatory requirements.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 22 Figure 1: General scheme of program operation Figure 2: Djiktra Graph Example 2.1. Scheme control The final output of the program is a detailed report in Excel format, including the routing paths of all cables. As can be seen in the schematic Figure 1, the program needs 3 inputs of information: the Excel coordinates of the trays and ducts, the list of cables and the coordinates of the devices. 2.2. Used algorithm: Dijkstra The Dijkstra algorithm is a method used to find the shortest path between two points in a graph, which is a network of nodes (or vertices) connected by edges (or paths). It is important to explain and have a clear idea of this algorithm before anything, due to all the code is related to this algorithm.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 23 Looking at Figure 2, nodes and edges can be defined as: - Node (or Vertex): A node represents a point in the graph. It can be thought the position. In Dijkstra's algorithm, nodes are the points between which the shortest paths are calculated. - Edge: An edge is the connection between two nodes. It represents a path or link between them, like a road between two cities, or like in this project a cable connecting two devices. Each edge has a weight (or cost), which is a number that represents the "distance" or "cost" of traveling along that edge. In Dijkstra's algorithm, the goal is to find the path between nodes that has the smallest total weight. Each edge in the graph has a weight, which represents the cost, distance, or time it takes to travel between the two nodes it connects. The goal of the Dijkstra algorithm is to determine the shortest possible path from a starting node to a target node, minimizing the total weight. The algorithm works by starting at the chosen starting node and exploring all its neighboring nodes, calculating the total weight to reach each one. It keeps track of the shortest known path to each node and updates this path whenever a shorter one is found. This process continues until the algorithm has considered all possible paths and found the shortest one to the target node. The key steps of the Dijkstra algorithm are: 1. Initialization: Start at the chosen starting node, setting the distance to this node as 0 and all others as infinity (since they haven't been reached yet). The starting node is marked as visited. 2. Explore Neighbors: From the current node, look at all its neighboring nodes. Calculate the total distance from the start node to each neighbor by adding the edge weight to the distance of the current node. If this distance is shorter than the previously recorded distance, update it. 3. Mark as Visited: Once all neighbors of the current node have been considered, mark the current node as visited. This means that the shortest path to this node has been found, and it doesn't need to be rechecked. 4. Move to the Next Node: Choose the unvisited node with the smallest known distance as the next "current" node, and repeat the process. 5. Repeat Until Done: Continue this process until the target node is marked as visited or until all nodes have been visited. The result is the shortest path from the starting node to the target node, considering the least total weight. This algorithm is commonly used in network routing, such as finding the shortest path for data packets on the internet, and in other applications where finding the most efficient path is essential. But to achieve this goal, the program must first reconstruct the trays and ducts using the coordinates. Now that the concepts of edge and node have been explained, this process will be explained next.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 24 Figure 3: Building coordinates dataset structure Figure 4: Information extracted from the column “Name” 2.3. Input 1: Cableway Coordinates Excel (from NAVIS 3D) To initiate the procedure, the process begins with the coordinates database containing the various elements that comprise the cable pathways. This database is directly sourced from the NAVIS 3D modeling program. Each of these buildings will have one or more files containing the coordinates of the cableways. These files will always follow the following structure showed in Figure 3 above. The following is an explanation of the function of each column and the information it provides us with. Column “Name” → The first column, “Name,” serves as the cableway identifier. From this column, it can be extracted 4 characteristics, as the Figure 4 shows: - The name of the cableway - The cableway type is extracted - Width characteristics of the tray - Building or area The cableway type could be only these 7 types in Table 1: Cableway Type Description P LV Cables (kW < 2.5 kW) M MV Cables (kW > 2.5 kW) CL1 I&C (voltage < 60V)
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 31 2.6. Nodes generation Following what has been explained in Figure 3 each of the new points that we take per line from the Navis 3D excel, will be a Node. That is, if a line has 4 coordinates, each of them will be a node. In the case of the list of equipment and devices, these will be defined as nodes as well. In the code part we will detail more how to make these changes. 2.7. Edges calculation Now that the three information inputs have been thoroughly explained, the next step is to describe how the Python code constructs the foundation necessary for applying the Dijkstra algorithm and ultimately performing the cable routing. While the detailed operation of the code, including all specific functions and procedures, will be explained line by line in a subsequent section, this part of the thesis focuses on providing a conceptual overview, emphasizing the objectives and the logical flow of the process. The first input consists of the tray section coordinates extracted from the NAVIS 3D program. These coordinates represent the physical layout of the trays and cableways within the industrial installation. The Python code uses this data to reconstruct the network of trays and cableways, creating a digital model that mirrors the real-world setup. This reconstruction is not just a simple replication of the physical layout; it is an essential step in creating a mathematical model that can be analyzed and used to create the graph (Figure 2). Once the trays and cableways are reconstructed, the next critical task is to generate the corresponding graph that will serve as the foundation for the Dijkstra algorithm. In graph theory, which underpins the Dijkstra algorithm, the network is represented as a collection of nodes (or vertices) and edges (or links between the nodes). In this context, the nodes represent specific points along the cableways, such as junctions, endpoints, or connections to devices. The edges represent the possible paths or connections between these nodes.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 32 Figure 9: Edges Type 1 2.7.1 Different Types of Edges Creating the edges involves calculating the distances between these points. Each distance represents the "cost" of traveling from one node to another and is identified as a weight in the Dijkstra algorithm. The accuracy of these calculations is crucial, as the algorithm uses these weights to determine the most efficient routing paths, minimizing the total cost (which could represent physical distance, time, or any other relevant metric). - Type 1: Edges between two points on the same cableway and within the same element. - Type 2: Edges between two points on the same cableway but across different elements. - Type 3: Edges between two points on different cableways. - Type 4: Edges connecting a device to the nearest cableway. In all cases, it is essential to ensure that the cableway type remains consistent, meaning that all components involved must belong to the same category (P, M, or F) as indicated in Table 1. More detailed explanation as follows in next page. ● Edges - Type 1 (Same elements) → In this context, distances between coordinates within the same cableway will be calculated. The database obtained from the 3D model provides coordinates for various elements of the cableway, highlighted in red in the accompanying image. However, to construct the pathway (the edge), it is important to determine paths within the same cableway or base (outlined in white). See Figure 9.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 33 Figure 10: Edges Type 2 Figure 11: Edges Type 3 ● Edges - Type 2 (Different elements) → In this process, the distance between coordinates between points of different cableways will be calculated to connect the various sections with each other. The provided image depicts two trays, and the path outlined in red indicates the edge to be measured. See Figure 10. ● Edges - Type 3 (Different cableways) → In this process, the distance between coordinates between points of different cableways will be calculated to connect the various sections with each other. The provided image depicts two trays, and the path outlined in red indicates the edge to be measured. See Figure 11.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 34 Figure 12: Edges Type 4 ● Edges - Type 4 (Cableway and Device) → In this list, the distance from the device to the cableway will be calculated as shown in the attached image. Where the distance to be calculated would be the one marked in black. See Figure 12. By categorizing the edges in this way, the Python code ensures that the graph generated is not only accurate but also reflective of the complexities of real-world installations. This segmentation allows the Dijkstra algorithm to process the graph more effectively, considering the unique characteristics of each type of connection within the system. The result is a highly efficient routing solution that minimizes manual effort, reduces errors, and ensures that the final design adheres to the necessary spatial constraints and operational requirements. 2.7.2 Considerations for different types of edges For each of the edges, the maximum allowable length will not exceed 3.2 meters. Any edge exceeding this value will be discarded for edge types 1, 2, and 3 (however, edge type 4, which connects devices to cableways, can exceed 3 meters). This limitation is due to the fact that the Navis program, by definition, does not permit trays longer than 3.2 meters. This is in the straight sections (FTUB), with respect to the other elements (BEND, REDU, CROSS...) they cannot exceed 1.5 meters. Edges type calculation algorithm: Type 1: Same base (same elements) Given the text, here's a summary of the conditions for determining if the calculated distance between two elements should be kept or deleted, based on the type of cableway: 1. FTUB: ● Keep the result if the distance is less than 3.2 meters which is the higher value that a FTUB tray component could have. ● Delete the result if the distance is 3.2 meters or more.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 35 2. ELBOW, BEND, BRAN, TEE, REDU, CROS: ● Keep the result if the distance is less than 1.5 meters. ● Delete the result if the distance is 1.5 meters or more. It can be seen in a easier way in next page Table 6. Type Distance Condition Action FTUB Less than 3.2 meters Keep result FTUB 3.2 meters or more Delete result ELBOW Less than 1.5 meters Keep result ELBOW 1.5 meters or more Delete result BEND Less than 1.5 meters Keep result BEND 1.5 meters or more Delete result BRAN Less than 1.5 meters Keep result BRAN 1.5 meters or more Delete result TEE Less than 1.5 meters Keep result TEE 1.5 meters or more Delete result REDU Less than 1.5 meters Keep result REDU 1.5 meters or more Delete result CROS Less than 1.5 meters Keep result CROS 1.5 meters or more Delete result Table 6: Considerations for each type of sections in edges The decision process: ● Calculate the distance between the two elements. ● Determine the type of cable. ● Apply the corresponding condition to decide whether to keep or delete the result. Type 2: Same base (different elements) If the base is the same for both elements, the type is different and shares at least one of the 3D coordinates , you calculate the distance. Type 3: Different Base (Different Elements) 1. Condition for Calculation: ○ The base is different for both elements. ○ The elements share at least one of the 3D coordinates (x, y, or z). 2. Distance Calculation: ○ Calculate the distance between the two elements. 3. Condition for Keeping the Result: ○ The base is different for both elements and the elements share at least one of the 3D coordinates (x, y, or z). And later: - If the type is the same for both elements and the type is equal to “FTUB”, you keep the result. If not, you delete the result.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 36 Condition for Calculation Distance Calculation Condition for Keeping Result Bases are different and share at least one 3D coordinate Calculate the distance If the type is the same and equal to "FTUB", keep the result. If not, delete the result. Table 7: Same base (different elements) If the base of both elements are different and one of them is type “Device”, you calculate the distance. It can be summarized in a table like Table 7. 2.7.3 Distance calculation of the edges To calculate the distance between two points in 3D space with coordinates (x1, y1, z1) and (x2, y2, z2), the formula used is derived from the Pythagorean theorem. The distance d between the two points is calculated as follows and here’s a step-by-step explanation: 1. Subtract the Coordinates: - Calculate the difference in the x-coordinates: Δx=x2−x1 - Calculate the difference in the y-coordinates: Δy=y2−y1 - Calculate the difference in the z-coordinates: Δz=z2−z1 2. Sum the Squares: Add the squared differences: Δx2 + Δy2 + Δz2 3. Take the Square Root: - Finally, take the square root of the sum to find the distance: This formula gives the straight-line (or Euclidean) distance between the two points in 3D space. Following the Figure 1 on page 22, it can be observed that all calculated edges are combined to form a single list of edges. The same process is applied to the nodes. This will be clearly illustrated in the code chapter.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 37 3. Coding The Google Colab platform was used for this work because it is simple to use and links the documents very well with the program. Also, by registering with a UPC email I had access to better CPUs to run the program. The ease of integrating Google Drive documents and folders with the programming has also been an important factor since I have been able to work with the code from several devices without depending on my personal one. The purpose of this chapter is to explain the Python code developed for automating the process of cable routing in complex industrial installations. The code handles various tasks, including setting up the environment, organizing and cleaning data, and creating interactive tools for data filtering. Each section of the code plays a crucial role in preparing the data for further analysis and routing calculations. 3.1. Initial Data Processing and Setup In this section, the process begins by setting up the environment and preparing the necessary data for cable routing in an industrial installation. The initial step involves connecting to Google Drive, where the required data files are saved. This setup is crucial for accessing and managing the Excel files containing information about the cableways, routing lists, and device coordinates. The first task is to unify the data related to cableway coordinates. This involves reading multiple Excel files from the specified directory and combining them into a single dataset. During this process, unnecessary elements that are not relevant to the cable routing process, such as certain types of ducts or zones like "TUBI," "PIPE," "ZONE," and "AIDGRO," are filtered out to only use pertinent information. Once the data is consolidated, columns are renamed for clarity and converting the coordinate values from millimeters to meters, standardizing the data for easier interpretation. See in next page, Figure 13 for a better understanding of the transformation. Next, the program focuses on preparing this cleaned data for further analysis. It performs various string replacements to standardize the cableway names, sorts the data for consistency, and reorders it to ensure ease of access. Each cableway's coordinates are then extracted and compiled into a new DataFrame that contains essential information such as the cableway's name, type, and coordinates (x, y, z). These coordinates are crucial for defining specific points, or nodes, within the cableway network. Each node is assigned a unique identifier, known as an "ID-Node," which is generated by combining its base name with a reference number. Additionally, the cableway type and building location are extracted and added to the dataset for better categorization.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 38 Figure 13: Data transformation Figure 14: Creation of Nodes table Basically, each line of the previous Figure 13 is transformed into 4 points that are identified with the same base name but with the addition of “#” at the end plus the digit that identifies the base. Each point within the node base (i.e. within the node) has an identifier added to it. This identifies the node name, the node base (to know to which node the point belongs) and also the cableway base (to know to which tray the node belongs). This can be easily seen in Figure 14 with the columns “ID- Node”, “Base-Node” and “Base-Cableway”. After generating the nodes, the program checks for any missing data (NaN values) and removes these entries to maintain a clean and accurate dataset. This thorough cleaning and preparation of the data ensure that the information is accurate, well-organized, and ready for use in the cable routing process. The final, cleaned dataset is then saved as an Excel file, providing a robust foundation for the subsequent steps in the routing algorithm, which will involve detailed analysis and visualization of the cableway network.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 39 Figure 15: Display A more detailed explanation can be consulted in Annex 1: Python Code detailed explanation (Start), where the code is explained line by line. 3.2. Display and Data Selection: Interactive Interface for Data Filtering This section introduces the creation of an interactive display interface using `ipywidgets` to facilitate the selection and filtering of data within a cable routing system. The goal is to provide users with a convenient and efficient way to interact with the data related to cableways and buildings. The process begins by extracting unique values from the dataset, specifically the different types of cableways and the buildings associated with them. These unique values are then used to create interactive checkboxes. Users can select individual cableway types and building options or use the "Select All" checkboxes to make selections quickly. The interface includes functionality to ensure that when a user selects or deselects the "Select All" checkbox, all related checkboxes are either checked or unchecked accordingly. This feature enhances user control and streamlines the selection process. Additionally, the interface provides a submit button, which, when clicked, displays the user's selections for both cableway types and buildings. This immediate feedback allows users to confirm their choices before proceeding with further data processing. The interactive elements, including the checkboxes and submit button, are arranged vertically to create a user-friendly layout. This structured approach ensures that the interface is both intuitive and accessible, enabling users to filter and interact with the cable and building data efficiently. It can be seen in Figure 15 how is going to be the display and the options you are going to be able to filter (Type of cables and buildings). In next chapter its going to be more explanation on this. A more detailed explanation can be consulted looking at Annex 2: Python Code detailed explanation (Display), where the code is going to be explained line by line.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 40 3.3. Cableway and Device Coordinates List (Nodes) This section of the code is dedicated to processing and organizing the data related to cableways and devices within a project. The primary objective here is to filter, extract, and combine information about cableways and device coordinates, preparing it for subsequent analysis and use in routing calculations. Filtering Cableway Nodes The first step involves filtering the cableway nodes based on specific criteria selected by the user, such as cableway type and building location. This filtering ensures that only the relevant data is retained for further processing. The selected options are applied to the CableWayNodes DataFrame, resulting in a subset of nodes that meet the user's specified conditions. This filtered data is crucial for focusing the analysis on the parts of the project that have been selected. Compiling the Cable List Next, the code gathers and consolidates all the available cable routing information. It reads Excel files from a designated directory, each containing different parts of the routing data, and merges them into a single comprehensive DataFrame. This consolidated cable list provides a complete overview of the routing paths, which is essential for understanding how devices are interconnected within the system. Processing Device Coordinates The code then shifts focus to the devices themselves, specifically extracting their 3D coordinates (X, Y, Z) from the provided data. These coordinates are initially stored in a string format and need to be parsed and converted into numerical values. The conversion is followed by organizing the data into a structured format, where each device's coordinates are clearly defined and ready for further use. Integrating Cableways and Devices Once the device coordinates are properly formatted and the cableway nodes are filtered, the code proceeds to rename and reorganize the device data to ensure consistency with the cableway nodes. This step involves standardizing column names and formats so that both cableway and device data can be seamlessly integrated. Final Combination and Output In the final steps, the code combines the filtered cableway nodes and the processed device nodes into a single, unified DataFrame. This combined dataset represents all the key nodes—both from cableways and devices—that will be used in the upcoming stages of the project, such as routing and network analysis. The data is then saved to an Excel file, ensuring that it is readily accessible for further operations.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 47 Figure 21: UGJ cableway recreation vs UGJ cableway design (from Navis 3D)
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 48 3.5. Data unification Combining various dataframes with information about nodes and edges that are the essential factors in building a network of connections is what we will be focusing on this part. It starts with merging two important node data types (`CableWayNodesFiltered` and `DeviceNodes`) to form the unified dataframe for nodes, which we would call it as Nodes. This final dataframe contains all the nodes present in network of which each node is identified with unique `ID-Node`. Those cords are then stored in an Excel file, as a reference for later. After the uniting of nodes, it should handle the edges which represent a connection between these nodes. Other edge dataframes for different types of connections are loaded and combined as a dataframe named Edges. The code makes sure that all such entries are unique by removing connections, which have same start and end points. It also saves the last edges dataframe (connections and distances from nodes) as Excel file. This unified nodes and edges framework provides the basis for additional analysis and visualization of how different parts are interconnected within this network. A more detailed explanation can be consulted looking at Annex 5: Python Code detailed (Excel list unification), where the code is going to be explained line by line. 3.6. Dijkstra Graph visualization In this section, the goal is to visually represent the network of connections between nodes using a graph. The process begins by initializing a graph structure, which serves as the foundation for mapping out the relationships between different points in the network. First, all the nodes from the previously unified “Nodes” dataframe are added to the graph. Each node represents a specific point in the network, identified by a unique ID. Once the nodes are in place, the connections between them, or edges, are added. These edges come from the “Edges” dataframe, where each connection is defined by a start node, an end node, and a weight, which in this context represents the distance between the nodes. With the nodes and edges in place, the graph is drawn using a spring layout, which positions the nodes in a way that visually balances the network. The edges are also annotated with their respective weights, helping to illustrate each connection. The nodes are displayed in a sky-blue color, and the labels are shown with bold, small text to ensure clarity despite the potentially large number of nodes.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 49 = Figure 22: Dijkstra graph (left from python, right conceptual) Finally, the graph is displayed (see Figure 22 as an example), provide a visual overview of the network and making it easier to understand the relationships and distances between different nodes in the system. This graphical representation is a powerful tool for analyzing the structure and connectivity of the network. In the Figure 22 above, the graph of the UGY building is shown on the left side and it is easy to see that the graph is complicated due to the large number of paths (edges) that are calculated. That is why a conceptual graph is placed on the right side so as not to forget that the idea remains the same, although in reality it is much more complex. A more detailed explanation can be consulted looking at Annex 6: Python Code detailed (Graph creation), where the code is going to be explained line by line. 3.7. Djikstra Algorithm In this section, we focus on constructing and analyzing a directed graph that represents a network of nodes and connections, specifically tailored for an industrial cableway routing scenario. The goal is to model the network using graph theory and apply algorithms to find the most efficient paths between various points within the network. First, the script initializes the graph structure using the NetworkX library, which is a powerful tool for creating and manipulating complex networks. The graph in this case is directed, meaning that the connections (or edges) between nodes have a specific direction, which is crucial for accurately modeling the flow of cables from one point to another in a real-world installation. The script begins by verifying the availability of the nodes and edges, which are essential components of the graph. Nodes represent the specific points or locations in the network, and edges represent
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 50 the connections between these points, along with associated distances. This verification ensures that the data is correctly loaded and ready for further processing. Once the nodes and edges are confirmed, they are added to the graph. The nodes are added individually, ensuring each unique identifier is represented in the network. Following this, edges are added to the graph, each accompanied by a weight representing the distance between the connected nodes. This weighted structure is vital for the pathfinding algorithms that will be applied later. To find the most efficient path between two points, the script includes a custom implementation of Dijkstra's algorithm, a well-known algorithm used for finding the shortest paths in a graph. This implementation not only calculates the shortest path but also provides real-time feedback on the progress of the search. If a path is found between the source and target nodes, the script returns the path and its total distance. If no path exists, it informs the user accordingly. The script also includes user interaction, where the user is prompted to specify the origin and destination nodes. The script checks whether these nodes exist in the graph and proceeds to find the shortest path between them. If the nodes are valid, the shortest path and the total distance are displayed. If not, the user is notified that the path cannot be determined due to missing nodes. This process leverages graph theory and pathfinding algorithms to model and analyze the cableway network efficiently, providing valuable insights into the most effective routing paths within the network. A more detailed explanation can be consulted looking at Annex 7: Python Code detailed (Djikstra Algorithm), where the code is going to be explained line by line. 3.8. Final Output After using the Dijkstra algorithm, it will create a summary table of the routing. This table represents a detailed path analysis within a cableway network showing which nodes have been used to connect both devices. Here's a breakdown of what each column represents: - Start: This column indicates the starting node of the connection. It is the initial point from where the path begins in the cableway network. - End: This column represents the ending node of the connection. It is the final destination point in the path within the cableway network. - Distance: This column shows the total distance between the Start and End nodes. The distance is measured in some unit (likely meters or another relevant measurement), indicating the total length of the path. - Tramo_1 to Tramo_XX: These columns list the intermediate nodes that make up the path from the Start node to the End node. Each "Tramo" represents the Node that have been used and it sum the length of the edge. The sequence of tramos shows the exact route the cable takes as it moves from the Start node to the End node. The numbers in the "Tramo" or
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 51 section columns suggest that the path is broken down into multiple sections, with each section representing a transition from one point to the next along the route. There will be as many section columns as needed. Table 8: Final result of a routed cable (Nodes) All that has been said can be seen in Table 8 which is an example of the final result (For a better visualization the table has been transposed but in the program the table is horizontal). In this particular example: - The path starts at node “10BBT41GS001” (In this case it is a servomotor) - It ends at node “10BBT10” (General electrical panel where it is connected) - The total distance between these two nodes (devices) is 22.68 units. - The path includes 10 intermediate nodes (Tramo_1 to Tramo_10), each representing a step in the journey from Start to End. These nodes are listed sequentially, illustrating the complete route the cable would follow within the network. This table is useful for understanding how a cable is routed through various points within a network and provides a clear breakdown of each step along the way, ensuring accurate and efficient cable management. A more detailed explanation can be consulted looking at Annex 8: Python Code detailed (Final Output), where the code is going to be explained line by line. Due to all the points in Table 8 of the routing have the same cableway base (which means that all are from the same cableways that all are from the same cableway), in next page Table 9 can be seen the simplified version of Table 8.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 52 Without Labels With Labels Figure 23: Specific routing visualization (with and without labels) Table 9: Final result of a routed cable (Cableways) Knowing the path that the program has calculated, you can recreate that path using the Node lists and represent the path you have selected as shown in Figure 23. In this figure, the same path is plotted as shown in Table 8 above. In this section, the focus is on recreating and visualizing the path of a routed cable using data stored in an Excel file. The process starts by loading this data, which represents the routing path, into a pandas DataFrame. From this data, the relevant information about the path is selected, and the DataFrame is transposed to make the data easier to work with. The next step involves extracting the 3D coordinates (x, y, z) for each node in the path. These coordinates are crucial for plotting the route in a 3D space. To achieve this, a function is defined to look up the coordinates for each node based on its unique identifier (ID-Node). The function is applied across the DataFrame, populating new columns with the corresponding x, y, and z values. Once the coordinates are obtained, any rows with missing values are removed to ensure that the dataset is clean and accurate. Additionally, the order of the nodes is adjusted slightly to ensure that the path is represented correctly when plotted.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 53 Finally, the 3D path is visualized using the matplotlib library. The coordinates are plotted in a 3D space, and each node in the path is labeled with its identifier. The plot provides a clear visual representation of how the cable is routed through the space, offering valuable insights into the structure and flow of the cable network. This process not only helps in understanding the routing of cables within a complex system but also serves as a powerful tool for verifying and analyzing the physical layout of the cable network. Once we have the list of routings, we have the hard work done. In IDOM we have an excel with macros that then performs all the cable calculations taking into account the characteristics. And then we also have another excel with a macro that knowing the diameters of the cables and the widths and sections of the trays and ducts, tells us how full the trays are. This part has not been done in the code since both excels are very complete and work perfectly, the problem of routing was not these excels, but the fact of routing itself. 3.9. Conclusions from the Code This chapter provides a good overview of the Python code developed to automate the process of cable routing in complex industrial installations where you can consult the different annexes for a more detailed explanation of the code. By leveraging the Google Colab platform, the project benefits from an easy-to-use environment with enhanced computational resources, especially when accessed through a UPC email. The integration with Google Drive allowed seamless access to documents and the ability to work from multiple devices without relying on a single personal machine. The Code starts by detailing the initial data processing and setup, which involved consolidating and cleaning data from various Excel files related to cableways, routing lists, and device coordinates. This process includes filtering out irrelevant data, standardizing the dataset, and preparing it for further analysis. The cleaned and organized data formed a solid foundation for subsequent routing calculations, ensuring accuracy and efficiency in the cable routing process. A display is introduced to facilitate data selection and filtering, allowing users to easily interact with and refine the dataset before applying more complex algorithms. This user-friendly interface proved crucial in streamlining the selection process and ensuring that only relevant data was processed in the later stages. The coding chapter also delved into the detailed processing of cableway and device coordinates, where the data was filtered, extracted, and combined into a unified dataset. This dataset, which
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 54 included crucial information about each node's location and type, was essential for defining the connections within the cableway network. The nodes and edges were carefully calculated and represented, with different types of connections being visualized using 3D plotting techniques. These visualizations provided clear insights into the structure and connectivity of the network, highlighting how different parts of the system are linked. The final part of the chapter focused on using graph theory and the Dijkstra algorithm to model the network and identify the most efficient paths between nodes. The algorithm was applied to a directed graph, representing the cableway system, to determine the shortest paths and analyze the overall network structure. The results were summarized in a detailed table, providing a clear breakdown of the routing paths, including the start and end nodes, the total distance, and the intermediate steps. In conclusion, this chapter has successfully demonstrated the development and application of a Python-based solution for automating cable routing in industrial installations. Through careful data preparation, interactive tools, advanced algorithms, and visualizations, the code offers a powerful tool for managing and optimizing cableway networks. The structured approach ensures that the system is not only efficient but also adaptable to complex industrial environments, providing accurate and reliable results for cable management and routing. For a more in-depth understanding, detailed explanations of the code can be found in the annexes, where each step is broken down and analyzed. After checking some results with the Siemens cable list (Annex 10: Siemens Cable List), I detected that some of the routings that were done were wrong or not quite optimal. And it also helped me to identify which cable trays were wrongly coded or designed from the NAVIS 3D program. 4. Cost savings for the company when using the tool When routing is done manually, as described in the introductory chapters (using plans and 3D viewers to identify and mark different sections), the process is time-consuming and prone to delays. If we estimate 10 minutes per cable and assume an 8-hour workday, routing 6.000 cables would require approximately 60.000 minutes of work. However, since designs are rarely perfect, we must factor in an additional 30% of time for potential redesigns and modifications. With these adjustments, routing 6.000 cables would take approximately 60.300 minutes, or 1.300 hours— equivalent to 163 working days. Typically, routing work is performed by a Junior Engineer, although a Senior Engineer may be required to address more complex circuits. Given that Junior Engineers have an hourly rate of 30 euros and Senior Engineers 60 euros, a blended rate of 40 euros per hour is a reasonable estimate. Multiplying the total hours by this rate, the cost of the project would be approximately 52.000 euros.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 55 Table 10: Final result of a routed cable (Nodes) In Table 10 compares this scenario with an automated approach using the python code. If we assume the software takes 30 seconds per cable and all other variables remain constant (including the 30% time increment for future modifications), the entire job would take only 50 hours instead of 1.300. This is equal to just 6 working days and a cost of around 2.000 euros. This represents a 50,000-euro difference between the two strategies. It's important to note that these calculations focus only on direct costs, excluding any training or development time for the tool, rentals and computers. However, even without considering indirect costs, the potential savings are substantial. All the results discussed so far can be seen in Table 10. Ultimately, how does this tool add real value to companies? The answer lies in efficiency. Cable routing, while necessary, does not add significant value and consumes time. With this tool, instead of needing three engineers for routing, only one person is required, leaving the other two to contribute to other areas or even different projects. This boost in productivity and efficiency means that the savings extend beyond the direct cost difference between the two scenarios presented in Table 10. It also encompasses the opportunity cost of other tasks that could be completed instead of manual routing.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 56 5. Future projects and improvements As we look towards the future, there are several exciting opportunities to explore the work that has been done in this project. The development of a comprehensive cable routing tool is just the beginning, and there are numerous ways to further improve its functionality, efficiency, and applicability. Here are some key areas where future projects and improvements could be focused: AI-Driven Optimization The current routing tool relies on established algorithms like Dijkstra's to determine the shortest paths for cable routing. However, there is significant potential to enhance these capabilities through AI and machine learning. Future versions of the tool could incorporate AI-driven optimization techniques that not only find the shortest path but also consider factors like cable load balancing, electromagnetic interference, and future scalability. This would result in more robust and intelligent routing decisions that adapt to the specific needs of each project. As it has been said before, once we obtain the list of routes, the most complicated work is already done. At IDOM we have an Excel file that, thanks to its macros, performs all the necessary calculations for the cabling, taking into account the specific characteristics. In addition, we have another Excel file with a macro that, based on the diameters of the cables and the dimensions of the trays and ducts, indicates the occupancy level of the trays. This part has not been implemented in the code because both Excels are very complete and work perfectly. The real challenge was not in these files, but in the routing process itself. Integrating the macros into the existing code would already be a very advanced step, since it would perform the adjustments and calculations automatically. More Integration with BIM Platforms Building Information Modeling (BIM) is becoming increasingly integral to the design and construction industries. In the 2 years that I have worked at IDOM, I have seen that large industrial and energy projects always have a 3D model of the plant as it facilitates the understanding of the project and is a tool that serves both engineers and managers. This project needs BIM software (in our case NAVIS 3D), so if the designed model is wrong, the routing will be wrong. This can help to improve the 3D models by error detection. While this project has laid the groundwork for automating cable routing, future efforts could focus on deeper integration with BIM platforms. This would allow for real-time updates and synchronization between the routing tool and the overall building model, ensuring that changes in one area are immediately reflected across all related systems. Cloud-Based Collaboration and Real-Time Data Sharing As projects become more complex and geographically dispersed, the need for cloud-based solutions grows. A cloud-based version of the routing tool would enable multiple users to collaborate in realtime, regardless of their physical location. This would facilitate better communication between team
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 63 The adaptability of the tool is also reflected in its potential for integration with other software systems and platforms. As mentioned earlier, integration with BIM platforms like NAVIS 3D ensures that the tool remains relevant in environments where digital modeling and design are integral to the project workflow. This flexibility makes the tool a valuable asset not just for the immediate project at hand but for future projects as well. While the project has achieved significant goals, it is also important to acknowledge the challenges and limitations encountered. One of the primary challenges was ensuring that the routing algorithm could handle the complexity of real-world industrial installations, which often involve a more constraints and variables. The project addressed this challenge by carefully designing the input data structures and developing robust filtering and validation mechanisms. Another limitation is the reliance on accurate 3D models and data. The effectiveness of the tool is contingent upon the quality of the input data; any inaccuracies in the 3D models or coordinate data could lead to suboptimal routing results. This underscores the importance of maintaining high data standards and ensuring that all input data is thoroughly vetted before being used in the routing process. This can help to find errors in 3D models but at the same time can delay or generate errors in the code. The 3D model should be as good as possible. The project has laid a strong foundation, but there is still a big room to explore. As discussed in the Future Projects and Improvements chapter, integrating AI-driven optimization techniques could significantly enhance the tool’s capabilities, allowing it to make more intelligent routing decisions that consider a wider range of factors. This could include optimizing for cable load balancing, minimizing electromagnetic interference, or planning for future scalability. Further, the integration of conflict detection and resolution problems would add another layer of functionality, ensuring that the routing paths are not only efficient but also free from potential conflicts with other systems. This would be particularly valuable in environments where multiple systems need to coexist in close proximity. At IDOM, we use an Excel file equipped with macros that handle all the necessary cabling calculations, considering the specific characteristics of each cable. Additionally, we have another Excel file with a macro that calculates the occupancy level of trays and ducts based on the diameters of the cables and the dimensions of the trays. These Excel tools are comprehensive and function effectively, so this functionality was not replicated in the Python code. The main challenge we addressed was the cable routing process itself, which required a more advanced and automated approach, but introducing this macros functions inside the code would be great.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 64 Finally, expanding the tool’s capabilities to include cost analysis and reporting features would provide project managers with deeper insights into the financial implications of different routing strategies. This would enable more informed decision-making and help to ensure that projects stay within budget. The development of this tool represents a step forward for the routing task in future engineering and construction industry projects that I will participate in my current job. As industries continue to embrace digital transformation, tools like the one developed in this project will become increasingly important in maintaining competitiveness and driving innovation. This program works with Python and Excel, and does not require external programs that are expensive, inflexible and not very dynamic. Only the coordinates from the BIM program (NAVIS 3D). The potential for this tool to be adapted and expanded means that its impact could extend far beyond the immediate project for which it was developed. As other companies and industries recognize the benefits of automation, the methodologies and principles established here could serve as a model for similar initiatives in other areas of engineering and construction. In conclusion, this project has successfully demonstrated the value of automating the cable routing process using Python. Through careful planning, robust data management, and the application of advanced algorithms, the project has delivered a tool that is both practical and powerful. While there are still opportunities for further development, the work completed thus far provides a strong foundation for future innovation. As the industry continues to evolve, the lessons learned and the advancements made in this project will serve as a valuable resource for future endeavors, ensuring that the benefits of automation are fully realized in all aspects of industrial engineering and construction.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 65 9. Bibliography Books: [1] Lutz, M. (2013). Learning Python. 5th Edition. O'Reilly Media. A comprehensive book that covers Python programming from the basics to more advanced topics, making it an excellent resource for both beginners and experienced programmers. [2] McKinney, W. (2017). Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. 2nd Edition. O'Reilly Media. Focuses on data analysis in Python, providing in-depth coverage of the Pandas library and other data manipulation tools. [3] Beazley, D., & Jones, B. K. (2013). Python Cookbook: Recipes for Mastering Python 3. 3rd Edition. O'Reilly Media. A collection of Python programming "recipes" for common tasks, offering practical examples and solutions for various coding challenges. Websites: [4] Python Software Foundation. (n.d.). The Python Tutorial. Python.org. Retrieved from https://docs.python.org/3/tutorial/ The official Python documentation, providing a thorough tutorial on Python programming. [5] Real Python. (n.d.). Python Tutorials. Retrieved from https://realpython.com/ A website offering a wide range of tutorials and articles on Python programming, suitable for all skill levels. [6] DataCamp. (n.d.). Dijkstra's Algorithm in Python. Retrieved from https://www.datacamp.com/tutorial/dijkstra-algorithm-in-python A tutorial that explains the implementation of Dijkstra's algorithm in Python, which is relevant to this project. Other Sources: [7] NS Energy. (n.d.). Grudziądz Combined Cycle Gas Turbine Power Plant. Retrieved from https://www.nsenergybusiness.com/projects/grudziadz-combined-cycle-gas-turbine-power- plant/?cf-view An article providing details about the Grudziądz Combined Cycle Gas Turbine (CCGT) power plant project.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 66
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 67 10. Annexes Annex 1: Python Code detailed explanation (Start) This part of the code is all about getting things ready to analyze and manipulate the data related to the cableways in the project. Cableways are the paths or conduits through which cables run in an industrial installation, and understanding their layout is crucial for effective cable routing. The code begins by connecting to Google Drive, which is where all the data files are stored. This is essential because the program needs access to several Excel files that contain the coordinates and other details of the cableways. from google.colab import drive drive.mount('/content/drive') After mounting the Google Drive, the code defines the paths to the directories where different sets of data. This code is all about preparing and cleaning data related to cableway coordinates in an industrial setting, specifically focusing on the nodes (or key points) within the cableway network. Let’s walk through what each part of the code does: First, the environment is set up by mounting Google Drive, where all the necessary files are stored. These files contain the coordinates of various cableways, routing lists, and device coordinates. This setup is essential for accessing the data files throughout the process. from google.colab import drive drive.mount('/content/drive') Next, three directories are defined. These directories point to the locations where the relevant Excel files are stored. The first directory contains files with cableway coordinates, the second holds the routing list, and the third contains device coordinates. # Folder where there are all the excles with the cableways coordinates directory1 = r'/content/drive/MyDrive/TFM/CABLEWAY-ERIKA-2' # directory1 = r'C:\Users\carle\Desktop\CASE\TFM\CABLEWAY-ERIKA-2' # Folder where there is Routing List directory2 = r'/content/drive/MyDrive/TFM/EXCELS/CoordenatesFolder/RoutingFile' #directory2 = r'C:\Users\carle\Desktop\CASE\TFM\Coordenates Folder\RoutingFile' # Folder where there are the coordinates of the devices directory3 = r'/content/drive/MyDrive/TFM/EXCELS/CoordenatesFolder/Devices' #directory3 = r'C:\Users\carle\Desktop\CASE\TFM\Coordenates Folder\Devices' The next task is to unify the data from all the Excel files within the first directory. The code lists all files in the directory, reads each Excel file, and appends the data to a list of DataFrames. These DataFrames are then concatenated into a single, cohesive DataFrame.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 68 import os import pandas as pd !pip install openpyxl # List all files in the directory files = os.listdir(directory1) # Initialize an empty list to store dataframes dfs = [] # Iterate through each file for file in files: # Check if file is Excel file if file.endswith(".xlsx") or file.endswith(".xls"): # Read Excel file and append to list of dataframes df = pd.read_excel(os.path.join(directory1, file)) dfs.append(df) # Concatenate all dataframes into a single dataframe CableWayCoordinates1_df = pd.concat(dfs, ignore_index=True) To ensure the data is clean and relevant, certain rows are filtered out based on their type. Rows where the type is "TUBI," "PIPE," "ZONE," or "AIDGRO" are excluded, as these are not pertinent to the cableway routing process. # Filter out rows where Type is equal to "TUBI" CableWayCoordinates1_df = CableWayCoordinates1_df[CableWayCoordinates1_df['Type'] != 'TUBI'] CableWayCoordinates1_df = CableWayCoordinates1_df[CableWayCoordinates1_df['Type'] != 'PIPE'] CableWayCoordinates1_df = CableWayCoordinates1_df[CableWayCoordinates1_df['Type'] != 'ZONE'] CableWayCoordinates1_df = CableWayCoordinates1_df[CableWayCoordinates1_df['Type'] != 'AIDGRO'] CableWayCoordinates1_df.head(1000000) After filtering, the cleaned DataFrame is saved as an Excel file. This file will be used in subsequent steps. # Definir la ruta completa con el nombre del archivo y la extensión .xlsx dataframes_excel_file_path_CableWayNodes = r'/content/drive/MyDrive/TFM/EXCELS/CoordenatesFolder/CableWayCoordinates1.xlsx' # Guardar el DataFrame como un archivo Excel CableWayCoordinates1_df.to_excel(dataframes_excel_file_path_CableWayNodes, index=False) The code then proceeds to standardize the data further. It renames columns for clarity and removes any "mm" suffixes from coordinate values, converting them from millimeters to meters. This step also involves rounding the values to two decimal places for consistency. # Dictionary to map old column names to new column names column_mapping = { 'P1EAST WRT /*': 'XP1', 'P2EAST WRT /*': 'XP2', 'P3EAST WRT /*': 'XP3', 'P4EAST WRT /*': 'XP4', 'P1NORTH WRT /*': 'YP1',
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 69 'P2NORTH WRT /*': 'YP2', 'P3NORTH WRT /*': 'YP3', 'P4NORTH WRT /*': 'YP4', 'P1UP WRT /*': 'ZP1', 'P2UP WRT /*': 'ZP2', 'P3UP WRT /*': 'ZP3', 'P4UP WRT /*': 'ZP4' } # Rename columns using the mapping CableWayCoordinates2_df = CableWayCoordinates1_df.rename(columns=column_mapping) # Remove "mm" suffix from each cell and convert to number CableWayCoordinates2_df[['XP1', 'XP2', 'XP3', 'XP4', 'YP1', 'YP2', 'YP3', 'YP4', 'ZP1', 'ZP2', 'ZP3', 'ZP4']] = CableWayCoordinates2_df[['XP1', 'XP2', 'XP3', 'XP4', 'YP1', 'YP2', 'YP3', 'YP4', 'ZP1', 'ZP2', 'ZP3', 'ZP4']].replace('mm', '', regex=True).apply(pd.to_numeric) # Divide by 1000 CableWayCoordinates2_df[['XP1', 'XP2', 'XP3', 'XP4', 'YP1', 'YP2', 'YP3', 'YP4', 'ZP1', 'ZP2', 'ZP3', 'ZP4']] /= 1000 # Round to 2 decimal places CableWayCoordinates2_df = CableWayCoordinates2_df.round(2) To ensure the data is clean, any NaN values are replaced with 0, and the 'Name' column is modified to include an index number, making each entry unique. The code also performs a series of string replacements to further clean and standardize the 'Name' values. # Replace NaN values with 0 CableWayCoordinates2_df = CableWayCoordinates2_df.fillna(0) # Adding the index number with '#' to the 'Name' column CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'] + '#' + CableWayCoordinates2_df.index.astype(str) # Replacements to clean the data CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('/-', '/', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('/NUEVA_', '/', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('NUEVA_', '/', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('-0', '/0', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('161_', '/161_', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('162_', '/162_', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('163_', '/163_', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('164_', '/164_', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('Copy-of/', '/', regex=False)
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 70 CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('000', '00', regex=False) CableWayCoordinates2_df['Name'] = CableWayCoordinates2_df['Name'].str.replace('//', '/', regex=False) Next, the program extracts the base code from the 'Name' column using a custom function, sorts the data alphabetically by this base code, and counts the number of coordinate points (nºPoints) for each entry. # Function to extract the code of the cable way from the 'Name' column def extract_cableway_code(name): if name[0].isdigit(): return name else: return name.split('/', 1)[-1] # Applying the function to the 'Name' column CableWayCoordinates2_df['Base'] = CableWayCoordinates2_df['Name'].apply(extract_cableway_code) # Sorting by the 'Name' column alphabetically CableWayCoordinates2_df = CableWayCoordinates2_df.sort_values(by='Base').reset_index(drop=True) # Count the number of NaN values in XP1, XP2, XP3, XP4 columns and store in 'nºPoints' CableWayCoordinates2_df['nºPoints'] = 4 - CableWayCoordinates2_df[['XP1', 'XP2', 'XP3', 'XP4']].isna().sum(axis=1) # Reordering the data CableWayCoordinates2_df = CableWayCoordinates2 _df[['Name', 'Type', 'XP1', 'XP2', 'XP3', 'XP4', 'YP1', 'YP2', 'YP3', 'YP4', 'ZP1', 'ZP2', 'ZP3', 'ZP4', 'Base', 'nºPoints']] The code then creates a new DataFrame, `CableWayCoordinates3_df`, where it flattens the columns containing the x, y, and z coordinates into single columns, creating nodes. These nodes are vital for representing specific points in the cableway network. # Creating CableWayCoordinates3_df dataframe CableWayCoordinates3_df = pd.DataFrame() # Adding columns Name and Type with the same values as CableWayCoordinates2_df CableWayCoordinates3_df['Name'] = CableWayCoordinates2_df['Base'].repeat(4).reset_index(drop=True) CableWayCoordinates3_df['Type'] = CableWayCoordinates2_df['Type'].repeat(4).reset_index(drop=True) # Adding column x by compiling values from x_columns CableWayCoordinates3_df['x'] = CableWayCoordinates2_df[x_columns].values.flatten() # Adding column y by compiling values from y_columns CableWayCoordinates3_df['y'] = CableWayCoordinates2_df[y_columns].values.flatten() # Adding column z by compiling values from z_columns CableWayCoordinates3_df['z'] = CableWayCoordinates2_df[z_columns].values.flatten()
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 71 Any rows where all x, y, and z coordinates are zero are removed, as they do not represent valid points in the network. The nodes are then assigned a reference number and a unique identifier (ID-Node), which combines the base code with this reference number. The cableway type and building information are also added for further categorization. # Removing rows where x = y = z = 0 CableWayCoordinates3_df = CableWayCoordinates3_df[~((CableWayCoordinates3_df['x'] == 0) & (CableWayCoordinates3_df['y'] == 0) & (CableWayCoordinates3_df['z'] == 0))].reset_index(drop=True) # Adding a new column 'REF' based on the given condition CableWayCoordinates3_df['REF'] = 1 ref_count = 1 for i in range(1, len(CableWayCoordinates3_df)): if CableWayCoordinates3_df.iloc[i]['Name'] == CableWayCoordinates3_df.iloc[i - 1]['Name']: ref_count += 1 else: ref_count = 1 CableWayCoordinates3_df.at[i, 'REF'] = ref_count # Function to extract the code of the cable way from the 'Name' column def extract_cableway_code(name): if name[0].isdigit(): return name else: return name.split('/', 1)[-1] # Applying the function to the 'Base-Node' column CableWayCoordinates3_df['Base-Node'] = CableWayCoordinates3_df['Name'].apply(extract_cableway_code) # Concatenating 'Name' and 'REF' columns with '#' CableWayCoordinates3_df['ID-Node'] = CableWayCoordinates3_df['Base-Node'] + '.' + CableWayCoordinates3_df['REF'].astype(str) # Extracting the cableway type from the 'Name' column CableWayCoordinates3_df['CableWayType'] = CableWayCoordinates3_df['ID- Node'].str.extract(r'_([A-Za-z0-9]+)[/\\]').iloc[:, 0] # Add Building column CableWayCoordinates3_df['Building'] = CableWayCoordinates3_df['ID- Node'].str.split('#').str[0].str.split('_').str[1] Finally, the code reorders the columns in the DataFrame for better organization and checks for any missing values (NaN). Any rows with missing values are removed to ensure the dataset is clean and reliable. The cleaned DataFrame is then saved as an Excel file for use in the next stages of the project. # Reordering the data CableWayCoordinates3_df = CableWayCoordinates3_df[['ID-Node', 'Type', 'CableWayType', 'x', 'y', 'z', 'Base-Node', 'Building']]
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 72 # Assigning 'Base-CableWay' column with the text from 'Base' up to the first occurrence of '#' CableWayCoordinates3_df['Base-CableWay'] = CableWayCoordinates3_df['Base- Node'].str.split('#').str[0] # Reordering the data CableWayCoordinates3_df = CableWayCoordinates3_df[['ID-Node', 'Type', 'CableWayType', 'x', 'y', 'z', 'Base-Node','Base-CableWay', 'Building']] # Displaying the new dataframe CableWayCoordinates3_df.head(10000000) CableWayNodes = CableWayCoordinates3_df # Displaying the new dataframe CableWayNodes.head(1000000) In the final part, the code identifies any rows with NaN values, displays them for review, and then removes them. This step ensures that the dataset is clean and complete, ready for further analysis or processing. # Display rows with NaN values in any column nan_rows = CableWayNodes[CableWayNodes.isna().any(axis=1)] # Display the DataFrame with NaN values nan_rows After cleaning up the data, the final DataFrame is saved to an Excel file, which can be used in the subsequent steps of the project. # Remove rows with NaN values in any column CableWayNodes = CableWayNodes.dropna() # Guardar el DataFrame como un archivo Excel # dataframes_excel_file_path = r'C:\Users\carle\Desktop\CASE\TFM\CODE2\DataframesFromCode2\CableWayNodes1.xlsx' dataframes_excel_file_path_CableWayNodes = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/CableWayNodes.xlsx' CableWayNodes.to_excel(dataframes_excel_file_path_CableWayNodes, index=False) # Display the cleaned DataFrame CableWayNodes.head() This entire process prepares the cableway data for use in routing algorithms and other analyses, ensuring that the data is clean, standardized, and ready for further use.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 79 edge_info = { 'Start': row_device1['ID-Node'], 'Type0': row_device1['Type'], 'CableWayType0': row_device1['CableWayType'], 'x0': row_device1['x'], 'y0': row_device1['y'], 'z0': row_device1['z'], 'End': row_device2['ID-Node'], 'Type1': row_device2['Type'], 'CableWayType1': row_device2['CableWayType'], 'x1': row_device2['x'], 'y1': row_device2['y'], 'z1': row_device2['z'], 'Distance': distance, 'BaseN0': row_device1['Base-Node'], 'BaseN1': row_device2['Base-Node'], 'BaseCW0': row_device1['Base-CableWay'], 'BaseCW1': row_device2['Base-CableWay'] } edges.append(edge_info) After all pairs of nodes have been processed, we convert the “Edges” list into a DataFrame for easier handling and further analysis. # Create CableWayEdges dataframe CableWayEdgesSameBase1 = pd.DataFrame(edges) To add more context, we extract the building information from the start and end nodes and add these as new columns in the DataFrame. # Add Building Columns CableWayEdgesSameBase1['Building0'] = CableWayEdgesSameBase1['Start'].str.split('#').str[0].str.split('_').str[1] CableWayEdgesSameBase1['Building1'] = CableWayEdgesSameBase1['End'].str.split('#').str[0].str.split('_').str[1] Finally, we save the DataFrame to an Excel file for documentation and display the first few rows to inspect the results. # Guardar el DataFrame como un archivo Excel dataframes_excel_file_path = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/CableWayEdgesSameBase1.x lsx' CableWayEdgesSameBase1.to_excel(dataframes_excel_file_path, index=False) # Display the first 10000000 rows of the dataframe CableWayEdgesSameBase1.head(10000000) Next, we filter out the edges where the distance between nodes is less than 3.1 meters and visualize these connections in a 3D plot.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 80 # Crear un nuevo DataFrame seleccionando solo las filas donde "Distance" sea < 3.1 CableWayEdgesType1 = CableWayEdgesSameBase1[CableWayEdgesSameBase1['Distance'] < 3.1] # Mostrar filas del nuevo DataFrame CableWayEdgesType1.head(100000) import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Crear figura fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # Graficar cada línea del dataframe for index, row in CableWayEdgesType1.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z) # Etiquetas de los ejes ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') # Mostrar gráfica plt.show() Type 2: Connections Between Different Elements In Type 2 calculations, we aim to identify connections between nodes that belong to the same base but are of different types. The process is quite similar to Type 1, but the key difference is that the nodes do not need to be of the same type. import pandas as pd import numpy as np # Initialize an empty list to store edge information edges = [] # Iterate over pairs of rows in CableWayNodesFiltered for i in range(len(CableWayNodesFiltered)): row_device1 = CableWayNodesFiltered.iloc[i] for j in range(i + 1, len(CableWayNodesFiltered)): # Adjusted loop range row_device2 = CableWayNodesFiltered.iloc[j] We skip any pair of nodes with the same `ID-Node`, as before, and check if they share the same base but have different types. # Skip calculation if both nodes have the same ID-Node if row_device1['ID-Node'] == row_device2['ID-Node']: continue # Do the calculation if both nodes have the same Base, Types are different, and don't have the same ID-Node
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 81 if row_device1['Base-CableWay'] == row_device2['Base-CableWay']: The distance is calculated similarly, and the connection information is stored in a dictionary, which is added to the “Edges” list. # Calculate distance distance = np.sqrt((row_device1['x'] - row_device2['x'])2 + (row_device1['y'] - row_device2['y'])2 + (row_device1['z'] - row_device2['z'])2).round(2) # Create edge information edge_info = { 'Start': row_device1['ID-Node'], 'Type0': row_device1['Type'], 'CableWayType0': row_device1['CableWayType'], 'x0': row_device1['x'], 'y0': row_device1['y'], 'z0': row_device1['z'], 'End': row_device2['ID-Node'], 'Type1': row_device2['Type'], 'CableWayType1': row_device2['CableWayType'], 'x1': row_device2['x'], 'y1': row_device2['y'], 'z1': row_device2['z'], 'Distance': distance, 'Base0': row_device1['Base-Node'], 'Base1': row_device2['Base-Node'], 'BaseCW0': row_device1['Base-CableWay'], 'BaseCW1': row_device2['Base-CableWay'] } edges.append(edge_info) The resulting connections are stored in a DataFrame, and we add building information just as in Type 1. The DataFrame is saved to an Excel file, and a filtered version is visualized based on a distance threshold. # Create CableWayEdges dataframe CableWayEdgesSameBase2 = pd.DataFrame(edges) # Add Building Columns CableWayEdgesSameBase2['Building0'] = CableWayEdgesSameBase2['Start'].str.split('#').str[0].str.split('_').str[1] CableWayEdgesSameBase2['Building1'] = Cable WayEdgesSameBase2['End'].str.split('#').str[0].str.split('_').str[1] # Guardar el DataFrame como un archivo Excel # dataframes_excel_file_path = r'C:\Users\carle\Desktop\CASE\TFM\CODE2\DataframesFromCode2\CableWayEdgesSameBase.xlsx' dataframes_excel_file_path = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/CableWayEdgesSameBase2.x lsx' CableWayEdgesSameBase2.to_excel(dataframes_excel_file_path, index=False) CableWayEdgesSameBase2.head(10000000) # Ahora, seleccionar solo las filas donde la distancia es menor a x CableWayEdgesType2 = CableWayEdgesSameBase2[CableWayEdgesSameBase2['Distance'] < 0.2]
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 82 CableWayEdgesType2.head(10000000) A 3D plot is generated to visualize these connections. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Crear figura fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # Graficar cada línea del dataframe CableWayEdgesType1 en azul for index, row in CableWayEdgesType1.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='blue') # Graficar cada línea del dataframe CableWayEdgesType2 en rojo for index, row in CableWayEdgesType2.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='red') # Etiquetas de los ejes ax.set_xlabel('X') ax.set_ylabel('Y') ax.set zlabel('Z') # Mostrar gráfica plt.show() Type 3: Connections Between Different Cableways Type 3 calculations aim to identify connections between nodes that belong to different cableways but share similar characteristics or are close in space. The process is similar to the previous types, with the key difference being that the nodes belong to different bases. import pandas as pd import numpy as np # Initialize an empty list to store edge information edges = [] # Iterate over pairs of rows in CableWayNodesFiltered for i in range(len(CableWayNodesFiltered)): row_device1 = CableWayNodesFiltered.iloc[i] for j in range(i + 1, len(CableWayNodesFiltered)): # Adjusted loop range row_device2 = CableWayNodesFiltered.iloc[j] # Skip calculation if both nodes have the same ID-Node if row_device1['ID-Node'] == row_device2['ID-Node']: continue
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 83 # Condition for Calculation: Different base and at least one shared 3D coordinate if row_device1['Base-CableWay'] != row_device2['Base-CableWay'] and (row_device1['CableWayType']==row_device2['CableWayType']): The rest of the process follows the same pattern, including calculating distances, creating the connection information, and saving the results. # Calculate distance distance = np.sqrt((row_device1['x'] - row_device2['x'])2 + (row_device1['y'] - row_device2['y'])2 + (row_device1['z'] - row_device2['z'])2).round(2) # Create edge information edge_info = { 'Start': row_device1['ID-Node'], 'Type0': row_device1['Type'], 'CableWayType0': row_device1['CableWayType'], 'x0': row_device1['x'], 'y0': row_device1['y'], 'z0': row_device1['z'], 'End': row_device2['ID-Node'], 'Type1': row_device2['Type'], 'CableWayType1': row_device2['CableWayType'], 'x1': row_device2['x'], 'y1': row_device2['y'], 'z1': row_device2['z'], 'Distance': distance, 'BaseN0': row_device1['Base-Node'], 'BaseN1': row_device2['Base-Node'], 'BaseCW0': row_device1['Base-CableWay'], 'BaseCW1': row_device2['Base-CableWay'] } edges.append(edge_info) The final DataFrame is saved and visualized using 3D plotting to better understand these connections. # Create CableWayEdges dataframe CableWayEdgesSameBase3 = pd.DataFrame(edges) # Add Building Columns CableWayEdgesSameBase3['Building0'] = CableWayEdgesSameBase3['Start'].str.split('#').str[0].str.split('_').str[1] CableWayEdgesSameBase3['Building1'] = CableWayEdgesSameBase3['End'].str.split('#').str[0].str.split('_').str[1] # Guardar el DataFrame como un archivo Excel dataframes_excel_file_path = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/CableWayEdgesSameBase3.x lsx' CableWayEdgesSameBase3.to_excel(dataframes_excel_file_path, index=False) CableWayEdgesSameBase3.head(10000000) Type 4: Connecting Devices to Cableways Type 4 focuses on linking individual devices to the cableways they are connected to. This ensures that all devices are properly integrated into the overall cableway network. The process involves comparing each device node with every cableway node to find the closest connections.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 84 import pandas as pd import numpy as np # Initialize an empty list to store edge information edges = [] # Iterate over pairs of rows in CableWayNodesFiltered for i in range(len(DeviceNodes)): row_device1 = DeviceNodes.iloc[i] for j in range(i + 1, len(CableWayNodesFiltered)): # Adjusted loop range row_device2 = CableWayNodesFiltered.iloc[j] The key condition here is that one of the nodes must be a device, and the other must belong to a cableway. Once this condition is met, we calculate the distance and store the connection information. # Skip calculation if both nodes have the same ID-Node if row_device1['ID-Node'] == row_device2['ID-Node']: continue # Condition for Type 4: Different base and one of them is type "Device" if (row_device1['Type'] == "Device" or row_device2['Type'] == "Device") and (row_device1['CableWayType']==row_device2['CableWayType']): The results are saved to an Excel file, and the closest connections for each device are identified. # Create CableWayEdges dataframe CableWayEdgesSameBase4 = pd.DataFrame(edges) # Guardar el DataFrame como un archivo Excel dataframes_excel_file_path = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/CableWayEdgesSameBase4.x lsx' CableWayEdgesSameBase4.to_excel(dataframes_excel_file_path, index=False) CableWayEdgesSameBase4.head(10000000) # Select the rows with the smallest distance for each unique 'Start' CableWayEdgesType4 = CableWayEdgesSameBase4.loc[CableWayEdgesSameBase4.groupby('Start')['Distance'].idxmin()] CableWayEdgesType4.head(10000000) Finally, all the connections are visualized in a 3D plot, with different colors representing different types of edges. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Create figure fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # Plot each line from the CableWayEdgesType1 dataframe in blue for index, row in CableWayEdgesType1.iterrows():
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 85 x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0']] ax.plot(x, y, z, color='blue') # Plot each line from the CableWayEdgesType2 dataframe in red for index, row in CableWayEdgesType2.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0']] ax.plot(x, y, z, color='blue') # Plot each line from the CableWayEdgesType3 dataframe in orange for index, row in CableWayEdgesType3.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0']] ax.plot(x, y, z, color='blue') # Plot each line from the CableWayEdgesType4 dataframe in dark green for index, row in CableWayEdgesType4.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0']] ax.plot(x, y, z, color='red') # Axis labels ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') # Show graph plt.show() In conclusion, this section illustrates a comprehensive process to calculate and visualize the connections between nodes in a cableway system, helping to map out the network structure efficiently. The main goal of this code is to create a 3D visualization that shows different types of connections, or "edges," between various points (nodes) in a system. These connections are represented by lines in a 3D space, and each type of connection is shown in a different color. Setting Up the 3D Plot First, the code imports necessary libraries for plotting, `matplotlib.pyplot` and `mpl_toolkits.mplot3d.Axes3D`. These libraries allow us to create both 2D and 3D plots. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D Next, the code creates a new figure (a blank canvas) and adds a 3D subplot to it. This subplot is where the 3D lines will be drawn. # Crear figura fig = plt.figure()
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 86 ax = fig.add_subplot(111, projection='3d') Plotting the Connections The code then goes through four different sets of connections (or edges), each represented by a DataFrame (`CableWayEdgesType1`, `CableWayEdgesType2`, `CableWayEdgesType3`, `CableWayEdgesType4`). Each DataFrame contains information about pairs of points that are connected, including their coordinates. For each set of connections, the code draws a line between two points: - Blue Lines: These lines represent the connections from the first set of data (`CableWayEdgesType1`). # Plot each line from the CableWayEdgesType1 DataFrame in blue for index, row in CableWayEdgesType1.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='blue') - Red Lines: These lines represent connections from the second set of data (`CableWayEdgesType2`) # Plot each line from the CableWayEdgesType2 DataFrame in red for index, row in CableWayEdgesType2.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='red') - Orange Lines: These lines represent connections from the third set of data (`CableWayEdgesType3`). # Plot each line from the CableWayEdgesType3 DataFrame in orange for index, row in CableWayEdgesType3.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='orange') - Dark Green Lines: These lines represent connections from the fourth set of data (`CableWayEdgesType4`) # Plot each line from the CableWayEdgesType4 DataFrame in dark green for index, row in CableWayEdgesType4.iterrows(): x = [row['x0'], row['x1']] y = [row['y0'], row['y1']] z = [row['z0'], row['z1']] ax.plot(x, y, z, color='darkgreen') Finally, the code adds labels to the X, Y, and Z axes, so that when the plot is displayed, we know what each axis represents. Then, it shows the plot using `plt.show()`. # Axis labels ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') # Show graph
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 87 plt.show() In short, this code creates a 3D plot where different types of connections between points are visualized with colored lines. Each color represents a different type of connection: - Blue for the first type - Red for the second type - Orange for the third type - Dark Green for the fourth type This visual representation helps in understanding how different points are connected within a 3D space.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 88 Annex 5: Python Code detailed (Excel list unification) Let's break down the code you've provided in a friendly and detailed manner, explaining what each part is doing without going into every single line, but making sure you understand the overall process and the key details. Unification of All DataFrames The goal of this code is to bring together data from different sources (dataframes) into a unified structure. This process involves combining the nodes from different datasets, merging edge data, and cleaning up the resulting dataframes to ensure they are ready for further analysis or visualization. 1. Unifying Node Data The first section of the code is about unifying two different sets of nodes: `CableWayNodesFiltered` and `DeviceNodes`. CableWayNodesFiltered.head(2) DeviceNodes.head(2) Here, the code is likely displaying the first two rows of each dataframe (`CableWayNodesFiltered` and `DeviceNodes`) just to check what the data looks like before unification. This is useful for ensuring that both dataframes have the expected structure. Nodes = pd.concat([DeviceNodes, CableWayNodesFiltered], ignore_index=True) Next, the code concatenates (joins together) these two dataframes into a single dataframe called “Nodes”. The `ignore_index=True` argument ensures that the indices (row numbers) are reset in the new dataframe, creating a continuous sequence from 0 onward. # Guardar el DataFrame como un archivo Excel dataframes_excel_file_path_Nodes = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/EDGES_CALCULATION/Nodes.xlsx' Nodes.to_excel(dataframes_excel_file_path_Nodes, index=False) After combining the nodes, the new “Nodes” dataframe is saved as an Excel file. This is important for keeping a record of the combined data that can be accessed later. Nodes = Nodes[['ID-Node']] Nodes.head(500) Finally, the code selects only the `ID-Node` column from the “Nodes” dataframe, presumably because this is the key identifier needed for subsequent operations. The `head(500)` command displays the first 500 rows, likely for verification. 2. Unifying Edge Data
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 95 After this mapping, the table is saved again, and the tramo columns are simplified into a single list of unique cableways, making the data easier to manage and understand. # Simplify the tramo columns by collapsing them into a single list of unique values def simplify_tramos(row): unique_tramos = list(pd.Series(row[tramo_columns]).dropna().unique()) return ', '.join(unique_tramos) # Apply the function to each row and create a new 'Simplified_Tramos' column RoutedTable2['Cableway1'] = RoutedTable2.apply(simplify_tramos, axis=1) This simplified data is then saved to another Excel file, providing a clean and concise summary of the routing paths. # Save the simplified table to a new Excel file simplified_output = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/RoutedTableSimplified.xl sx' RoutedTable2.to_excel(simplified_output, index=False) Conclusion This code effectively automates the process of routing cables through a complex network, from calculating the shortest paths to saving detailed records of these routes. By doing so, it not only ensures accuracy but also saves a significant amount of time and effort compared to manual methods. The final outputs are clean, structured data tables that can be used for further analysis or as part of a larger engineering project.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 96 Annex 8: Python Code detailed (Final Output) Loading and Preparing the Data First, we start by loading a specific Excel file that contains our routed path data. This file (`Routed_Table1.xlsx`) is where all the information about the cable routing, such as nodes and their connections, is stored. import pandas as pd # Load the Routed_Table1.xlsx file ruta_table = r'/content/drive/MyDrive/TFM/ColabNotebooks/CODE2/DataframesFromCode2/Routed_Table1.xlsx' RoutedTable1 = pd.read_excel(ruta_table) Next, we focus on just the first row of this table. This row likely represents a specific path or route that we're interested in analyzing. # Select only the first row RoutedTable1 = RoutedTable1.head(1) RoutedTable1.head(1) We then transpose the data. Transposing essentially flips the table, so what were once columns become rows, and vice versa. This makes it easier to work with the data in the subsequent steps. # Transpose the DataFrame RoutedTableTranspose = RoutedTable1.T RoutedTableTranspose.head(100) Retrieving Coordinates for Each Node Now that we have our transposed table, we need to fetch the coordinates (x, y, z) for each node listed in the path. These coordinates are crucial for plotting the path in 3D later on. import pandas as pd # Definir una función para obtener los valores de x, y, z basándose en el ID-Node def obtener_coordenadas(id_node): fila = Nodes.loc[Nodes['ID-Node'] == id_node] if not fila.empty: return fila['x'].values[0], fila['y'].values[0], fila['z'].values[0] else: return None, None, None # Aplicar la función a cada uno de los valores relevantes en RoutedTableTranspose RoutedTableTranspose['x'] = RoutedTableTranspose[0].apply(lambda x: obtener_coordenadas(x)[0]) RoutedTableTranspose['y'] = RoutedTableTranspose[0].apply(lambda x: obtener_coordenadas(x)[1]) RoutedTableTranspose['z'] = RoutedTableTranspose[0].apply(lambda x: obtener_coordenadas(x)[2]) Here, we define a function `obtener_coordenadas` that takes a node ID and looks up its corresponding x, y, and z coordinates from another data source (“Nodes”). We then apply this function to our transposed table, adding three new columns (`x`, `y`, and `z`) with these coordinates.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 97 To ensure the data is clean and usable, any rows with missing coordinates (NaN values) are removed. # Eliminar las filas con valores NaN en cualquiera de las columnas 'x', 'y', 'z' RoutedTableTranspose = RoutedTableTranspose.dropna(subset=['x', 'y', 'z']) # Mostrar las primeras filas para verificar RoutedTableTranspose.head(100) Adjusting the Order of Nodes Next, we perform a little manipulation of the data. Specifically, we take the second row of our transposed table and move it to the end of the table. This might be necessary for ensuring the path is plotted correctly later on. # Paso 1: Seleccionar la segunda fila second_row = RoutedTableTranspose.iloc[1] # Paso 2: Eliminar la segunda fila del DataFrame original RoutedTableTranspose = RoutedTableTranspose.drop(RoutedTableTranspose.index[1]) # Paso 3: Añadir la segunda fila al final del DataFrame RoutedTableTranspose = pd.concat([RoutedTableTranspose, second_row.to_frame().T], ignore_index=True) # Mostrar el DataFrame actualizado RoutedTableTranspose.head(100) Plotting the 3D Path Now comes the fun part—visualizing the path in 3D! We use the `matplotlib` library for this, which is great for creating a wide range of plots, including 3D ones. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Crear figura fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # Extraer los valores de x, y, z de RoutedTableTranspose x_values = RoutedTableTranspose['x'] y_values = RoutedTableTranspose['y'] z_values = RoutedTableTranspose['z'] Here, we first create a 3D plot and extract the x, y, and z coordinates from our transposed table. We then plot the path by connecting these points with lines, and we label each point with its corresponding node ID. # Graficar la ruta en 3D ax.plot(x_values, y_values, z_values, marker='o', linestyle='-', color='b') # Etiquetas de los puntos utilizando la columna "0" for i, (x, y, z) in enumerate(zip(x_values, y_values, z_values)):
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 98 label = RoutedTableTranspose.iloc[i, 0] # Usar la columna "0" para las etiquetas ax.text(x, y, z, label) Finally, we label the axes and display the 3D plot. # Etiquetas de los ejes ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') # Mostrar gráfica plt.show() Simplified 3D Plot (Optional Repeat) In the last part of the code, the 3D plot is generated again, but without the point labels. This might be useful for a cleaner visualization where only the path and axes are shown. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Crear figura fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # Extraer los valores de x, y, z de RoutedTableTranspose x_values = RoutedTableTranspose['x'] y_values = RoutedTableTranspose['y'] z_values = RoutedTableTranspose['z'] # Graficar la ruta en 3D ax.plot(x_values, y_values, z_values, marker='o', linestyle='-', color='b') # Etiquetas de los ejes ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') # Mostrar gráfica plt.show() This code is a great example of how data from a routing table can be used to visualize the physical path of cables in a 3D space. The process involves loading the data, extracting and organizing the coordinates, and then plotting the path. By visualizing the routes, engineers can better understand the layout and potentially identify issues or areas for optimization in the cable routing process.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 99 Annex 9: Electrical Design Criteria (Siemens) Document Cover Sheet Ordering Party / Zamawiający: Contractor / Wykonawca: Copyright (C) Siemens Energy 2022 All Rights Reserved Siemens Energy is a trademark licensed by Siemens AG. Project Projekt Obje ct Cod e DCC Seq. no. Nr porz. Language Język PL1028 - B_ _ - &EDB 030 - 70000 2 English Title / Content Tytuł / Zawartość ELETRICAL DESIGN CRITERIA UNID Number 536075596 Index / Rev. Indeks / Wyd. A Date Data 10/01/2023 Export Classification Klasyfikacja eksportowa AL N ECC N N Handling Stosowanie Restricted
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 100 1. AIM 5 2. PROJECT DESCRIPTION AND LOCATION 6 3. GENERAL CODES AND STANDARDS 7 4. GENERAL DESIGN REQUIREMENTS 8 4.1 ENVIROMENTAL CONDITIONS 8 4.2 DESIGN TEMPERATURES 8 4.3 PLANT DESIGN LIFE 9 4.4 GENERAL DESIGN REQUIREMENTS 9 4.5 PLANT DESIGNATION SYSTEM 11 4.6 UNIT AND LANGUAGE 11 5. ELECTR. DESIGN BASIS. MAIN TECHINCAL REQUIREMENTS 12 5.1 VOLTAGE LEVEL, FREQUENCY AND METHOD OF EARTHING 13 5.2 ELECTRICAL EQUIPMENT ENCLOSURE CLASSIFICATION 15 5.3 POWER GENERATION AND EVACUATION 16 5.4 INTERFACE SIGNALS WITH SUBSTATION 16 5.5 POWER METERING SYSTEM 16 5.6 SYNCHRONIZATION SYSTEM 17 5.7 PROTECTION AND CONTROL SYSTEM 18 5.7.1. Main Equipment Protection 18 5.7.2. Electrical System Control, Indications and Alarms 19 5.8 FAULT MONITORING SYSTEM (DISTURBANCE RECORDER) 19 5.9 BUS DUCTS SYSTEMS 20 5.10 GENERATOR CIRCUIT BREAKERS 21 5.11 POWER TRANSFORMERS 22 5.11.1. General requirements 22 5.11.2. Generator step-up transformer (GSUT) 23 5.11.3. Unit auxiliary transformer (UAT) 24 5.11.4. Standby transformer (BCT) 25 5.11.5. Other auxiliary transformers (MV/LV service transformers) 26 5.12 SWITCHGEARS 27 5.12.1. General requirements 27 5.12.2. MV switchgears 28 5.12.3. LV switchgears 29 5.12.4. Lighting-HVAC panels 30 5.13 AUTOMATIC TRANSFER SYSTEMS 31 5.14 ELECTRIC MOTORS 31 5.15 DIRECT CURRENT AND UNINTERRUPTIBLE POWER SYSTEM 33 5.15.1. General requirements 33 5.15.2. Direct current system 33 5.15.3. Uninterruptible power system 35 5.16 400 kV POWER PLANT SUBSTATION 36 5.17 110 kV POWER PLANT SUBSTATION 37 5.18 EMERGENCY DIESEL GENERATOR 38 5.19 EARTHING, BONDING AND LIGHTNING PROTECTION 40 5.19.1. Earthing system 40 5.19.2. Buried ground grid 40 5.19.3. Aerial ground grid 41 5.19.4. Lightning Protection System (LPS) 42 5.20 CABLES AND CABLE INSTALLATION 42 5.20.1. General requirements 42 5.20.2. Medium Voltage cables requirements 43 5.20.3. Low Voltage cables requirements 43 5.20.4. Segregation and separation on cable ways 45
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 101 5.20.5. Cable installation 46 5.20.6. Power cable sizing 46 5.20.7. Cable colour code 50 5.21 CABLE TRAYS AND CONDUITS 50 5.21.1. Cable laying in cable trays & conduits 51 5.21.2. Cable laying in buried ducts 5554 5.22 LIGHTING AND SMALL POWER SYSTEM 57 5.22.1. Lighting system 57 5.22.2. Power receptacles 60 5.23 CATHODIC PROTECTION 61 5.24 ELECTRICAL HEAT TRACING (EHT) 61 6. REFERENCE DOCUMENTS 6362
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 102 1. AIM This document provides the design basis that will be followed in the design of the electrical systems for the power plant of the GRUDZIADZ Combine Cycle Power Project (CCGT). In this document, minimum design requirements for the electrical systems are defined in order ensure an efficient design, proper functionality, high reliability and compliance with contractual requirements. This document sets the general terms frame that will be considered and observed within the design of the system, although there may be particular cases arising out of this document frame that would need first to be analyzed and agreed before proceeding with its design. Other requirements not specifically covered in this document shall be as per local authority’s requirements for engineering, procurement and construction. 2. PROJECT DESCRIPTION AND LOCATION The CCGT GRUDZIADZ Project will be constructed on Grudziadz. The site is located on the north of Poland, approximately 210 km from Warsaw and 90 km from the coast. The gas and steam power plant shall be in the southern part of the town of Grudziadz in the Kuyavian-Pomeranian Voivodeship, in the Węgrowo and Pastwiska districts. The CCGT Grudziadz project will be a power plant (also referred as the Plant or the Unit) in combined cycle gas turbine (CCGT) technology of 560 MW net power output, featuring one gas turbine and one condensing steam turbine in single shaft configuration. Other main components of the Plant are a heat recovery steam generator (HRSG) and a cooling tower. The Plant shall supply power to the National Power grid (400 kV) operated by PSE and its parameters/operation shall be adjusted to the requirements of this system. A backup (stand-by) 110 kV supply will be used for the import of auxiliary power to the site when the main 400 kV supply is not available. Natural gas for the facility supply shall be obtained from the natural gas metering station operated by the Gaz-System Operator (GSO). The gas receiving and measuring station shall be placed nearby the Plant, as a separate building. CCGT Grudziadz sp. z o.o. is the final Owner (also referred as Employer) of the project that will be constructed on a turn-key basis (EPC) by a Consortium formed by Siemens Energy Global GmbH & Co. KG, Siemens Energy sp. z o.o. and Mytilineos S.A. For additional information of the project site data refer to “Project master data” (doc. No PL1028-Y__-BEC010-000080) 3. GENERAL CODES AND STANDARDS All equipment and systems supplied shall comply with obligatory standards and proofed by certificates issued by certified laboratories from countries of origin of the equipment, not necessarily from Poland but it has to be from UE. Certificates from laboratories from outside UE (laboratories have to be a member of the international forums which PCA (In Poland PCA- Polskie Centrum Akredytacji – Polish Centre for Accreditation) is also a member can be considered equivalent to UE laboratories) only if the Vendor submits it earlier list for approval such electrical components accredited Polish or European certification unit (in Poland PCA – Polskie Centrum Akredytacji - Polish Centre for Accreditation). The codes and standards will be applied in the following order of precedence: • PN National Polish Standards
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 103 • CENELEC European Committee for Electrotechnical Standardization • IEC International Electrotechnical Commission All design, fabrication and construction shall be based upon the latest edition (including amendments or addenda) of applicable codes, standards and regulations in effect at the time of Commencement Date. Standards to be applied for design and fabrication of equipment are stated in the related sections of this document. Standards or their equivalents agreed in text of this document have to be followed. The selection of applicable standards mentioned in the text or its equivalent to those shall be based on the Contract, considering the requirement of Polish law/regulations. 4. GENERAL DESIGN REQUIREMENTS 1. ENVIROMENTAL CONDITIONS The ambient conditions for the site are as follows: • Ambient temperature -35ºC to 35ºC • Relative humidity 50% to 95% • Barometric pressure 950 mbar to 1050 mbar The following conditions shall be also taken into account for the design: • Design ambient dry bulb temp./relative humidity 15°C / 60% • Maximum short term ambient dry bulb temp./relative humidity 36°C / 50% • Elevation +28 m.a.s.l. • Design wind speed Vb,0=22m/s • Rain yield factor 150 l/(s·ha) • Snow load Sk,0=1,2 kN/m2 • Pollution level acc. To IEC 60815 high pollution level III • Seismic N/A For additional information of the project site data refer to “Site master data” (doc. No PL1028- Y__-BEC010-000070). 2. DESIGN TEMPERATURES The design ambient temperatures for electrical equipment will be as follows: Equipment located indoor in air-conditioned rooms: • Maximum design temperature +40ºC • Minimum design temperature +5ºC Equipment located indoor non air-conditioned rooms: • Maximum design temperature +40ºC Equipment located outdoor • Maximum design temperature +40ºC • Minimum design temperature -35ºC 3. PLANT DESIGN LIFE The Plant shall be designed for 25 years or 200.000 equivalent hours of operation. Unit's equipment shall be designed for the aforementioned time of operation with an annual operation time of over 8000 hours.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 104 4. GENERAL DESIGN REQUIREMENTS The electrical equipment and system shall be designed complying with the following: • To ensure continuity of operation of the plant under all working conditions. • For satisfactory operation under the site ambient and environment conditions. • For satisfactory operation under sudden variations of load and voltage as may be encountered during normal or abnormal operating conditions, including those due to starting loads, transient short-circuit and other fault conditions. • Taking into consideration reliability, availability, interchangeability and maintenance aspects. • Unit auxiliary transformer, standby transformer and switchgears shall be designed to continue normal operation with transformer out of service. A change-over scheme shall allow transfer, without loss of output, between normal system operation and outage condition. • Electrical equipment shall be suitable for carrying continuously the specified currents and loads without undue heating and for withstanding the specified maximum shortcircuit currents and duration without exceeding the value permitted for the related insulation class. • Insulation materials shall be suitable finished so as to prevent deterioration of their qualities under the specified working conditions. • The design and installation shall incorporate every reasonable safeguard and provision for the safety of all personnel concerned in the commissioning, operation and maintenance of the installation. Safety, isolation, locking and interlocking facilities shall comply with international standards and practice. The design of the auxiliary power supply system shall comply the following: • It shall include reserve capacity that is appropriate to the plant and equipment supplied; an excessive level of reserve capacity shall be avoided in the design. • It shall be arranged to minimize operational constraint. • It shall be capable of maintaining or rapidly restoring the full continuous power output in the event of a single component or circuit failure. The following redundancy requirements shall be complied: • The plant shall be designed so that no single auxiliary equipment failure or trip (except main equipment) shall result in the reduction of power capacity. In this context, it is required that all critical auxiliary equipment shall be provided with N+1 configuration. Main equipment refers to the following electrical equipment: main transformer, generator circuit breaker, IPBs, aux. transformers, major electrical equipment, cables. • Redundant backup equipment shall start instantaneously to enable continued functioning of the process without consequent malfunction. • Redundant active equipment shall be powered from separate buses and physically segregated where feasible. The system design shall be such that the standby equipment shall be activated automatically when the control system detects a failure of the running equipment to perform its intended function.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 111 standards compliant with IEC 61850 or hardwired. The microprocessor protection applied shall have all the signals input from its own feeder (protections, representations etc.). Incoming feeders of main LV switchgears shall be provided with feeder controllers with communication conforming to IEC 61850. DC system rectifiers shall be equipped with full control and measurement system, measuring the state and operational parameters of rectifier and battery and transmitting signals (in compliance with IEC 61850 or transmitting signals via Modbus TCP/IP or PROFIBUS or Profinet) to a dedicated electrical digital system of control and supervision or DCS. UPS units shall be equipped with microprocessor system of control and supervision with an indicator (monitor) of operation conditions, with emergency alarms and with signal transmission (in compliance with IEC 61850 or other type like PROFIBUS) to the dedicated electrical digital control and supervision system or DCS. 8. FAULT MONITORING SYSTEM (DISTURBANCE RECORDER) A Fault and Perturbations Recorder will be provided in Power Plant for record disturbances, transient phenomena, changes in the characteristic variables, the sequences of operation of the protection relays and the state of circuit breaker. A digital fault-monitoring and disturbance recorder system (FMS) shall be provided. This shall cover the entire plant electrical system items, including the following: • 400 kV and 110 kV system • Generator, generator step-up transformer, unit auxiliary transformer, standby transformer and excitation transformer and generator circuit breaker. • MV switchgears. • LV switchgears • Direct current and uninterruptible power supply. • Activation and tripping of main electric protection systems Fault monitoring system shall include at least 15% spares of analog and binary inputs. The system shall be time-synchronized and able to communicate with the Power Plant Control System (protocol acc. to IEC 61850 standard). 9. BUS DUCTS SYSTEMS Bus duct systems shall be designed, manufactured and tested according to IEC 62271- 1ANSI/IEEE C37.23, unless otherwise stated. Bus duct systems shall be designed to carry the maximum rated current specified continuously under full load and worst ambient conditions. Systems shall be designed to withstand the corresponding full asymmetrical peak currents under the rms short circuit fault infeeds based on designed network ultimate fault levels and plant contributions. The temperature rise of conductor and enclosure shall not exceed the following values permissible values specified in ANSI/IEEE C37.23:. • The maximum hottest-spot temperature at rated current in continuous services shall be no higher than 65 ºC (enclosure) and 105 ºC (conductor).
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 112 • The maximum temperature rises at the hottest-spot at the rated current in continuous service shall be no higher than 40 ºC (enclosure) and 65 ºC (conductor). Bus bars enclosure shall be designed so as to ensure the access to all elements (bolted connections being subject to checks or maintenance activities) of the current path through inspection holes. Bus bars enclosure shall be used as earth bar and equipped with terminals enabling earthing connection. To eliminate the magnetic field impact, the enclosure shall be made of aluminium alloys. Bus bar supports shall also be connected to the earthing system. Bus bar connections to all transformers shall be made in such a way that it is possible to replace the transformer without dismantling the bus bar path. Flexible connections shall be provided where necessary to accommodate thermal expansion or other differential movement and to ensure that no undue force or vibration is transmitted to the connected equipment. Bus bar shall have appropriate number of expansion joints for the bars and for the enclosure. Where joints are made between dissimilar metals approved means shall be provided to prevent electrolytic corrosion. Isolated phase bus ducts (IPBs) will be provided for connection between the generator, the generator circuit breaker and the generator step-up transformer including, excitation transformer and to the unit auxiliary transformers. IPBs shall be of the self-supporting rigid type, enclosed conductor in air insulation sealed against dust penetration by compressed air conductors, shall be of high conductivity aluminium or copper and all joints shall generally be fully welded. MV bus duct (non-segregated) will be provided for connection between unit auxiliary transformer an MV switchgears. MV bus duct (non-segregated) shall be of the self-supporting rigid type, enclosed conductor in air insulation sealed against dust penetration by compressed air conductors, shall be of high conductivity aluminium or copper and all joints shall generally be fully welded. LV bus duct (non-segregated) will be provided for connection between own need transformers to LV switchgears with rating above 1250 kVA. LV bus duct (non-segregated) shall be of the self-supporting rigid type, enclosed solid-air insulation, shall be of copper surfaces to be bolt-connected. 10. GENERATOR CIRCUIT BREAKERS Generator circuit breaker (GCB) shall be provided for incorporation into the phase isolated system of bus ducts in such a manner as to preserve the principle “phase isolated” operation. The generator circuit breaker shall include a line disconnector switch in series with the circuit breaker on the GSUT side, start-up disconnector switch for connection to static frequency converter (SFC), motorized earthing switches (generator and transformer sides), wave sloping capacitors on generator and GSUT side,), CTs and VTs as required will be provided within the circuit breaker enclosure.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 113 The generator circuit breakers (GCB) shall be designed and manufactured in accordance with PN-EN/IEC 62271-102. The SF6 gas shall conform to the requirements of PN-EN/IEC 60376. The GCB will be capable of permanently carrying the maximum current, corresponding to the maximum turbine output, at the generator rated power factor and at the minimum regulated voltage of the generator (95%) without exceeding the temperature and temperature rise limits indicated in IEEE C37.013 under all site ambient conditions. Parameters of generator circuit breaker system related to power should have a margin of 10% reserve. Designed, manufactured and tested according to IEC/IEEE 62271-37-013, unless otherwise stated. The GCB shall be designed with separate contact systems for breaking and carrying current. The GCB will be of the fault making, fault breaking and load breaking type, rated for the associated system maximum fault current and capable of carrying the maximum continuous full load current. effect of DC component shall be considered. The circuit breaker shall be designed with one (1) closing circuit and two (2) trip circuits. The control circuits for trip circuits shall be independent of each other and independent of the closing and signaling circuits. Short circuit testing facilities shall be provided. 11. POWER TRANSFORMERS 1. General requirements Oil-immersed power transformers shall comply with the requirements of PN-EN/IEC 60076 and shall be of the outdoor type. The selection of insulating oil shall take into consideration the most up to date protection against sulphur corrosion. Transformer oil shall conform to the requirements specified in PN-EN 60296 for mineral oil. Oil type transformer cooling system shall be controlled automatically and manually from the control cabinet or from the control room system. The oil transformers shall be designed for continuous operation at maximum working voltages of the grid specified for voltage by min. 10% higher than nominal at the full range of loads, as well as for 140% nominal voltage during 5-secund period. For the oil type transformers the permissible temperature rises will be according to the IEC standards, as follows (for the maximum ambient temperature of +40ºC): • Top oil temperature rise: 60 K • Average winding temperature rise: 70 K for ODAF and 65 K for ONAF • Winding hot spot: 78 K For cast resin/dry type indoor/outdoor transformers the respective maximum and average room, and enclosure temperature shall be considered. The average winding temperature rise of the cast resin/dry type of transformers shall comply with IEC 60076-11. On load tap changer shall conform with the requirements of PN-EN 60214. Tap changer control shall be possible in automatic and manual mode, remotely (including DCS) and locally. All transformers shall be equipped with the appropriate class of protection/metering current transformers (CTs), as required. 2. Generator step-up transformer (GSUT) Generator shall be connected to a generator step-up transformer to connect it up to the 400 kV substation bay.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 114 The GSUT and their accessories shall comply with the following: • Designed, manufactured and tested according to PN-EN/IEC 60076, unless otherwise stated. • GSUT shall be two winding core-type transformer suitably rated to match the output of the prime movers over the entire ambient temperature range of the site and in every mode of operation. It shall be possible to permanently load the transformer with at least 110% rated power. A higher loss of live is acceptable in this "operating mode". • GSUT shall be of ODAN/ODAF cooling classification. • GSUT shall be located in an outdoor compound having firewalls, fire water spray system, oil collecting pit and oil separator. • GSUT shall have an on-load tap changer (OLTC), There is no AVR required, since the on load tap changer will have to cooperate with ARNE system. The tapping range shall be +/ 13x1,25%. • The HV terminals shall be connected to the OHL of 400 kV substation. • LV terminals shall be connected by phase isolated bus bars to the generator. • Neutral point of GSUT (at 400 kV side) shall be available for solid earthing and unearthing. Vector group for GSUT shall be YNd11. • GSUT shall be provided with a monitoring system to continuous supervision of parameters in order to assure failure-free operation of the transformer. The monitoring system shall be connected the DCS. • The minimum creepage distance (SCD) for outdoor insulators shall be 25 mm/kV. 3. Unit auxiliary transformer (UAT) Unit auxiliary transformer shall be provided which will receive power from the tap off connection of the isolated phase bus duct connection between the generator and the generator step-up transformer after the generator circuit breaker. The UATs and their accessories shall comply with the following: • Designed, manufactured and tested according to PN-EN/IEC 60076, unless otherwise stated. • UAT shall be three winding core-type transformer suitably rated to power the auxiliaries of power plant over the entire ambient temperature range of the site and in every mode of operation. It shall be possible to permanently load the transformer with at least 110% rated power. A higher loss of live is acceptable in this "operating mode". • Rated power of the three winding transformers shall be 100% on the higher voltage side and 2x100% on the lower voltage. • UATs shall be 3 winding oil filled transformers with two LV windings which will get connected to the MV switchgears (10 kV) to serve power plant. • UAT shall be of ONAN/ONAF cooling classification. • UAT shall be located in an outdoor compound having firewalls, fire water spray system, oil collecting pit and oil separator. • UAT shall have an on-load tap changer (OLTC) and AVR system is required The tapping range shall be +/ 8x1,25%. • The HV terminals shall be connected to the IPBs.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 115 • The LV terminals shall be connected by MV non-segregated bus duct to the MV switchgears. • Neutral points of UAT (at 10 kV side) shall be available for low-impedance earthing and un-earthing through neutral earthing resistor and un-earthing. Vector group for UAT shall be Dyn1yn1. • The minimum creepage distance (SCD) for outdoor insulators shall be 25 mm/kV. 4. Standby transformer (BCT) Unit standby transformer shall be provided which will receive power from the 110 kV substation and connected to the MV switchgears. The standby transformer and their accessories shall comply with the following: • Designed, manufactured and tested according to PN-EN/IEC 60076, unless otherwise stated. • Standby transformer shall be two winding core-type transformer suitably rated to power the auxiliaries of power plant over the entire ambient temperature range of the site and in every mode of operation. • The power rating of standby transformer shall be min. 110% of the power plant's own needs. • Standby transformer shall be 2 winding oil filled transformers with two LV windings which will get connected to the MV switchgears (10 kV) to serve power plant. • Standby transformer shall be of ONAN/ONAF cooling classification. • Standby transformer shall be located in an outdoor compound having firewalls, fire water spray system, oil collecting pit and oil separator. • Standby transformer shall have an on-load tap changer (OLTC) and AVR system is required. The tapping range shall be +/ 8x1,25%. • The HV terminals shall be connected to the OHL from 110 kV substation. • The LV terminals shall be connected by cable to the MV switchgears. • Neutral point of standby transformer (at 110 kV side) shall be available for solid earthing and un-earthing trough neutral. • Neutral point of standby transformer (at 10 kV side) shall be available for lowimpedance earthing through neutral earthing resistor. Vector group for standby transformer shall be YNyn0. • The minimum creepage distance (SCD) for outdoor insulators shall be 25 mm/kV. 5. Other auxiliary transformers (MV/LV service transformers) MV/LV service transformers will be provided to supply LV auxiliary loads. Service transformers and their accessories shall comply with the following: • Designed, manufactured and tested according to PN-EN/IEC 60076, unless otherwise stated. • Transformers shall have an cast resin or epoxy resin insulation. • Service transformers shall be of two winding and, natural cooling AN/AN is required. A relevant cooling capacity shall be ensured for the maximum transformer load. Transformers shall withstand a continuous load of min. 110% nominal power.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 116 • Service transformer shall have an off-load tap changer. The tapping range shall be ± 2x2,5%. • The terminals of MV/LV power transformers with ratings of 1250kVA and above shall be connected by copper busbars on LV side, LV power transformers with ratings less than 1250 kVA shall be equipped with terminal boxes for the connection of not more than three cables per phase. • Vector group shall be Dyn5. • For transformers in enclosures resistance to electric arc of the enclosures shall be ensured during at least 1-second period, test short-circuit current with RMS value (according to electrical calculations). The testing method and test result assessment according to PN-E-05163 or other equivalent standard. The transformer enclosures shall be equipped with arc protections with at least 3 fiber optic sensors operating towards tripping on the MV side of a transformer. The protection operating principle shall be based on the criteria of flash and voltage dip. For transformers in housings/enclosures for outdoor location arc resistance is not applicable, if no work is foreseen at the energized transformer/housing. Thus, arc detection within the transformer chamber is not applicable. 12. SWITCHGEARS 1. General requirements Switchgears shall be of the indoor type designed for the following ambient conditions of operation: • Min. ambient temperature 5ºC • Max. ambient temperature 40ºC • Max. humidity 95% • Altitude above sea level up to 1000 m MV switchgears shall have two main sections, each fed from UAT secondary and one reserve section fed from standby transformer. The two main sections shall have a bus coupler with reserve section to ensure supply reliability. The bus couplers will be interlocked with the two incoming supply breakers of the switchgear for auto supply change over and safe operation of the switchgear. LV switchgears shall be used for the project for operation voltage of 690V and 400V. The LV switchgears will have two sections with a bus coupler. Each of the bus section will be fed power supply from respective sections of the MV switchgear through a MV/LV (1x100%) step down transformer. The LV switchgear for cooling towers shall have a common section fed power from two MV/LV transformers without coupler. The bus coupler (air circuit breaker (ACB)) will be interlocked with the incoming ACBs of the two sections. LV normal and emergency auxiliary bus shall supply normal auxiliaries and emergency auxiliaries of the plant. This bus shall also receive power supply from the emergency supply bus. The emergency bus provides power supply to chargers of the battery system, UPS systems, AC lube oil pumps, lighting system, etc. Clarifications: For 400 V sub-distribution panel and DC/UPS distribution panels, deviations from the requirements for main LV switchgear shall be acceptable. The 400 V sub-distribution panel and DC/UPS distribution panels are of fixed mounted design, and not equipped with separated cable or busbar compartment. The 400 V sub-distribution panel and DC/UPS distribution panels are usually located close to the process and serve to supply smaller loads or can be part of a Black-Box system. Small sub-distributions are not equipped with busbar voltage measurement, and current measurements.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 117 The LV main switchgears and secondary switchgears above 800 A shall be of the withdrawable type and design shall be according to PN-EN/IEC 61439–1 form 4b. Subdistribution boards and local boards shall be of the fixed type, form 2b. 2. MV switchgears The MV switchgears shall be of metal-clad air insulated compartmented type tested design for indoor installation and shall comply with PN-EN/IEC 62271. The MV switchgear shall withstand a short-circuit current of minimum 25 kA for a duration of 1 seconds. MV switchgears shall be made with compartment accessibility class of at least LSC2B acc. to PN-EN/IEC 62271-200 and a possibility to work in one compartment shall be provided in case of voltage present in adjacent compartments and bays. The switchgears shall be provided in PM class, all the switchgear components shall be installed in separate compartments. Internal switchgear bay partitions shall completely prevent propagation of possible arc fault to the remaining structural compartments of the switchgear, apart from the faulty compartment. The switchgear interior shall be accessible from the front and from the back for monitoring, inspection and repair purposes. The busbar compartments shall be separated with bushings between the cubicles. The cubicles are to be provided with single copper busbar system and draw-out type, three pole circuit breakers, using SF6 interrupters or vacuum interrupters. All motor feeders with vacuum or SF6 circuit breakers with spring storage driving system armed by motor adapter. The number of secondary coils in the circuit breaker drive: one close coil and two trip coils supplied by 220 Vdc. All protections shall send impulses to both trip coils, which will be supplied from separate DC circuits. The circuit breakers shall have a defined test position. In this position, the main inserts of the breaker shall be isolated from the busbar and the cables, and the shutters shall be closed. Local control shall be possible only in test position. The MV switchgears shall be designed for a nominal voltage, type tested and internal arc certified IAC=AFRL according to PN-EN/IEC 62271-200. In line with PN-EN 61936-1, the Contractor shall ensure a solution meant to guide away internal arc effects from all the switchgear cubicles away from the zone occupied by the operating personnel and to discharge the same outside the building, if necessary. For earthing and short-circuiting the busbars, fault making earthing switches are to be provided on each section. The earthing switch shall be interlocked with the circuit breakers of all feeders connected to the relevant switchgear section (e.g. key lock). Where operation of a switching device can give rise to surge voltages, which would be detrimental to the insulation of the equipment controlled, surge suppressers shall be installed in the switchgear to control these voltages to a safe level. Details of the maximum surge voltages which can arise shall be provided by the MV switchgear Vendor and shall state the criteria on which the provision of surge suppressers is based, for motor feeders the arresters may be located in the motor terminal boxes. Feeder protection shall be by a digital multifunction relay. The MV switchgear shall be designed for remote control via the DCS. Low voltage devices and protection equipment shall be mounted in the door or on a mounting plate inside the low voltage compartment of the switchgear panel.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 118 Each main MV switchgear shall be provided with at least one spare feeder for motor and one for transformer and +10% spare space for possibility of additional feeder installation (for future extension). 3. LV switchgears Low voltage switchgears shall comprise type tested switchgear and control gear assemblies, factory assembled with all the internal mechanical connections and components fitted. LV switchgears shall comply with PN-EN/IEC 61439 and PN-EN/IEC 60947. The design of the switchgear shall protect the personnel against the effect of electrical arc generated inside the enclosure for category B1 according to PN-E-05163 or arching class B, according to UNE/IEC TR 61641, or IEC equivalent if in compliance with polish law/regulations. In 690V and 400V systems, TN-S system shall be applied. The switchgears shall have a fivebusbar system (L1, L2, L3, PE, N). Short circuit withstand rated will be fixed according short-circuit calculation study to be performed during design state. Main switchgears and secondary switchgears above 800A shall be made as stationary, free standing with air isolation, arc-protecting, modular, with the following compartments in each cubicle: busbars compartment, functional withdrawable modules with the switching apparatuses compartment for external connections (cable compartment). The power cables and control cables shall be input from the bottom and/or back side of the switchboard. The busbars compartment shall be located in the top or rear part of the cubicle. The withdrawable module shall have three positions: operation, test, withdrawn. The selection of operation type shall be done via the switch interlocked with withdrawing mechanisms. Withdrawable modules shall be provided with multi pin connections for connecting primary and secondary circuits with the terminal strip located in the cable department. The switchgears shall be provided with switching apparatuses, protection, control, measurement, regulation, and signaling with a possibility to control from remote control systems (controlled motor outgoing feeders shall be equipped with intelligent protections, with communication to the digital system and the local display) via programmable controllers. The instrumentation for control system, CT and VT etc. shall be located in measurement field as a separate switchgear compartment. Control voltage of supply and clutch fields will be powered from 220 Vdc. Adequate number of local MCCs or panels of fixed type pattern, form 2b will be provided to cover the needs of auxiliary LV power of the various parts of the plant wherever it is deemed necessary. Each switchgear shall have at least one outgoing feeders fully equipped for any power output and control type, but not less than 10% spare feeders of each type, and shall have 10% space reserve for further extension (not applied for switchgears dedicated directly to single process device). 4. Lighting-HVAC panels The LV panels considered in the scope of this paragraph are those to be provided for powering the lighting and HVAC systems. The configuration will consist of one main LV Switchgear and one main emergency LV Switchgear for each of the mentioned systems. From these Switchgears, different subdistribution panels will be located around the plant for powering the different needs in terms of consumptions per plant area.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 119 All Lighting and HVAC panels will be designed and manufactured in accordance with PN-EN 61439. Sub-distribution panels will be self-supporting structure or wall mounted depend on the size and 2b type compartment arrangement according with PN-EN 61439-1. Sub-distribution panels will be capable of withstanding the associate short circuit current for one (1) second. The minimum short-circuit capability of the board will be confirmed during detail design. All circuit breakers will be locally operated. Only in those feeders where a control is needed (HVAC fans for instance), the operation will be done also by the Control System (remote). No local alarms or signals to be in the Control System will be included on each of the subdistribution panels except in special cases where control feeders are needed. In these cases, signals will be hardwired. All components for controlling, measuring and protection shall be built into the panel and be logically grouped. All operating, measuring and protective components shall be properly marked with their ratings following PN-EN recommendations and with identification as used on the manufacturer’s drawings. 13. AUTOMATIC TRANSFER SYSTEMS Automatic transfer systems will be provided for MV switchgears and LV switchgears in order to automatically switch loads to an alternative feeder on failure of the normal supply feeder (break-before-make). System will prevent transfer in case of a busbar fault or uncleared downstream fault. Return to normal configuration after main power restoration shall be manually initiated, using a scheme that will allow momentary paralleling of two incomers (make-before-break). Equipment will be rated for the fault level at normal operation, not for paralleling condition. Changeover can be also initiated manually, using a make-before-break scheme. The transfer system at MV switchgears shall be of the fast (high speed) type. The transfer system at LV switchgears and distribution panels shall be of the slow type. 14. ELECTRIC MOTORS All motors shall be designed and manufactured in accordance with PN-EN/IEC 60034 and other related standards. Motors in hazardous areas shall be suitably certified. Motors shall have class F insulation, but the temperature rise shall not exceed class B. Emergency stop buttons of the stay-put key-reset red button mushroom head type shall be provided adjacent to all MV motors. Emergency push buttons shall be protected against accidental press These buttons shall directly trip the motors acting directly on the switchgear. Motors designated to work in higher humidity conditions it is required to use anti-condensation heaters, and for motors with power 30kW or higher in outdoor areas it is required to use anticondensation heaters automatically switched on when the motor is not in operation. The service voltages of the motors will be: • 10 kV, 3-phase AC, 50 Hz, for motors 250 kW and above • 400/690 V, 3-phase AC, 50 Hz, for motors below 250 kW Calculations of the voltage drop at start-up shall be made for the maximum capacity motor to decide if the motor can be directly fed from a LV switchboard or through a starting device. Motors shall be capable of operating continuously under rated output conditions at any frequency between 47,5 and 52,5 Hz and/or with any voltage deviation between 85% and 110% of the nominal voltage. The operating voltage range from 85% to 90% shall be
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 120 permissive for a limited short time only, however their performances may be altered during such events All motors shall have power by min. 5% higher based on the rated mechanical design. High efficiency of motors operating for over 2000 hours per year IE3 efficiency acc. (or IE2 +inverter) to PN-EN 60034-30 shall be required. Motor efficiency of min. 95,5% for motors above 2000kW power and min. 95% for motors above 100kW. Motors of power equal or higher than 2000kW shall be provided with differential protections, except for motors supplied from frequency converters. Motors shall have a lifetime of min. 20 years. Motor shall withstand at least 5000 start-ups without damage. Motors shall be capable of self start at voltage reduced to 0.75 rated voltage after 3 seconds of power loss without exceeding permitted temperature increases in the hot state in stator windings. Permitted frequency of start-ups shall result from the requirements of the process system but shall not be lower than two consecutive cold start-ups and one hot start-up within an hour. Motor shall be able to withstand loads resulting from the operation mode of the equipment it drives without exceeding permitted temperature for the specific insulation class. 15. DIRECT CURRENT AND UNINTERRUPTIBLE POWER SYSTEM 1. General requirements The direct current (DC) systems and uninterruptible power supply (UPS) systems will be designed to supply to loads whose continuous operation is required for the normal operation and emergency shut down of the plant, including control, protection, metering, indication and alarm systems. The DC system and UPS system shall be in dual redundant configuration. Secure supply system shall be of the indoor type designed for the following ambient conditions of operation: • Min. ambient temperature 5ºC • Max. ambient temperature 40ºC • Max. humidity 95% • Altitude above sea level up to 1000 m The system shall operate in a reliable way in extreme ambient conditions: during black-out, also without air conditioning in the reliable supply system rooms. Normal operation conditions with air conditioning system on: • Normal operation conditions 5ºC • Permitted ambient temperature range 40ºC • Max. relative humidity up to 70% 2. Direct current system Direct current system shall be designed and manufactured in accordance with PN-EN/IEC 60896-21 and with PN-EN/IEC 61056. Each DC system will be composed by:, • Two 100% battery chargers. • Two 100% bank of batteries. • Two distribution panel.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 127 • Specification IEC 60502-1-2-4 & PN-EN 60332-3 • Rated voltage: 6/12 kV • Conductor material: Copper wires. • Insulation: Cross linked polyethylene (XLPE). • Shield: Copper wire screen grounded at the switchgear end. • External jackets: Plastic overall covering (PVC flame retardant type). • Sealing ends: Creepage distance according to VDE 0110 or equivalent. • Armouring: MV cables shall not be armoured. • Minimum bending radius: 15 x outer cable diameters at maximum. • Maximum operating core temperature at normal conditions:90°C. • Maximum operating core temperature at short circuit conditions: 250°C. • Permissible short time current densities (k) for cables: 143 . 3. Low Voltage cables requirements Additionally, to what is indicated in section 5.20.15.20.1, the characteristics of the LV power cables will be as follows: • Specification IEC 60502-1-2-4 & PN-EN 60332-3 • Rated voltage: 0,6/1 kV • Conductor Copper • Insulation Cross linked polyethylene (XLPE) • Screen. Only for motor supplies with VSD applications acc. to VSD requirements • Armour Only for directly buried cables • Single-core cables armour Aluminium wire armour (AWA) • Multi-core cables armour Galvanized steel wire armour (SWA) • Outer sheath LSZH • Minimum cross-section area: • Non buried cables 2,5 mm2 • Buried cables 6 mm2 On the other hand, an additionally to what is indicated in section 5.20.15.20.1¡Error! No se encuentra el origen de la referencia.¡Error! No se encuentra el origen de la referencia., the characteristics of the LV control cables will be as follows: • Specification IEC 60502-1-2-4 & PN-EN 60332-3 • Rated voltage: 0,6/1 kV • Insulation XLPE • Screen. Overall shield for all wires of the cable • Armour Galvanized SWA for directly buried cables • Outer sheath LSZH • Configuration Multicore • Minimum cross-section area: • CT circuits 4 mm2 • VT circuits 4 mm2 • Others 1,5 mm2 Specific cables that should be fire resistant, the following main requirements will be followed considering specification FE180 (IEC 60331-11 & 21, VDE 0472 part 814) & E90 (DIN 4102 part 12): • Rated voltage: 0,6/1 kV • Conductor Copper • Insulation Halogen free material
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 128 • Screen. Only for motor supplies with VSD applications acc. to VSD requirements • Armour Only for directly buried cables • Single-core cables armour Aluminium wire armour (AWA) • Multi-core cables armour Galvanized steel wire armour (SWA) • Outer sheath LSZH 4. Segregation and separation on cable ways Cables will be installed with the maximum practical segregation and separation. The following rules set down the minimum requirements. The cables will be grouped and separated as follow: • Level 4: Medium Voltage Power Cables (> 1 kV) • Level 3: Low Voltage Power Cables (≤ 1000 V, including DC system) • Level 2: Signal cables (> 60 V) • Level 1: Signal Cables (≤ 60 V, including communication cables) The installation of special cables used for frequency converters applications could be done on the LV power cableways (level 3) if they are screened. If there were double supplies (redundancy) and if it is possible, the segregation of cables will ensure in the event of damage (e.g. fire) to a particular section of a cable system and for a minimum part of plant affected (e.g. duty and standby supply cables will be installed via separate routes and be distanced from one another as far as practicable). It will be planned systems to allow easily pulling of cables after the first pulling, avoiding damages in already pulled cables. 250 mm clear headroom above all cable trays will be minimum criteria. At least, 50 mm clear between underground ducts will be considered. This separation distance may be smaller for short runs where cables enter cubicle or crossover or encounter an obstruction (e.g. pipe). The distribution of the cable ways (cable trays or conduits) will be as follow from top to bottom positions: • Level 4 • Level 3 • Level 2 • Level 1 As an exception, cable ways with fire resistant cables will be installed above all other installations, so that the elements of other installations falling during the fire, do not damage these cable trays. 5. Cable installation All cables will be laid on cable ladders or routed through the suitable electrical conduits or ducts. Fixing of the cables to tubes, pipelines, tanks or process equipment will not be allowed, except when this will be explicitly indicated. Cables will be laid in ladder or perforated trays type and continuous conduit or duct. Conduits will not be allowed to be buried into ground or buried into concrete, with exception of extremely special conditions. Laying cables directly in the ground or into the ground will not be allowed. Cables in vertical cable tray will be fixed by cable clamps.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 129 All electrical raceways (cable trays and conduits) will be routed such that they do not interfere with any areas requiring access for electrical and mechanical equipment removal and/or routine (annual) maintenance. Excess cable length will not exceed 1 meter in any manholes, pits, or cable spreading areas under panels. Cables for equipment with emergency (redundant) systems will be laid in different routes if it is possible. 6. Power cable sizing Cross-section of power cables will be the highest of the cross-section calculated according to the following criteria: • Current-carrying capacity • Maximum withstand energy (short-circuit situation) • Voltage drop • Protection of indirect contact (limit the earth fault loop impedance) Cable current-carrying capacity: The conditions of current-carrying capacity are the following ones: • The ratings for continuous loading of the LV cables will be calculated as per IEC 60364- 5-52 standard and as per IEC 60502-2 for MV cables, considering the required reductions due to ambient temperatures and method of installation. • In order to ensure that cable temperatures do not exceed acceptable levels (current carrying capacity as nominated by the manufacturer), the cross-sectional area will be such that the continuous current rating of the cable (under consideration of the necessary de-rating factors derived from ambient temperature, cable accumulation and altitude of installation for compensating the lower air density for cooling) is higher than the rating of the device protecting the cable (e.g. fuse, miniature circuit breaker, etc.). • Above ground cables will be designed for an ambient temperature of 40ºC and buried cables will be designed for an atmospheric temperature of 20ºC. (Values to be confirmed during detail design). An additional safety margin of 5% will be considered for all cables in the scope. • The ground thermal resistance will be considered as 1 K·m/W (moist soil conditions as per recommendation in IEC 60287-3-1 standard). Value to be considered will be updated when the soil resistivity study is available. • For cables supplying motors will be considered a current of 100% of full load current of the motor. • For cables supplying Variable Speed Drivers (VSD) will be considered a current of 105% of full load current of the VSD in order to avoid overheating in the cables because of harmonic effects. • Cables installed through different cable ways and/or environments, will be sized according to the most restrictive reduction factors. Maximum withstand energy: The cable will be suitable to withstand without any damage the maximum through fault current for the maximum duration. For LV Air-Insulated Circuit Breaker it will be estimated a maximum typical breaker trip time of 0,8 seconds, the fault duration considered for the cable calculations
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 130 will be 1 second ( >20% higher than the 0,8 seconds). For Molded Case Circuit Breaker the let-through energy is given by the CB manufacturer. Voltage drop: Under normal service conditions, the voltage at the terminals of any fixed current-using equipment will be greater than the lower limit corresponding to the product standard relevant to the equipment. Where fixed current-using equipment is not the subject of a product standard, the voltage at the terminals will be such as not to impair the safe functioning of that equipment. As a rule, the upstream accumulated overvoltage considered for the main lighting and HVAC switchboards will be 3% as detailed in document “PL1028-7081-&EEC010-708101 2.1.10 Specification for the Electrical and I&C Design and Layout of Black Box Systems”. The voltage drop in lighting and HVAC cables (from the main switchboards of such system output to final consumer) will not be more than 2% based on continuous maximum current loading and rated voltage. Protection of indirect contact: Effective fault protection by means of automatic disconnection of supply is based on disconnecting supply from the section of the installation concerned in such a way as to limit the time/touch voltage relationship to safe values in the event of an insulation fault. The earth fault-loop impedance shall not exceed a value which would prevent the automatic operation of the protective device. The active and earth conductors form part of the earth fault loop current path and hence the size of the cable conductors must be taken into consideration. The minimum cross-section of the PE conductor connected to each LV consumer shall depend on the phase conductor cross-section (as per HD 384.5.54), as follows: Table 1 Phase conductor crosssection (mm2) PE conductor minimum crosssection (mm2) 25 16 35 16 50 25 70 35 95 50 120 70 150 95 185 95 240 120 300 150 400 240 500 240 One common PE conductor shall be installed on each power tray arrangement (vertical configuration) and shall be connected to all loads that are fed from the respective tray
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 131 arrangement. Minimum cross section of common PE conductors shall depend on the biggest phase conductor cross section that is installed on the respective tray according to the above table but shall be at least 35mm2. The sizing of the MV cables shall be based on the coefficients as per IEC 60502-2, for continuous operation in ambient air or ground temperature environment as defined in project specifications. The sizing of the MV cables shall satisfy the following criteria: • Current carrying capacity: The maximum continuous current carrying capacity of each individual cable type and cross-section used will be determined taking into account site environmental conditions with safety margin 5%. The derating factors of cables, one for laying conditions and one for ambient temperature, will be fixed on the basis of the worst ambient temperature and laying conditions met throughout their routing on the basis of IEC 60502-2. • Voltage drop / start-up voltage drop calculations: The maximum overall supply network voltage drop under normal operation will not exceed 3% at the full load current of the equipment. For the voltage drop calculations the rated voltages will be multiplied by 0.95 as a safety factor. Cables cross-sections of the motors will be also calculated for voltage drop during start up according to the following criteria. The maximum overall supply network voltage drop during starting will not exceed 12% of rated network voltage for all motors. Overcurrent protection of cables: The conductor cross section of each cable will be adequate for carrying the prospective fault current determined by the next relevant short-circuit protection device (i.e. the upstream Circuit Breaker) when operating under the specified load conditions without deterioration of the dielectric. The short-circuit withstand time will be be coordinated with the characteristic of the protective device. The maximum fault current will be the base of the calculations in order to obtain results on the safe side. 7. Cable colour code The colour identification for LV conductors will be as per the following table considering different formations: Current type AC DC Function L1 L2 L3 N PE + - PE Color Brown Black Grey Blue Green/ Yellow Brown Grey Green/ Yellow Code BR BK GR BL GN/YE BR GR GN/YE Nº of conductors 2 (2x) X X X X 3 (3x) X X X 3 (3G) X X X X X X 4 (4x) X X X X 4 (4G) X X X X 5 (5G) X X X X X 6 or more (6x) Numerical Black Conductors Single-core cables with other than green, yellow or green/yellow insulation, used as earthing conductors, will be identified continuously along their entire length.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 132 21. CABLE TRAYS AND CONDUITS The following types of wiring systems will be used for the cable distribution network at Plant: cable ladders, cable trays, underground ducts, metal conduits or embedded PVC conduits (if needed). Different cable ways (cable trays, conduits or ducts) will be supplied for the various services, as shown below: • Cable ways for MV power cables. • Cable ways for LV power cables. • Cable ways for instrumentation and control cables. Segregation and separation are described in section 5.20.55.20.5. 1. Cable laying in cable trays & conduits Cable trays shall be designed, manufactured and tested according to IEC 61537. The cable trays and their accessories shall be heavy duty type and hot dip galvanized steel of 85 µm as minimum. Cable trays and conduits installed in chemical areas shall be protected against corrosion (e.g. epoxy paint, etc.) Ladder-type cable trays swill be used for MV and LV power cables. Perforated cable trays will be used for instrumentation and control cables, including communication cables. Covers will be provided for power cable trays located in the upper part of the trays distribution where the cablesand ladder rack where the cables are in direct sunlight. I&C cable trays (levels 1 and 2 as per segregation indicated in section 5.20.45.20.4) will have covers in their entire route. Steel cable ties will be used for vertical runs of cable and for horizontal runs which are in direct sunlight. In addition, vertical cable trays will be protected with covers for a minimum distance of 250 cm above the floor level. Vertical ladder trays will be provided with covers on both sides in such locations. Cables installed in vertical trays will be secured to the trays by means of adequate grips at intervals not exceeding 3 m with a minimum of two (2) grips (top, middle). Cable tray and ladder width shall be 100, 200, 300, 400, 500 or 600 mm and height of 100 mm. Trays with 60 mm height may be used as exception. The curvature radius will be adequate to installed cables, it will be 300 mm as minimum for low voltage cables. Trays filling will be made according to the voltage level: • Medium voltage level. • Single-core cables (S>95mm2) will be laid as triangle shape in one single layer with a maintained free space of not less than 2 times the diameter of the largest conductor. • Multicore cables (S≤95mm2) will be installed in one unique layer with a maintained free air space of not less than 1 time the diameter of the largest cable. • Maximum filling status of the cable tray will be the 80% of the maximum net capacity of the tray. • Low voltage level. • Single-core cables (S>95mm2) will be laid as triangle shape in one single layer. • Multicore cables (S≤95mm2) for consumers rated above 2.5 kW could be laid in contact, but in one single layer.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 133 • Multicore cables (S≤95mm2) for consumers rated equal or below 2.5 kW could be laid in contact and in a maximum of 3 layers. • Maximum filling status of the cable tray will be the 80% of the maximum net capacity of the tray. • Instrumentation level. Laid in contact and in multiple layers (up to 3 layers). Cables will be laid up to 80% of the maximum net capacity of the tray. Single-core cables run in trefoil will be cleated using non-magnetic trefoil cleats which will be capable of withstanding the forces produced under short-circuit conditions. Conduits will be hot-dipped galvanized conduit or PVC conduit. PVC conduits will be use in underground duct banks, concrete embedment or in corrosive areas. Hop dipped galvanized conduits will be installed in outdoors areas. PVC conduits will be used as well for the lighting system when needed. Conduits will be designed and installed as a complete system and securely fastened in place. Minimum conduit size will be 25 mm for all circuits other than lighting. The allowable percent of conduit fill by cables will be 50%. Where the cables come out of the ground or foundations, they will be protected in conduits, or other protection against mechanical damage, over a length of 250 mm above and below ground level. Vertical conduit runs entering motor junction boxes etc, from trays above will be sealed at the tray and furthermore exit from the tray horizontally. Conduits will not penetrate cable tray sidewalls. Sealing fittings will be installed, in all conduit runs at the boundary between no hazardous and hazardous areas. Sealing fittings will also be installed at boundaries where it is desirable to prevent the transference of different atmospheric conditions between areas. Fire-break barriers will be installed whenever the cables pass through rooms, enter boards and at any point considered necessary for proper fire protection. In addition, the following guidelines will be applied to the installation of cable tray system and contained cables or raceways: • The system will not present sharp edges, burrs, or projections injurious to the insulation or jackets of the wiring. • Cable trays will be installed as a complete system. Field bends or modifications will be so made that the electrical continuity of the cable tray system and support for the cables will be maintained. Cable route direction will be made using pre-fabricated elements. • Each run of cable tray will be completed before the installation of cables. Each cable tray will be grounded at both ends and at intervals of around 20 meters. Interruptions in the cable trays runs will be bridged properly. • Supports will be provided to prevent stress on cables where they enter another raceway or enclosure from cable tray systems. Distances between neighboring supports will not exceed 3 meters. • In portions of runs where additional protection is required, covers or enclosures providing the required protection will be of a material compatible with the cable tray. • Cables for the lighting system will be laid in separate cable ways. • Fire resistance cables will be laid in separate cable ways. E90 fire resistance cable trays and supports will be used. These cable trays will be installed above all other
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 134 electrical installations, so that the elements of other installations falling during the fire, do not damage these cable trays. • SIL loop cables shall be routed in separate cable ways. • Cables with different voltage insulations will not be laid in contact. • Cable trays will be permitted to extend transversely through partitions and walls or vertically through platforms and floors in wet or dry locations where the installations, complete with installed cables are made in accordance with applicable codes and contract requirements. Cable passage in walls and ceilings will be made of prefabricated elements (plastic or metal fittings) certified in terms of fire protection properties and ensuring easy installation of additional cables as well as easy dismantling of the cables already installed in the spare passage channels (minimum 10% in each passage). • Sufficient space will be provided and maintained around cable trays to permit adequate access for installing and maintaining cables. • In other than horizontal runs, the cables will be fastened securely to transverse members of the cable trays. • Where single-conductor cables comprising each phase or neutral of a circuit are connected in parallel, the conductors will be installed in groups consisting of not more than one conductor per phase or neutral in order to prevent current imbalance in the paralleled conductors due to inductive reactance. Single conductors will be securely bound in circuit groups to prevent excessive movement due to fault-current magnetic forces. • Control wires and power cables will be grouped in different cable trays in order to avoid possible induction and cause false signals or interference in control cables. In case, control wires have to be installed in the same cable tray, a metal barrier will be installed between them. • In places exposed to excessive dusting, cable trays will not be installed in horizontal position. Also, in same areas, cable trays will have covers (routes under platforms and passageways). • Materials for passive protections will have fire resistance certification for minimum 120 minutes. Such materials will be used in the following situations: • Fire partitions in cable ducts and passages. • Fire partitions in cable shafts. • Seals of cable passage through walls and ceilings. 2. Cable laying in buried ducts In addition to what is mentioned in the general chapter, the following requirements apply to the buried duct installation. Buried ducts shall be made of PVC, rigidly encased in concrete or sand. Duct banks will be backfilled to provide a neat surface finish. In general, the diameter of buried ducts will be 160 mm. When cables need bigger or smaller ducts, the diameter to be used will be defined as per cable dimension and the duct route. In the case of single conductor cables, the 3 phases will run in the same conduit. Filling criteria in buried ducts shall not be more than 50%. Each MV cable or triad will be laid in one duct. To define the number of ducts to be run it must be taken into consideration the next criteria:
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 135 • For every buried duct bank, at least one duct shall be provided for communications. • For every buried duct bank, a minimum of 15% of spare ducts (not less than one) will be provided if possible. Preferably all conduits runs will be straight. Non straight runs will be used when allowed by local regulations. A cable pulling pit shall be constructed every 35 meters or less and wherever conduits change direction. Depth in the ground of buried cable duct bank should be taken according to local conditions, but not less than 0,6 m. These distances are referred to upper cables. Reduction of depth up to 0,5 m on sites in length up to 5 m is permitted at entering of lines into buildings, as well as in places of their crossing with underground constructions. Buried cable duct bank will have a slop not less than 0,2% in the direction of the pit. The same grade is necessary to observe and at the laying of tubes for cables. Distances between cables must be not less than: • 100 mm between U ≤ 10 kV cables and control cables. • 250 mm between 20 ≤ U ≤ 35 kV cables and other cables. • 500 mm between cables of other organizations and between high voltage cables and communication cables. Following images shows the typical section used for cables installed in buried ducts considering the segregation indicated in section 5.20.45.20.4: The distances between buried duct bank and building foundations must be at least 0,6 m. The minimum horizontal distances between buried ducts and parallel pipes will be:
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 136 • Pipelines, water pipelines, canalization and drainage should be not less than 1 m. It is allowed to reduce up to 0,5 m on sites in length up to 5 m. • Gas pipelines should not be less than 1 m. • Gas pipelines of high pressure (0,588 < P < 1,176 MPa) should not be less than 2 m. Parallel tracing of cables above and under pipelines is not allowed. Distance between buried duct banks and pipes in crossings: • At the crossing of the cable lines of voltage up to 35 kV with the pipelines, including the oil and gas pipelines, the distance between the cable and the pipeline shall be not less than 0.5 m. It is allowed to decrease this distance until 0.25 m if the cable is routed at the crossing area in the pipes with extension of the pipes at least for 2 m to each side. Distance to other systems: • Between buried duct bank ands and railways in parallel will be not less than 3,25 m. • Between buried duct bank ands and roads in parallel will be not less than 1,5 m. • Between buried duct bank ands and HV towers will be not less than 5 m. 22. LIGHTING AND SMALL POWER SYSTEM 1. Lighting system The lighting system will be designed to ensure adequate lighting intensity for different areas of the plant, included emergency and evacuation lighting. The design of the illumination level in the indoor and outdoor areas will be in accordance with applicable standards and regulations. Lighting system design requirements will comply at least with the following standards: PN-EN 12464-1 and PN-EN 12464-2. The lighting system and its power supply distribution should include five categories: • A Normal lighting, which includes lighting circuits and socket outlet circuits. Normal lighting supplies will be powered from dedicated distribution lighting switchboards system, 400/230 V, 3 Ph plus neutral, supplied from one of the main LV Switchboards of the Plant. • The emergency lighting system ensures that basic lighting is distributed to any areas needing intervention in complete voltage loss conditions in the CCGT Plant. This system will supply lighting panels that require that type of power. The emergency lighting switchboards will be powered from the emergency LV Switchgear of the Pant through a dedicated UPS. In the event of power loss in the 400 V system, the essential Lighting Switchgear and thus the emergency lighting will be powered from the Emergency Diesel Generator. Emergency lighting will constitute around 1/3 approx. of the lighting requirements. • An evacuation lighting system fed from batteries, which serves only to mark emergency exits from rooms inhabited by people, and along corridors and escape routes. The safety lighting system will consist in fixed, LED units with individual self-contained 1 hour battery. The safety lighting will be powered as well from the emergency lighting switchboards mentioned in previous point. • Obstacle lighting system that will mark high-rise buildings or structures visible to passing aircrafts. This system shall be prepared for structures defined in by the regulation of the Minister of Infrastructure of 12 January 2021 on air obstacles, obstacle limitation surfaces and equipment of a hazardous character (Journal of Laws of 2021, item 264). Obstacle lighting will be powered from UPS source.
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 143
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 144 Annex 11: More cable tray design details
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 145
Final master's thesis: Automatic routing of cables through cable trays and ducts using Python 146