Modelica model and genetic algorithm-based subway station air conditioning water system energy saving method

By combining Modelica with genetic algorithms, a simulation model of the subway station's air-conditioning water system was established, and the control strategies for chilled and cooling water were optimized. This solved the high energy consumption and difficulty in regulating the subway station's air-conditioning water system, reducing system energy consumption and extending equipment life.

CN120630753AActive Publication Date: 2025-09-12GUANGZHOU METRO DESIGN & RES INST CO LTD

Patent Information

Application Number
CN202510723152.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-12
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

The air-conditioning water system in subway stations has problems of high energy consumption and difficulty in regulation. Existing control methods such as PID regulators are prone to oscillation when the load changes, and intelligent control methods such as fuzzy control and neural networks have limitations and are difficult to handle high-dimensional or multi-variable problems.

Method used

An energy-saving method based on the Modelica model and genetic algorithm was adopted. Through precise modeling, intelligent optimization and closed-loop control, a simulation model of the subway station air-conditioning water system was established. The genetic algorithm was used to optimize the control strategy. Combined with the joint simulation interface of Python and MATLAB, the chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow were optimized.

Benefits of technology

It has achieved a reduction in energy consumption of the air-conditioning water system, improved energy-saving effects, shortened response time, reduced the number of equipment starts and stops, extended equipment life, supported rapid adaptation to subway stations of different sizes, and solved the problems of high energy consumption and difficult control of the air-conditioning water system in subway stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120630753A_ABST
    Figure CN120630753A_ABST
Patent Text Reader

Abstract

The invention provides a metro station air-conditioning water system energy saving method based on a Modelica model and a genetic algorithm, and relates to the technical field of rail transit building energy optimization and intelligent control, the method comprises the following steps: establishing a simulation model of a metro station air-conditioning water system in Dymola software based on a Modelica language; performing population initialization on the established simulation model, realizing a genetic algorithm by utilizing MATLAB, and taking minimization of the total energy consumption of the air-conditioning water system as a target function to obtain an optimization control strategy; according to the optimization control strategy, a Dymola-MATLAB joint simulation interface is constructed through Python; and according to the joint simulation interface, an optimal control strategy of the subway station air conditioner water system is obtained through genetic algorithm iterative optimization. According to the method, through the technical path of'precise modeling-intelligent optimization-closed-loop control ', the industrial problems of'high energy consumption and difficult regulation and control' of the subway station air conditioning water system are systematically solved, and an innovative solution is provided for intelligent rail transit construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy optimization and intelligent control of rail transit buildings, and in particular to an energy-saving method for an air-conditioning water system of a subway station based on a Modelica model and a genetic algorithm. Background Art

[0002] To alleviate urban traffic congestion, urban rail transit systems, particularly subway systems, are receiving increasing attention. The average annual electricity consumption of subway stations in my country reaches 1.8 to 2.3 million kWh, with ventilation and air conditioning systems alone accounting for over 40% of this total energy consumption, and water systems accounting for 60 to 65% of the total air conditioning system's energy consumption. Consequently, researchers both domestically and internationally are increasingly focusing on energy conservation in air conditioning water systems.

[0003] Currently, most subway stations in China still use PID controllers, which control the speed of variable-frequency fans or pumps to reduce energy consumption while ensuring comfort. PID control can dynamically adjust the output of air conditioning equipment based on changes in indoor and outdoor loads, reducing unnecessary energy waste. However, PID control methods are difficult to tune and debug, and are prone to oscillation when the air conditioning system load and operating conditions change, resulting in poor control effectiveness. Furthermore, this traditional control method struggles with systems that exhibit nonlinear, time-varying, and complex characteristics.

[0004] With the development of artificial intelligence, scholars have proposed new research methods to optimize subway station air conditioning water systems, such as fuzzy control, reinforcement learning, and neural networks. However, these methods all have limitations, such as difficulty handling high-dimensional or multivariable problems, difficulty or slow convergence, difficulty in applying to real-world scenarios, and high requirements for data and computing resources. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide an energy-saving method for subway station air-conditioning water systems based on the Modelica model and genetic algorithm. Through the technical path of "precise modeling-intelligent optimization-closed-loop control", it systematically solves the industry problem of "high energy consumption and difficult regulation" of subway station air-conditioning water systems, providing an innovative solution for the construction of smart rail transit.

[0006] In order to solve the above technical problems, the technical solutions of the present invention are as follows:

[0007] In a first aspect, a method for energy saving in a subway station air conditioning water system based on a Modelica model and a genetic algorithm is provided, the method comprising:

[0008] A simulation model of the subway station air conditioning water system was established in Dymola software based on Modelica language;

[0009] The population of the established simulation model is initialized, and the genetic algorithm is implemented using MATLAB. The objective function is to minimize the total energy consumption of the air conditioning water system and obtain the optimal control strategy.

[0010] Based on the optimized control strategy, a Dymola-MATLAB joint simulation interface was constructed through Python;

[0011] Based on the joint simulation interface, the optimal control strategy of the subway station air conditioning water system is obtained through iterative optimization of the genetic algorithm.

[0012] Furthermore, a simulation model of the subway station air conditioning water system was established in Dymola software based on the Modelica language, including:

[0013] Based on the actual structure of the subway station's air conditioning water system, determine the key components of the modeling, including the chilled water circulation environment and the cooling water circulation environment;

[0014] Use the Modelica language in Dymola software to build a chilled water cycle environment model. The model includes the chiller, terminal equipment, and chilled water pump, and configures the chilled water cycle process.

[0015] Use the Modelica language in Dymola software to build a cooling water circulation environment model. The model includes a chiller, cooling tower, and cooling water pump, and configures the cooling water circulation process.

[0016] Create custom component models for chilled water pumps and cooling water pumps, inputting actual performance curve parameters;

[0017] Select and integrate other standard components from Dymola's HVAC component library to complete the modeling of the entire air conditioning water system.

[0018] Furthermore, the population of the established simulation model was initialized, and the genetic algorithm was implemented using MATLAB. With minimizing the total energy consumption of the air conditioning water system as the objective function, the optimal control strategy was obtained, including:

[0019] Based on the established Modelica model of the air conditioning water system, key control parameters to be optimized are determined, including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate;

[0020] Initialize the genetic algorithm population in MATLAB, set the population size, number of iterations, and optimization objective function;

[0021] The fitness function is defined as the inverse of the objective function. Individuals are selected through the fitness function, and crossover and mutation operations are performed to generate a new population.

[0022] The iterative calculation is performed until the termination condition is met and the optimized control strategy is obtained.

[0023] Furthermore, the fitness function is defined as the inverse of the objective function. Individuals are selected based on the fitness function, and crossover and mutation operations are performed to generate a new population, including:

[0024] The fitness function is defined as the inverse of the objective function;

[0025] Through the fitness function, the proportional selection method is adopted to select individuals, and according to the roulette wheel selection mechanism, individuals with higher fitness are selected from the current population as parents;

[0026] For the selected parent individuals, a single-point crossover operation is performed according to the preset crossover probability to generate new offspring individuals;

[0027] For the newly generated offspring individuals, a single-point mutation operation is performed according to the preset mutation probability, and random perturbations are performed within its value range;

[0028] The new individuals generated through selection, crossover and mutation operations are combined with some excellent original individuals to generate a new generation of population.

[0029] Furthermore, based on the optimized control strategy, a Dymola-MATLAB co-simulation interface was constructed through Python, including:

[0030] According to the optimization control strategy, the Modelica model is used through the Dymola simulation environment to configure the interface environment between Python and Dymola;

[0031] Call the Dymola API through Python to establish a communication connection with the Modelica simulation model;

[0032] Set up the data interaction interface between Python and MATLAB to achieve two-way transmission of optimization parameters;

[0033] Associate the simulation file exported from the Modelica model with the Python interface;

[0034] Verify the communication stability of the joint simulation interface and establish a complete joint simulation platform.

[0035] Furthermore, based on the co-simulation interface, the optimal control strategy for the subway station air conditioning water system was obtained through iterative optimization using a genetic algorithm, including:

[0036] According to the co-simulation interface, the optimization parameters generated by the genetic algorithm are input into the Modelica model;

[0037] The total energy consumption of the air conditioning water system under different parameter combinations is calculated through Modelica simulation;

[0038] Based on the simulation results, a genetic algorithm is used to iteratively optimize the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate until the preset energy consumption minimization target is met.

[0039] Output the optimal control strategy, including the optimal parameter combination of chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow, to achieve energy saving in the subway station air conditioning water system.

[0040] Secondly, an energy-saving system for the air conditioning water system of a subway station based on the Modelica model and genetic algorithm includes:

[0041] Modelica simulation module, used to build a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language;

[0042] The genetic algorithm optimization module is used to initialize the population of the established simulation model and implement the genetic algorithm using MATLAB. The objective function is to minimize the total energy consumption of the air conditioning water system and obtain the optimal control strategy.

[0043] An interface module, used to build a Dymola-MATLAB co-simulation interface through Python based on the optimized control strategy;

[0044] The control module is used to obtain the optimal control strategy of the subway station air conditioning water system through iterative optimization of the genetic algorithm based on the joint simulation interface.

[0045] According to a third aspect, a computing device includes:

[0046] one or more processors;

[0047] The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method.

[0048] In a fourth aspect, a computer-readable storage medium stores a program, which implements the method when executed by a processor.

[0049] The above solution of the present invention includes at least the following beneficial effects:

[0050] By combining Modelica high-precision modeling with genetic algorithm global optimization, the energy consumption of the air conditioning water system is reduced, the energy saving effect is improved, and multi-parameter collaborative optimization avoids system efficiency loss caused by single parameter adjustment, improving overall energy efficiency. It adapts to 8760 hours of load changes throughout the year, including complex working conditions such as seasonal transitions and passenger flow fluctuations. The real-time response time is shortened by 50%, and the temperature control accuracy reaches ±0.5℃ (traditional method ±1.5℃). The optimization strategy reduces the number of equipment starts and stops, and the mechanical wear of key equipment (water pumps, chillers) is reduced by 40%, and the expected life is extended by 30%. The automated optimization process will be adjusted The trial period was shortened from 2 weeks to 2 days. The parameter configuration is compatible with the existing BAS system and does not require hardware modification. The modular design supports rapid adaptation to subway stations of different sizes. The first Modelica-GA joint simulation framework solves the technical bottleneck of multi-software collaboration. The real number coding and dynamic probability adjustment mechanism improves the algorithm convergence speed by 40%, and the interface error is <0.5%, ensuring the reliability of the optimization results. Through the technical path of "precise modeling-intelligent optimization-closed-loop control", it systematically solves the industry problem of "high energy consumption and difficult control" of subway station air-conditioning water systems, providing an innovative solution for the construction of smart rail transit. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The present invention provides a flow chart of an energy-saving method for a subway station air-conditioning water system based on a Modelica model and a genetic algorithm.

[0052] Figure 2 The present invention provides a schematic diagram of an energy-saving system for a subway station air-conditioning water system based on a Modelica model and a genetic algorithm.

[0053] Figure 3 The present invention provides a schematic diagram of a Modelica model for a subway station air conditioning water system energy saving method based on a Modelica model and a genetic algorithm.

[0054] Figure 4 The present invention provides a genetic algorithm flow chart of a method for energy saving of a subway station air conditioning water system based on a Modelica model and a genetic algorithm. DETAILED DESCRIPTION

[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0056] like Figure 1As shown, an embodiment of the present invention proposes an energy-saving method for a subway station air-conditioning water system based on a Modelica model and a genetic algorithm, the method comprising the following steps:

[0057] Step 11: Building a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language;

[0058] Step 12: Initialize the population of the established simulation model, implement the genetic algorithm using MATLAB, and take minimizing the total energy consumption of the air conditioning water system as the objective function to obtain the optimal control strategy;

[0059] Step 13: Based on the optimized control strategy, a Dymola-MATLAB co-simulation interface is constructed through Python;

[0060] Step 14: According to the joint simulation interface, the optimal control strategy of the subway station air conditioning water system is obtained through iterative optimization of the genetic algorithm.

[0061] In this embodiment of the present invention, a highly consistent air conditioning water system model is created through Modelica modeling, ensuring the accuracy of the optimization foundation. The global search capability of the genetic algorithm can overcome local optimal limitations and achieve system-level energy consumption minimization. Multi-parameter collaborative optimization avoids system efficiency losses caused by adjusting a single parameter, adaptively adjusts genetic algorithm parameters to cope with seasonal load fluctuations, and responds to changes in indoor and outdoor environmental parameters in real time to maintain optimal operating conditions. A Python interface enables seamless integration of commercial software, a modular design supports rapid adaptation to subway stations of varying sizes, and an automated optimization process reduces manual debugging workload. Under the goal of minimizing energy consumption, indoor temperature and humidity comfort requirements, equipment operational stability constraints, and critical equipment lifespan are automatically met. The Modelica model supports subsequent integration into BIM / CIM digital twin systems, the genetic algorithm framework can be expanded to other optimization objectives, and the interface protocol is compatible with mainstream building automation systems. This effectively addresses the industry pain points of "high energy consumption and difficulty in regulation" in subway station air conditioning systems, providing an energy-saving solution for smart subway construction.

[0062] In a preferred embodiment of the present invention, the above step 11, establishing a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language, may include:

[0063] Step 111: Determine key components for modeling based on the actual structure of the subway station air conditioning water system, including a chilled water circulation environment and a cooling water circulation environment;

[0064] Step 112: Using the Modelica language in Dymola software, a chilled water cycle environment model is established. The model includes a chiller, terminal equipment, and a chilled water pump, and the chilled water cycle process is configured.

[0065] Step 113: Using the Modelica language in Dymola software, a cooling water circulation environment model is established. The model includes a chiller, a cooling tower, and a cooling water pump, and a cooling water circulation process is configured.

[0066] Step 114 , creating a custom component model for the chilled water pump and the cooling water pump, and inputting actual performance curve parameters;

[0067] In step 115 , other standard components are selected and integrated from the HVAC component library of Dymola to complete the modeling of the entire air conditioning water system.

[0068] In this embodiment of the present invention, the actual structural modeling of the subway station's air-conditioning water system is used to ensure that the simulation model is highly consistent with the actual system, thereby improving the accuracy of the optimization results. The simulation model includes both the chilled water cycle and the cooling water cycle, avoiding errors caused by simplified models. Actual performance parameters are input into the customized water pump model to make the simulation closer to actual operating conditions. The Dymola HVAC component library is used to quickly integrate standard equipment and reduce repetitive modeling work. The complete circulation process of chilled and cooling water is accurately simulated, providing a reliable simulation environment for subsequent genetic algorithm optimization. The model supports steady-state and transient simulations, accurately reflecting dynamic processes such as load changes and equipment start-up and shutdown, ensuring the effectiveness of the optimization strategy in actual operation.

[0069] In an embodiment of the present invention, the specific steps include:

[0070] Step 111, during the collection phase, collect design drawings and technical specifications for the subway station's air conditioning water system. Field measurements will be taken to record the piping layout and key equipment installation locations. Performance parameter tables for equipment such as chillers, water pumps, and cooling towers will be compiled. The main components of the chilled water circulation system include chillers (including the evaporator side), chilled water pump units (including variable frequency control systems), air conditioning terminal units (fan coil units, air handling units, etc.), and chilled water circulation piping systems. The main components of the cooling water circulation system include chillers (including the condenser side), cooling water pump units, cooling tower units, and cooling water circulation piping systems. A list of equipment parameters will be compiled, including rated power, flow range, and temperature control range. Performance curve data for each device will be collected to determine the system's control logic and operating strategy.

[0071] Step 112: Use the Modelica language in Dymola software to establish a chilled water circulation environment model. The model includes a chiller, terminal equipment, and a chilled water pump, and configures the chilled water circulation process. The chiller includes setting key parameters such as cooling capacity and COP and configuring the evaporator side water connection interface. The chilled water pump includes defining the pump rated parameters and setting the frequency conversion control logic. The terminal equipment includes selecting a model and setting heat exchange parameters. After passing through the chiller condenser, the chilled water is pumped to the terminal by the chilled water pump and then returns to the chiller, forming a chilled water pump cycle.

[0072] Step 113: Use the Modelica language in Dymola software to establish a cooling water circulation environment model. The model includes a chiller, a cooling tower, and a cooling water pump, and configures the cooling water circulation process. The cooling system component modeling includes modeling the chiller condenser side, setting the cooling water pump parameters, and modeling the cooling tower performance. The circulation environment construction includes establishing the cooling water circulation pipeline connection, setting the cooling water design operating parameters, and configuring the cooling tower control strategy. The cooling water passes through the chiller evaporator and is sent to the cooling tower and then returned to the chiller by the chilled water pump, forming a cooling water cycle.

[0073] Step 114: Collect performance curve data provided by the water pump manufacturer and organize key curves such as flow-head and flow-efficiency. Build a basic water pump model based on the Modelica language, import measured performance curve data, set up a parameter adjustment interface, verify the model output under working conditions, and adjust parameters to ensure model accuracy.

[0074] Step 115: Add necessary auxiliary equipment such as valves and sensors from the library and configure the safety protection device model; unify the parameter units of each system component and set the simulation environment parameters; perform steady-state operating condition verification, execute dynamic response testing, and adjust model parameters to improve accuracy; encapsulate the complete air conditioning water system model into a reusable composite component, set standardized input and output interfaces, and generate model documentation; export the model to the MO file format and call the MO file through the Python environment. When assigning values ​​to the input interface parameters (including the chilled water outlet temperature, the cooling tower outlet temperature, and the cooling water pump flow) in Python, it can drive the Modelica model to perform simulation calculations and return the output interface parameters (total system energy consumption).

[0075] In a preferred embodiment of the present invention, the above step 12, initializing the population of the established simulation model, implementing a genetic algorithm using MATLAB, and taking minimizing the total energy consumption of the air conditioning water system as the objective function to obtain an optimized control strategy, may include:

[0076] Step 121: Based on the established Modelica model of the air conditioning water system, determine the key control parameters to be optimized, including the chilled water outlet temperature, the cooling tower outlet temperature, and the cooling water pump flow rate;

[0077] Step 122, initialize the genetic algorithm population in MATLAB, set the population size, number of iterations and optimization objective function;

[0078] Step 123: The fitness function is defined as the inverse of the objective function. Individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population.

[0079] Step 124 , iterative calculation is performed until a termination condition is met to obtain an optimized control strategy.

[0080] In an embodiment of the present invention, core control variables such as the chilled water outlet temperature, the cooling tower outlet temperature and the cooling water pump flow are optimized, directly affecting the key points of system energy consumption; the genetic algorithm avoids falling into local optimality through population iteration, ensuring that the optimal parameter combination under all working conditions is found, and the overall energy efficiency of the system is improved; while reducing energy consumption, the fitness function constraints are guaranteed to improve the indoor temperature and humidity comfort and equipment operation stability; the optimization strategy automatically adapts to seasonal and instantaneous load changes, avoiding frequent manual adjustments, shortening the system adjustment response time, and avoiding equipment overload or frequent start and stop, thereby reducing mechanical wear of water pumps and chillers.

[0081] In an embodiment of the present invention, the specific steps include:

[0082] Step 121 sets the input interface of the subway station air conditioning water system simulation model, including the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate as the objects to be optimized by the genetic algorithm; the chilled water outlet temperature is set to a dynamic adjustment range of 5-10°C, which affects the efficiency of the chiller; the cooling tower outlet temperature is set to a dynamic adjustment range of 25-35°C, which determines the working state of the condenser; the cooling water pump flow rate is set to 50-100% of the rated flow rate, which is related to the water pump energy consumption and heat exchange effect.

[0083] Step 122: Based on the parameter dimension setting (usually 50-200 individuals), the number of iterations is determined based on the convergence test (default is 100-500 generations). The objective function is to minimize the total energy consumption of the system. The total energy consumption is calculated by the following process: Among them, P el is the instantaneous energy consumption of the system, is the instantaneous energy consumption of the chiller, is the instantaneous energy consumption of the chilled water pump, is the instantaneous energy consumption of the cooling water pump, is the instantaneous energy consumption of the cooling tower. Among them, E elThe annual energy consumption of the air conditioning water system is The energy consumption of the air conditioning water system at hour k is simulated using Modelica's built-in solver (Dassl) to obtain the annual energy consumption. Latin hypercube sampling (LHS) is used to generate the initial population to ensure uniform coverage of the parameter space. Each individual is encoded as a real vector of the form [chilled water temperature, cooling tower temperature, pump flow].

[0084] In step 123, the fitness function is defined as the inverse of the objective function. A penalty term is introduced to handle constraint violations (e.g., a sudden drop in fitness when temperature and humidity exceed the standard). A roulette wheel selection method is used to prioritize individuals with high fitness. Simulated binary crossover (SBX) is performed on the selected individuals, some parameter values ​​are exchanged, and polynomial mutation is applied to the parameters according to probability to maintain population diversity. Parent and offspring individuals are merged, and the new generation population is selected according to fitness ranking. The best individual of each generation and its objective function value are recorded.

[0085] Step 124, convergence condition determination, the optimal individual fitness change rate is <0.01% for 10 generations, and the preset number of iterations (e.g., 200 generations) is reached; the global optimal parameter combination is output as the chilled water temperature set value, the cooling tower temperature set value, and the water pump flow regulation curve; a parameter-energy consumption relationship map is generated to guide the adjustment of the operation strategy and obtain the optimized control strategy.

[0086] In a preferred embodiment of the present invention, in step 123, the fitness function is defined as the inverse of the objective function, and individuals are selected using the fitness function, and crossover and mutation operations are performed to generate a new population, which may include:

[0087] Step 1231, the fitness function is defined as the inverse of the objective function;

[0088] Step 1232: Using the fitness function and the proportional selection method, select individuals. Based on the roulette wheel selection mechanism, select individuals with higher fitness from the current population as parents.

[0089] Step 1233: Perform a single-point crossover operation on the selected parent individual according to a preset crossover probability to generate a new offspring individual;

[0090] Step 1234: Perform a single-point mutation operation on the newly generated offspring individuals according to the preset mutation probability, and perform random perturbations within the value range;

[0091] In step 1235, the new individuals generated by the selection, crossover and mutation operations are combined with some of the excellent original individuals to generate a new generation population.

[0092] In an embodiment of the present invention, a proportional selection method and a roulette wheel mechanism are used to select high-fitness individuals as parents based on the fitness function, ensuring that high-quality individuals participate in genetic operations, driving the population to evolve toward the optimization goal, and accelerating the algorithm to converge to the optimal or near-optimal solution. In the optimization of the air-conditioning water system of a subway station, a combination of operating parameters with low energy consumption, high comfort, and stability can be quickly found, saving resources and time. A single-point crossover is performed on the selected parent generation to generate offspring, combining excellent features to increase population diversity; a single-point mutation is performed on the offspring, and random perturbations are used to break the local optimum and explore a wider solution space. The new individuals are combined with some excellent original individuals to form a new generation population, which not only promotes evolution and introduces new features, but also retains excellent individuals to maintain stability, avoids the impact of bad individuals on performance, and ensures the robustness of the algorithm.

[0093] In an embodiment of the present invention, the specific steps include:

[0094] Step 1231: Based on the Modelica model simulation results, obtain the total system energy consumption value corresponding to each individual and calculate the fitness value Among them, f is the objective function, F j is the fitness of individual j in the population, which is the inverse of the individual objective function f, ensuring that the lower the energy consumption, the higher the fitness.

[0095] Step 1232, according to the proportional selection method formula, calculate the probability of each individual being selected, and map the selection probability of each individual to the interval (0,1) in sequence to form non-overlapping probability regions. Use a random number generator to generate the same number of random numbers between 0 and 1 as the population size, and check which individual's probability region each random number falls into. The individual corresponding to the region is selected as the parent individual, and repeat this process until a sufficient number of parent individuals are selected.

[0096] In step 1233, the selected parent individuals are grouped into adjacent pairs. To improve the crossover probability, a single-point crossover operation is performed on the chromosomes of two adjacent individuals. A crossover position is randomly selected, and the chromosomes are exchanged from that position, similar to gene fission and recombination in biological evolution. In this way, the two offspring individuals each inherit certain characteristics of the two parent individuals. Through crossover, it is possible to combine the parent individuals into individuals with higher fitness in the offspring.

[0097] Step 1234: Perform mutation judgment on each of the newly generated offspring individuals. For each offspring individual, generate a random number between 0 and 1, and compare this random number with the preset mutation probability. For the offspring individual determined to be mutated, perform the operation on each bit of its chromosome. For each gene, randomly generate a new value within its value range to replace the original value, completing the single-point mutation operation.

[0098] Step 1235, calculate the fitness values ​​of all original individuals in the current population, sort them from high to low according to fitness, select some original individuals with higher fitness according to a pre-set retention ratio (for example, retain the individuals with the top 20% fitness in the original population), merge the new individuals generated by selection, crossover and mutation operations with the selected excellent original individuals to form a new generation population together, and prepare for the next round of genetic algorithm iteration.

[0099] In a preferred embodiment of the present invention, the above step 13, based on the optimization control strategy, constructing a Dymola-MATLAB co-simulation interface through Python, may include:

[0100] Step 131, according to the optimized control strategy, configure the Modelica model through the Dymola simulation environment, and configure the Python and Dymola interface environment;

[0101] Step 132, calling the Dymola API through Python to establish a communication connection with the Modelica simulation model;

[0102] Step 133, setting a data interaction interface between Python and MATLAB to achieve two-way transmission of optimization parameters;

[0103] Step 134 , associating the simulation file exported from the Modelica model with the Python interface;

[0104] Step 135 , verify the communication stability of the co-simulation interface and establish a complete co-simulation platform.

[0105] In an embodiment of the present invention, Dymola and MATLAB (genetic algorithm optimization) are bridged through a Python interface, breaking through the limitations of traditional single-platform simulation and achieving two-way real-time transmission of optimization parameters and simulation results. The Python interface ensures the distortion-free transmission of optimization parameters received by the Dymola simulation model. The interface has a built-in data verification function that can automatically detect and repair transmission anomalies, improving the system's fault tolerance and providing a plug-and-play joint simulation template so that even non-professional developers can quickly deploy. Dymola and MATLAB computing tasks are offloaded through interface scheduling, reducing dependence on high-performance computers and hardware costs. The interface platform supports parallel optimization of multiple subway station models and can be extended to city-level air-conditioning system cluster management. The joint simulation interface is naturally compatible with BIM / CIM systems, providing real-time optimization capabilities for smart subway operation and maintenance. Through the innovative cross-platform joint simulation interface, the technical problem of "model-algorithm" collaboration in complex system optimization is solved, providing a standardized implementation path for the intelligent optimization of building energy systems.

[0106] In an embodiment of the present invention, the specific steps include:

[0107] Step 131 confirms that the Dymola software is correctly installed and the license is activated. Also, install the Python environment and set the environment variable to point to the Dymola installation directory. Configure the environment path so that Python can call the Dymola executable program and verify that basic communication functions are functioning properly.

[0108] Step 132: Use a Python script to accurately load the target Modelica model file, carefully initialize the model simulation parameters (such as time step, solver type, etc.), and properly set up the basic operating environment of the model to lay a solid foundation for subsequent simulation work. In terms of communication link establishment, a stable and reliable inter-process communication channel is constructed, and the data transmission protocol and format are carefully configured. At the same time, a heartbeat detection mechanism is introduced to comprehensively ensure the stability and reliability of the communication connection. Functional verification testing is carried out, executing simple and representative model simulation commands to fully verify the correctness of parameter settings and the integrity of the result acquisition function. In addition, the error handling mechanism under abnormal conditions is thoroughly tested to ensure that the system can operate stably in various complex scenarios.

[0109] Step 133, data exchange protocol design is to define the data structure for parameter transmission, formulate data serialization / deserialization rules, set up a data verification mechanism; establish a parameter transmission channel from Python to MATLAB, implement a result feedback channel from MATLAB to Python, configure data caching and retransmission mechanism, and realize two-way transmission.

[0110] Step 134: Export the Modelica model as an executable simulation file, perform necessary lightweight processing on the model file, and add metadata information required by the interface; establish a mapping relationship between model variables and interface parameters, configure parameter conversion rules and unit unification, set default parameter values ​​and valid ranges; develop automatic loading and initialization scripts, implement parameter batch setting functions, and build an automatic result extraction mechanism.

[0111] Step 135, perform functional testing through single call integrity testing, continuous operation stability testing, and boundary condition testing. By evaluating and optimizing communication delays, testing large data transmission performance, and optimizing resource usage configuration, performance optimization is achieved. Platform deployment includes encapsulating complete interfaces into independent modules, writing user manuals, and preparing error code manuals and troubleshooting guides.

[0112] In a preferred embodiment of the present invention, the above step 14, obtaining the optimal control strategy of the subway station air conditioning water system through iterative optimization of the genetic algorithm according to the co-simulation interface, may include:

[0113] Step 141 , inputting the optimization parameters generated by the genetic algorithm into the Modelica model according to the co-simulation interface;

[0114] Step 142, calculating the total energy consumption of the air conditioning water system under different parameter combinations through Modelica model simulation;

[0115] Step 143 , based on the simulation results, iteratively optimize the chilled water outlet temperature, the cooling tower outlet temperature, and the cooling water pump flow rate using a genetic algorithm until a preset energy consumption minimization target is met;

[0116] Step 144 , outputting an optimal control strategy, including an optimal parameter combination of chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow, to achieve energy saving of the subway station air conditioning water system.

[0117] In this embodiment, closed-loop optimization using a genetic algorithm and Modelica simulation overcomes local optimality constraints, synchronously adjusting chilled water temperature, cooling water temperature, and pump flow, avoiding system efficiency losses caused by single-parameter adjustments. The optimization strategy automatically adapts to the subway station's 8,760-hour load fluctuations throughout the year, including seasonal changes and passenger flow fluctuations. Dynamic parameter combinations can be adjusted, shortening system response time by 50% and ensuring optimal operation under all operating conditions. This optimization strategy avoids frequent equipment starts and stops, as well as overloaded operation, extending the life of the pumps and chillers. The parameter combination, rigorously validated by simulation, reduces the risk of system oscillation.

[0118] In an embodiment of the present invention, the specific steps include:

[0119] Step 141 uses real number coding to express the system operating parameters in a structured manner. The three key parameters, cooling water flow (cwflow), chilled water outlet temperature (KM), and cooling tower outlet temperature (OP), are encoded as a real number vector of length 3, where each gene bit corresponds to the normalized value of a parameter (e.g., [0.5, 0.5, 0.5] means that the three parameters are all taken at the middle value, which actually corresponds to 30m 3 / h, 7℃ and 29℃). During the iterative process of the genetic algorithm, the system will automatically analyze the output optimization parameter matrix, extract the encoded chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow value, and verify it through the preset feasible range (such as chilled water temperature 5-9℃, cooling water flow 25-35m 3 / h, etc.); for out-of-bounds parameters, the system automatically corrects them based on their boundary values ​​to ensure that all parameters meet physical constraints. The corrected parameters are converted into a floating-point array format recognizable by the Modelica model and written in batches to the model input variable interface via the co-simulation interface. After parameter injection is complete, the system checks the update status of each target parameter in real time to verify the integrity of the parameter injection. It also records a detailed parameter modification log, including key information such as timestamps, original parameter values, and corrected values, providing complete data traceability support for subsequent optimization process analysis and system debugging.

[0120] Step 142 sets the simulation time range (e.g., 8760 hours per year) and step size (recommended: 1 hour). Select either the Dassl or CVODE solver, balancing computational speed and accuracy. Configure the output variable list, including at least the total system energy consumption, the power consumption of each device, and key temperature indicators. Start the Modelica model simulation, monitor the computational progress in real time, catch simulation anomalies (e.g., divergence, timeout), trigger the automatic recovery process, extract the simulation result file (.mat or .csv format), and analyze the total energy consumption and auxiliary indicators.

[0121] Step 143, calculate the fitness value (the inverse of the objective function) based on the simulation results, Among them, f is the objective function, F j is the fitness of individual j in the population, the inverse of the objective function f of the individual. According to the fitness value of each individual, a selection algorithm (such as roulette selection method) is used to select a certain number of individuals as parents. The formula is Among them, F j is the fitness of individual j in the population, P j is the probability of individual j being selected in the population; each individual's probability of selection can be sequentially occupied by a probability region. All probability regions are connected to form the interval (0, 1). Subsequently, a random number between 0 and 1, equal to the population size, is generated. If this random number appears in a probability region, the individual corresponding to that probability region is selected for the next generation. Clearly, individuals with high fitness are more likely to be selected and replicated into the next generation, while individuals with low fitness are more likely to be eliminated.

[0122] In order to improve the global search capability of the genetic algorithm, the crossover probability and mutation probability can be automatically updated with the fitness during the iterative calculation process. First, it is necessary to introduce the expected EX and variance DX of the fitness, such as Where n is the number of individuals in the population. As the genetic algorithm iterates, individuals with high fitness are replicated and retained in the offspring, while individuals with low fitness are eliminated. Therefore, the overall fitness of the population will gradually increase. At the same time, the number of individuals that can be retained will gradually increase, and most of them will be similar individuals with high fitness, which will gradually decrease.

[0123] Through the expectation EX and variance DX of fitness F, the population similarity coefficient ρ can be introduced. The crossover probability P can be improved by the population similarity coefficient ρ c and mutation probability P m , Among them, h1 is an adjustable constant, h1∈(0,+∞); h2 is an adjustable constant, h2∈(0,1). As the population similarity coefficient ρ increases, the crossover probability P c Will decrease, the mutation probability P m It will increase, which is more similar to the actual biological evolution process, thus achieving improvements in crossover probability and mutation probability.

[0124] To improve the crossover probability P c Perform a single-point crossover operation on the chromosomes of two adjacent individuals, randomly select a crossover position, and start exchanging them from that position, similar to gene fission and recombination in the process of biological evolution. For example, suppose two parent individuals for: Assume that crossover starts from the 3rd position, and two new offspring individuals are obtained after crossover They are: In this way, the two offspring individuals have certain characteristics of the two parent individuals. By using crossover, it is possible to combine the parent individuals into individuals with higher fitness in the offspring. m Mutation occurs on each bit of all individuals in the parent generation, and the mutation characteristics can enable the solution process to randomly search the entire space where the solution exists.

[0125] The best individual fitness is recorded in each generation. If the improvement is less than 0.1% for 10 consecutive generations, convergence is determined. When the maximum number of iterations (such as 200 generations) is reached, the process is forced to terminate and the current optimal solution is output.

[0126] Step 144: extract the individual with the highest fitness from the final iteration result of the genetic algorithm, decode its real number encoding vector, and obtain the specific values ​​of the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate; verify whether the parameters are within the feasible range of the project (such as chilled water temperature 5-9°C, cooling water pump flow rate 25-35m 3 / h), rounded off the critical values, and input the optimal parameters into the Modelica model for verification simulation to confirm that the total energy consumption of the system is consistent with the algorithm prediction (deviation <1%). The optimal parameter combination and its allowable fluctuation range (such as the chilled water temperature set point of 7.2℃±0.3℃) were listed to achieve energy saving in the subway station air conditioning water system.

[0127] like Figure 2As shown, an embodiment of the present invention further provides a subway station air conditioning water system energy saving system 20 based on the Modelica model and the genetic algorithm, comprising:

[0128] Modelica simulation module 21, used to establish a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language;

[0129] The genetic algorithm optimization module 22 is used to initialize the population of the established simulation model, implement the genetic algorithm using MATLAB, and obtain the optimal control strategy with minimizing the total energy consumption of the air conditioning water system as the objective function;

[0130] An interface module 23 is used to construct a Dymola-MATLAB joint simulation interface through Python according to the optimization control strategy;

[0131] The control module 24 is used to obtain the optimal control strategy of the subway station air conditioning water system through iterative optimization of the genetic algorithm according to the joint simulation interface.

[0132] The present invention will be further described below in conjunction with examples:

[0133] The present invention provides an energy-saving method for a subway station air-conditioning water system based on a Modelica model and a genetic algorithm, comprising the following steps:

[0134] Step 1, refer to the attached Figure 3 In the Modelica language environment, a simulation model of a subway station's air conditioning water system is built. This simulation model is divided into two main parts: the chilled water system and the cooling water system. The chilled water system includes the chiller, terminal, and chilled water pump; the cooling water system includes the chiller, cooling tower, and cooling water pump. Chilled water passes through the chiller's condenser, then is pumped to the terminal by the chilled water pump and then returned to the chiller, forming a chilled water pump circuit. Cooling water passes through the chiller's evaporator, then is pumped to the cooling tower and then returned to the chiller by the chilled water pump, forming a cooling water circuit. This example models the air conditioning water system of a subway station in Guangzhou. In this air conditioning water system model, different chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate (input) result in different total air conditioning water system energy consumption (output). Therefore, the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate are not explicitly calibrated in the model. Instead, they are provided as input interfaces to facilitate optimizing the inputs using a genetic algorithm (GA) in Python to find the maximum output.

[0135] Encapsulate the subway station air conditioning water system model and export it as an MO file. By calling the file on Python software and giving the specific values ​​of the above input in Python, the output can be calculated in the Modelica model.

[0136] At the same time, the genetic algorithm code written in MATLAB is called in Python, which realizes the joint simulation of Python, Modelica and MATLAB.

[0137] The specific process of using genetic algorithm in MATLAB is: first input the initial value of Input and calculate the Output. If it is not the optimal individual (ie Input), perform selection, crossover, and mutation operations on the individual until the optimal individual is output within the number of iterations.

[0138] Step 2: Set the input interface of the subway station air conditioning water system simulation model, including the chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow, as the optimization object of the genetic algorithm. Set the output interface of the subway station air conditioning water system simulation model to calculate the total energy consumption of the air conditioning water system, the total energy consumption E el Calculated by the following process: Among them, P el is the instantaneous energy consumption of the system, is the instantaneous energy consumption of the chiller, is the instantaneous energy consumption of the chilled water pump, is the instantaneous energy consumption of the cooling water pump, is the instantaneous energy consumption of the cooling tower. Among them, E el The annual energy consumption of the air conditioning water system is is the energy consumption of the air conditioning water system in the kth hour. The built-in solver (Dassl) of Modelica is used to simulate the system's annual energy consumption.

[0139] Step 3: Use Python to configure the interface between the Modelica model and the MATLAB genetic algorithm

[0140] ① Create an instance of the Dymola interface to call Dymola functions later

[0141] dymola=dymolaInterface()

[0142] ②Call Dymola's simulateModel function, run the Modelica model, and obtain the return value.

[0143] Package = dymola.simulateModel("Model")

[0144] ③ Load all system operation parameter combinations from the ini_value module and output these parameters

[0145] load_ini=ini_value()

[0146] print('All system operation parameter combinations include:')

[0147] print(load_ini)

[0148] ④ Initialize an empty list result and start looping through all parameter combinations load_ini.

[0149] result=[]

[0150] for iin load_ini:

[0151] ⑤ For each parameter combination, call the simulateMultiExtendedModel function, run the model, and pass in various parameters. Return the simulation status ok and the result values. ok,values ​​= dymola.simulateMultiExtendedModel("Model",5097600,28857600,0,0.0,

[0152] "Dassl",0.0001,0.0,"res",

[0153] ["cw_Flow.threshold",

[0154] "t_target_KM.k","t_target_OP.k"],

[0155] [i],

[0156] ["statEnergy.summary.E_el_cons"],)

[0157] ⑥Add the simulation result values ​​to the result list and print the total system energy consumption of the current parameter combination.

[0158] result.append(values)

[0159] print(f"When the system operating parameters are {i}, the total energy consumption is {[round(sum(j),2)for j invalues]}(kW·h)")

[0160] The joint simulation of Modelica model and MATLAB genetic algorithm can be completed based on the above interface code.

[0161] Step 4: Use genetic algorithm simulation to obtain the optimal control strategy for the subway station air conditioning water system

[0162] (1) Encoding method

[0163] The present invention uses real number coding to express system operating parameters. By encoding the system operating parameters in real numbers, they can be represented as a data structure that can be operated by a genetic algorithm. In the genetic algorithm, different individuals represent a unique system operating parameter. If the chromosome of an individual is: [0.5, 0.5, 0.5], then this chromosome with a length of 3 represents that the three parameters all take the middle value, that is, the cooling water flow (cwflow), the chilled water outlet temperature (KM), and the cooling tower outlet temperature (OP) are 30, 7, and 29 respectively.

[0164] (2) Objective function

[0165] The purpose of model parameter optimization is to find a set of optimal system operating parameters to reduce the total energy consumption of the system. Therefore, the objective function f is the total energy consumption of the system:

[0166] min f=E_el_cons

[0167] E_el_cons is the total energy consumption of the system in Dymola.

[0168] (3) Fitness function

[0169] The fitness function F is constructed using the inverse of the objective function, as shown in formula (1.1):

[0170]

[0171] Among them, F j is the fitness of individual j in the population, the inverse of the individual objective function f.

[0172] The higher the energy consumption, the better the system's operating parameter fitness F j The smaller the value, the easier it is to be eliminated in the algorithm iteration.

[0173] The implementation method of selecting individuals based on fitness (copying individuals with high fitness and eliminating individuals with low fitness) is the proportional selection method, see formula (1.2):

[0174]

[0175] Among them, P j is the probability of individual j being selected in the population.

[0176] The probability of each individual being selected can be sequentially occupied by a probability range. All probability ranges are connected to form the interval (0, 1). Subsequently, a random number between 0 and 1, the same number as the population, is generated. If this random number appears in a probability range, the individual corresponding to that probability range is selected for the next generation. Obviously, individuals with high fitness are more likely to be selected and replicated into the next generation, while individuals with low fitness are easily eliminated.

[0177] (4) Crossover probability and mutation probability

[0178] In order to improve the global search capability of the genetic algorithm, the crossover probability and mutation probability can be automatically updated with the fitness F during the iterative calculation process. First, it is necessary to introduce the expected EX and variance DX of the fitness F, see formulas (1.3) and (1.4).

[0179]

[0180] Here, n is the number of individuals in the population.

[0181] As the genetic algorithm iterates, individuals with high fitness are replicated and retained in the offspring, while individuals with low fitness are eliminated. Therefore, the overall fitness of the population will gradually increase, EX will gradually increase, and at the same time, more individuals can be retained, and most of them are similar individuals with high fitness, and DX will gradually decrease.

[0182] Through the expectation EX and variance DX of fitness F, the population similarity coefficient ρ can be introduced, as shown in formula (1.5):

[0183]

[0184] As mentioned above, with the iterative calculation of the genetic algorithm, EX gradually increases and DX gradually decreases, so the population similarity coefficient ρ will gradually increase, indicating that the similarity of individuals in the population is improved. The crossover probability P can be improved by the population similarity coefficient ρ. c and mutation probability P m , see equations (1.6) and (1.7).

[0185]

[0186] Among them, h1 is an adjustable constant, h1∈(0,+∞(; h2 is an adjustable constant, h2∈(0,1).

[0187] As the population similarity coefficient ρ increases, the crossover probability P c Will decrease, the mutation probability P m It will increase, which is more similar to the actual biological evolution process, thus achieving improvements in crossover probability and mutation probability.

[0188] (5) Single-point crossover operator

[0189] To improve the crossover probability P c Perform a single-point crossover operation on the chromosomes of two adjacent individuals, randomly select a crossover position, and start exchanging them from that position, which is similar to gene fission and recombination in the process of biological evolution. For example, suppose two parent individuals for:

[0190]

[0191] Assume that crossover starts from the 3rd position, and two new offspring individuals are obtained after crossover They are:

[0192]

[0193] In this way, the two offspring individuals have some characteristics of the two parent individuals. By using crossover, it is possible to combine the parent individuals into individuals with higher fitness in the offspring.

[0194] (6) Single-point mutation operator

[0195] To improve the mutation probability P m Mutations occur in every bit of all individuals in the parent generation. The mutation characteristics can enable the solution process to randomly search the entire space where solutions may exist, so the global optimal solution can be obtained to a certain extent.

[0196] (7) Algorithm flow

[0197] The algorithm flow is as follows Figure 4 shown

[0198] ① Start:

[0199] Read the original setting parameters of the model to obtain the initial individual;

[0200] ② Initialize the population:

[0201] Generate new individuals through random functions and form a population with the initial individuals (n=50);

[0202] ③Calculate fitness:

[0203] The fitness of the individual is calculated by the penalty function and the fitness function;

[0204] ④Select:

[0205] According to individual fitness, parent individuals are selected by proportional selection method;

[0206] ⑤ Crossover and mutation:

[0207] Perform crossover and mutation on the parent individuals according to the improved crossover probability and mutation probability to obtain the offspring population;

[0208] ⑥ Heredity:

[0209] Iterative genetic calculation: if the deviation between the top 20% individuals with the highest fitness in two generations of populations is less than the preset accuracy requirement, such as less than 0.0001, the iterative calculation is considered to have converged and can be exited early. Otherwise, the iterative calculation will be continued to the maximum number of generations (max step = 100);

[0210] ⑦ Termination:

[0211] Output optimization results.

[0212] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for energy saving of subway station air conditioning water system based on Modelica model and genetic algorithm, characterized in that: The method comprises: A simulation model of the subway station air conditioning water system was established in Dymola software based on Modelica language; The population of the established simulation model is initialized, and the genetic algorithm is implemented using MATLAB. The objective function is to minimize the total energy consumption of the air conditioning water system and obtain the optimal control strategy. Based on the optimized control strategy, a Dymola-MATLAB joint simulation interface was constructed through Python; Based on the joint simulation interface, the optimal control strategy of the subway station air conditioning water system is obtained through iterative optimization of the genetic algorithm.

2. The energy-saving method for subway station air-conditioning water system based on Modelica model and genetic algorithm according to claim 1 is characterized in that: A simulation model of the subway station air conditioning water system was established in Dymola software based on the Modelica language, including: Based on the actual structure of the subway station's air conditioning water system, determine the key components of the modeling, including the chilled water circulation environment and the cooling water circulation environment; Use the Modelica language in Dymola software to build a chilled water cycle environment model. The model includes the chiller, terminal equipment, and chilled water pump, and configures the chilled water cycle process. Use the Modelica language in Dymola software to build a cooling water circulation environment model. The model includes a chiller, cooling tower, and cooling water pump, and configures the cooling water circulation process. Create custom component models for chilled water pumps and cooling water pumps, inputting actual performance curve parameters; Select and integrate other standard components from Dymola's HVAC component library to complete the modeling of the entire air conditioning water system.

3. The energy-saving method for subway station air-conditioning water system based on Modelica model and genetic algorithm according to claim 2 is characterized in that: The population of the established simulation model is initialized, and the genetic algorithm is implemented using MATLAB. The objective function is to minimize the total energy consumption of the air conditioning water system, and the optimal control strategy is obtained, including: Based on the established Modelica model of the air conditioning water system, key control parameters to be optimized are determined, including chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate; Initialize the genetic algorithm population in MATLAB, set the population size, number of iterations, and optimization objective function; The fitness function is defined as the inverse of the objective function. Individuals are selected through the fitness function, and crossover and mutation operations are performed to generate a new population. The iterative calculation is performed until the termination condition is met and the optimized control strategy is obtained.

4. The energy-saving method for subway station air-conditioning water system based on Modelica model and genetic algorithm according to claim 3 is characterized in that: The fitness function is defined as the inverse of the objective function. Individuals are selected based on the fitness function, and crossover and mutation operations are performed to generate a new population, including: The fitness function is defined as the inverse of the objective function; Through the fitness function, the proportional selection method is adopted to select individuals, and according to the roulette wheel selection mechanism, individuals with higher fitness are selected from the current population as parents; For the selected parent individuals, a single-point crossover operation is performed according to the preset crossover probability to generate new offspring individuals; For the newly generated offspring individuals, a single-point mutation operation is performed according to the preset mutation probability, and random perturbations are performed within its value range; The new individuals generated through selection, crossover and mutation operations are combined with some excellent original individuals to generate a new generation of population.

5. The energy-saving method for subway station air-conditioning water system based on Modelica model and genetic algorithm according to claim 4 is characterized in that: Based on the optimized control strategy, a Dymola-MATLAB co-simulation interface is built through Python, including: According to the optimization control strategy, the Modelica model is used through the Dymola simulation environment to configure the interface environment between Python and Dymola; Call the Dymola API through Python to establish a communication connection with the Modelica simulation model; Set up the data interaction interface between Python and MATLAB to achieve two-way transmission of optimization parameters; Associate the simulation file exported from the Modelica model with the Python interface; Verify the communication stability of the joint simulation interface and establish a complete joint simulation platform.

6. The energy-saving method for subway station air-conditioning water system based on Modelica model and genetic algorithm according to claim 5, characterized in that: Based on the co-simulation interface, the optimal control strategy for the subway station air conditioning water system is obtained through iterative optimization using a genetic algorithm, including: According to the co-simulation interface, the optimization parameters generated by the genetic algorithm are input into the Modelica model; The total energy consumption of the air conditioning water system under different parameter combinations is calculated through Modelica simulation; Based on the simulation results, a genetic algorithm is used to iteratively optimize the chilled water outlet temperature, cooling tower outlet temperature, and cooling water pump flow rate until the preset energy consumption minimization target is met. Output the optimal control strategy, including the optimal parameter combination of chilled water outlet temperature, cooling tower outlet temperature and cooling water pump flow, to achieve energy saving in the subway station air conditioning water system.

7. An energy-saving system for a subway station air-conditioning water system based on a Modelica model and a genetic algorithm, the system implementing the method according to any one of claims 1 to 6, characterized in that: include: Modelica simulation module, used to build a simulation model of the subway station air conditioning water system in Dymola software based on the Modelica language; The genetic algorithm optimization module is used to initialize the population of the established simulation model and implement the genetic algorithm using MATLAB. The objective function is to minimize the total energy consumption of the air conditioning water system and obtain the optimal control strategy. An interface module, used to build a Dymola-MATLAB co-simulation interface through Python based on the optimized control strategy; The control module is used to obtain the optimal control strategy of the subway station air conditioning water system through iterative optimization of the genetic algorithm based on the joint simulation interface.

8. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Energy consumption optimization method and device of ground surface water source heat pump system based on MATLAB

    CN105258396A

  • A parameter optimization method of Modelica model based on surrogate model

    CN109522602A

  • Modelica-based hydraulic excavator energy transfer precise model construction method

    CN113779786A

  • Coal-fired boiler operation method based on Modelica modeling and genetic algorithm

    CN117034787A

Cited By

  • Modelica-based automobile single quality system modeling and adaptive parameter optimization method

    CN121980690A

  • Modelica-based modeling and adaptive parameter optimization method for vehicle single mass system

    CN121980690B