A control parameter configuration method and system based on combination of ZYNQ and RS485 bus
By combining ZYNQ with RS485 bus for control parameter configuration, and using PL address resolver for indirect addressing, the PCS control parameter configuration process is simplified, the real-time performance and stability of the energy storage converter are improved, and the problem of high complexity in traditional configuration is solved.
Patent Information
- Application Number
- CN202611317956.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing energy storage converters have high PCS control parameter configuration complexity and are difficult to maintain. The traditional direct address mapping method leads to address space explosion, cumbersome software development, and easy configuration errors.
A control parameter configuration method based on ZYNQ and RS485 bus is adopted. By designing a fixed pairing window of 5 sets of address registers and instruction registers, indirect secondary addressing is performed using the address resolver on the PL side, simplifying the software development process on the PS side, and data is transmitted through the AXI bus to achieve rapid configuration.
It significantly simplifies software development logic, reduces address resource waste, improves the real-time performance and stability of PCS control, and reduces parameter configuration latency from milliseconds to microseconds.
Smart Images

Figure CN123185077A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial control, and specifically relates to a PCS control parameter configuration technology. Background Technology
[0002] Currently, most energy storage converters in the energy storage industry adopt... Figure 1 The communication shown enables local control. In this data interaction mode, the control unit writes various commands to the energy storage converter via CAN bus, Ethernet, or fiber optic cable. Simultaneously, the energy storage converter also feeds back its current operating status and parameters to the control unit via CAN bus, Ethernet, or fiber optic cable. Before carrier synchronization, PCS control parameters need to be configured.
[0003] However, the existing industrial control pain point of "high complexity of PCS control parameter configuration and difficult maintenance" - because the PCS has tens of thousands of control parameters (such as PWM dead zone, voltage loop / current loop KP / KI, bus voltage threshold, protection action threshold, etc.), if the traditional direct address mapping method is used, the PS end needs to directly map the physical address of each parameter, which will lead to problems such as address space explosion, cumbersome software development, difficult debugging and maintenance in the later stage, and easy configuration errors. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a control parameter configuration method and system based on the combination of ZYNQ and RS485 bus.
[0005] One of the technical solutions adopted in this invention is: a control parameter configuration method based on the combination of ZYNQ and RS485 bus, comprising:
[0006] S1. An external web terminal sends commands to the energy storage converter via an RS485 bus; the commands include the target name and the corresponding configuration parameters.
[0007] S2. The PS terminal of the ZYNQ chip used in the energy storage converter obtains the mapping address of the target name in the current instruction according to the first mapping table it maintains, and writes the mapping address and configuration parameters into the address register and instruction register in a pairing window of the PL terminal respectively; then the values of the address register and instruction register in the pairing window are encapsulated, and the encapsulated data is transmitted to the PL terminal through the internal AXI bus.
[0008] S3. The ZYNQ chip used in the energy storage converter uses the PL terminal to detect the write status of the two registers in the pairing window in real time. When both registers in a pairing window have been written, the encapsulated data is parsed, the corresponding physical address is obtained based on the second mapping table maintained by the PL terminal, and the data is forwarded to the PL terminal's underlying control register to complete the PCS parameter configuration.
[0009] The second technical solution adopted in this invention is: a control parameter configuration system based on the combination of ZYNQ and RS485 bus, comprising: a processing system module and a programmable logic system module, wherein the processing system module and the programmable logic system module are connected for communication via an AXI bus;
[0010] The programmable logic system module is internally configured with several sets of address-data pairing structures. Each set of address-data pairing structures includes an address register and an instruction register. The processing system module assigns values to the address register and instruction register in a set of address-data pairing structures according to the received instructions. The processing system module is also configured with a 32-bit packet unit, which converts the assigned values of the address register and instruction register in a set of address-data pairing structures into 16-bit binary values, arranges them in order from high bit to low bit, and outputs a 32-bit data word; and transmits the 32-bit data word to the programmable logic system module.
[0011] The programmable logic system module is also equipped with an address resolver. The address resolver monitors the assignment status of each address-data pairing structure in real time. When it detects that the address register and instruction register in a set of address-data pairing structures have been written, it parses the target address and configuration value according to the received 32-bit data word, forwards the value to the corresponding underlying control register, and completes the parameter configuration.
[0012] The beneficial effects of this invention are as follows: This invention abandons the traditional direct address mapping approach in the control parameter configuration process. Combining the ZYNQ chip and RS485 bus, it adopts a proprietary technical solution of "hardware solidification + indirect secondary addressing mapping." Its core logic is: designing five fixed pairs of "address registers + instruction registers" windows. The number, function, and mapping logic of these windows are all solidified in hardware and cannot be dynamically modified by software. The PS end does not directly access the scattered control parameter addresses at the PL end. Instead, it uses a two-step operation of "first writing the target address, then writing the configuration value." The address resolver at the PL end detects the paired write status, resolves the target address and configuration value, and forwards them to the corresponding underlying control register, completing the PCS parameter configuration. The entire mapping process is indirect and secondary, without any address calculations or cross-protocol address translation. Its core purpose is to consolidate the configuration entry points for the massive control parameters of the PCS, simplify the software development and maintenance process at the PS end, improve the real-time performance and stability of PCS control, and fully adapt to the industrial control needs of energy storage converters.
[0013] The present invention has the following advantages:
[0014] 1. By using fixed pairing windows and indirect secondary addressing, "one window entry corresponds to multiple control parameters", which greatly simplifies the software development logic on the PS side and reduces the waste of address resources;
[0015] 2. At the same time, by utilizing the high bandwidth and low latency characteristics of the on-chip AXI bus, the parameter configuration latency is reduced from the millisecond level of traditional CAN / RS485 to the microsecond level, thereby improving the real-time performance and stability of PCS control. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of traditional PCS carrier synchronization.
[0017] Figure 2 This is a schematic diagram of ZYNQ and RS485 carrier synchronization provided by the present invention;
[0018] Figure 3 A schematic diagram of the carrier synchronization system provided by the present invention;
[0019] Figure 4 This is a schematic diagram of the AXI bus local control layer data interaction function of the present invention;
[0020] Figure 5 This is a diagram of the register mapping structure of the present invention. Detailed Implementation
[0021] To facilitate understanding of the technical content of this invention by those skilled in the art, the following description, in conjunction with the accompanying drawings, further illustrates the invention.
[0022] like Figure 2 , Figure 3 As shown, the carrier synchronization system consists of three parts: a master unit, slave units, and an RS485 bus. The master unit connects to each slave unit via the RS485 bus, forming a master-slave carrier synchronization system. Both the master and slave units use ZYNQ chips. The ZYNQ chip is responsible for generating the carrier synchronization signal, and it integrates a PS processor and PL logic. The PL logic is responsible for carrier signal generation, phase acquisition, and high-speed adjustment, while the PS is responsible for issuing synchronization commands. The RS485 communication chip is responsible for converting the carrier synchronization signal into a differential signal and sending it to the slave unit, or converting the differential signal from the master unit into a single-ended signal and sending it to the ZYNQ chip. This system achieves carrier synchronization of multiple energy storage converters through hardware and software collaboration.
[0023] In ZYNQ, the PS processor writes a synchronization command to the PL logic. After receiving the command, the PL logic sets itself as either a master or a slave.
[0024] If configured as the master, the carrier synchronization signal will be sent to the RS485 port. This signal is converted into a differential signal by the RS485 chip and then sent to the slave. If configured as the slave, it will only be responsible for receiving the synchronization signal. After receiving the synchronization signal, the slave RS485 chip will transmit it to its own ZYNQ chip. The PL logic in the ZYNQ chip is responsible for using this signal to achieve synchronization. In this embodiment, the RS485 chip is model NSI83085E-DSWR.
[0025] Before carrier synchronization, the control parameters must first be configured:
[0026] The ZYNQ chip integrates a processing system (PS side) and a programmable logic system (PL side). The PS side, or network technology layer (ARM core), is responsible for the upper-layer control logic, such as... Figure 4 The circuit shown is responsible for connecting the RS485 interface, used to receive monitoring commands from the external WEB terminal. The PL terminal, i.e., the device control layer (FPGA logic), is responsible for the underlying control logic of the PCS, and is internally configured with a PCS control logic IP core, connected to the energy storage converter via an external AXI bus. The PS terminal and the PL terminal are connected through the internal AXI physical bus of the ZYNQ chip.
[0027] like Figure 5 As shown, the PL terminal internally constructs a parameter configuration register combined with a status readback register group, namely... Figure 5 The AXI interface module shown is configured with an address-data pairing structure, including several address registers (i.e., ...). Figure 5 Address Reg) and instruction register (i.e. Figure 5 Data Reg in the middle.
[0028] Hardware logic: The PL terminal internally contains an address resolver, whose input is connected to the aforementioned register combination status readback register group. When it detects that the address register and instruction register have been written to by the PS terminal, the address resolver, based on the index value, such as... Figure 5 The diagram shows the specific control node (e.g., PWM dead time, voltage loop KP / KI parameters, etc.) that transmits data to the PCS control logic.
[0029] As shown in Table 1, this embodiment sets up 5 sets of address-data paired register groups on the PL side. Register 1 and register 2 are in one group, and similarly, register 3 and register 4 are in one group, register 5 and register 6 are in one group, register 7 and register 8 are in one group, and register 9 and register 10 are in one group. The two registers in the same group are used as address registers and instruction registers, respectively. One is used to write the address, and the other is used to write the relevant instruction. In practical applications, the number of address-data paired register groups on the PS side can be flexibly set while ensuring smooth setting of various parameter functions without wasting too many resources.
[0030] The following uses Register 1 and Register 2 as shown in Table 1 as an example to illustrate the working principle of register addressing:
[0031] When setting parameters, the WEB terminal sends a command via the network port to set the address of register 1 to 0X10 (register 1 serves as a function index register, and writing different values into it represents different function indices), and modifies register 2 to 800 (for example, representing the DC bus voltage threshold). The logic circuit on the PL terminal automatically captures this transition and updates the 800V setting value to the hardware overvoltage protection module.
[0032] Table 1 Parameter Setting Register Point Table
[0033]
[0034] Table 1 shows the control register numbers in the first row and the addresses and instructions to be written to those registers in the second row. Instruction 1 represents writing to address 1, instruction 2 represents writing to address 2, and so on.
[0035] This invention employs an "indirect secondary addressing" method to configure parameters. The specific process is as follows:
[0036] For example, the web terminal sends an instruction to set the overcurrent protection threshold to 5000. This instruction is sent to the PS terminal of the ZYNQ chip via the RS485 bus. The PS terminal obtains the mapping address of the overcurrent protection threshold according to its mapping table. In this embodiment, the mapping address of the overcurrent protection threshold in the mapping table is 1. Therefore, the PS writes 5000 into register 2 and sets the address value of register 1 to 1. At the same time, the PS terminal encapsulates these two values into a 32-bit value and sends it to the PL via the AXI bus. After receiving it, the PL parses the high 16 bits and finds that the value is 1. According to the mapping table of the PL terminal, it knows that it represents the overcurrent protection threshold. Meanwhile, the low 16 bits naturally represent the specific value of the threshold.
[0037] In this embodiment, the mapping table maintained on the PS side establishes a mapping relationship between the names and mapping values of the PCS control parameters. The mapping table on the PL side establishes a mapping relationship between the names, mapping values, and physical addresses of the PCS control parameters.
[0038] The first step is to write the mapping address of the target PCS control parameter to the "address register", which is the mapping result of the address of the underlying control register, such as the mapping result of the PWM dead-time register address, the voltage loop KP parameter register address, etc.
[0039] The second step is to write the configuration value of the parameter to the corresponding "instruction register" on the PS side, such as setting the PWM dead time to 2μs and the KP parameter to 5.0.
[0040] The third step involves the address resolver on the PL side monitoring the write status of the address register and instruction register in real time. Once it detects that both registers have been written, it parses the target address and configuration value from the 32-bit value transmitted from the PS side, forwards the value to the corresponding underlying control register on the PL side, and completes the parameter configuration.
[0041] This invention's hardware lookup table structure eliminates the need for the PS side to know the specific physical addresses of thousands of parameters within the PL side. All parameter configurations can be completed simply through these five windows, greatly simplifying the complexity of AXI bus address mapping.
[0042] Those skilled in the art will recognize that the embodiments described herein are for the purpose of helping to understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of the claims of the invention.
Claims
1. A control parameter configuration method based on the combination of ZYNQ and RS485 bus, characterized in that, include: S1. The external WEB terminal sends commands to the energy storage converter via RS485 bus; the commands include the PCS control parameter names and corresponding configuration parameters. S2. The PS terminal of the ZYNQ chip used in the energy storage converter obtains the mapping address of the target name in the current instruction according to the first mapping table it maintains, and writes the mapping address and configuration parameters into the address register and instruction register in a pairing window of the PL terminal respectively; then the values of the address register and instruction register in the pairing window are encapsulated, and the encapsulated data is transmitted to the PL terminal through the internal AXI bus. S3. The ZYNQ chip used in the energy storage converter uses the PL terminal to detect the write status of the two registers in the pairing window in real time. When both registers in a pairing window have been written, the encapsulated data is parsed, the corresponding physical address is obtained based on the second mapping table maintained by the PL terminal, and the data is forwarded to the PL terminal's underlying control register to complete the PCS parameter configuration.
2. The control parameter configuration method based on the combination of ZYNQ and RS485 bus according to claim 1, characterized in that, The first mapping table maintained on the PS side establishes the mapping relationship between the names of PCS control parameters and their mapping addresses.
3. The control parameter configuration method based on the combination of ZYNQ and RS485 bus according to claim 2, characterized in that, The second mapping table maintained by the PL terminal establishes the mapping relationship between the names, mapping addresses, and physical addresses of the PCS control parameters.
4. The control parameter configuration method based on the combination of ZYNQ and RS485 bus according to claim 3, characterized in that, In step S2, the mapped address and configuration parameters are encapsulated. Specifically, the mapped address and configuration parameters read from the address register and instruction register in the pairing window are converted into 16-bit data words, and then the two 16-bit data words are encapsulated into a 32-bit data word.
5. A control parameter configuration system based on ZYNQ and RS485 bus, characterized in that, include: The processing system module and the programmable logic system module are connected via an internal AXI bus. The programmable logic system module is internally configured with several sets of address-data pairing structures. Each set of address-data pairing structures includes an address register and an instruction register. The processing system module assigns values to the address register and instruction register in a set of address-data pairing structures according to the received instructions. The processing system module is also configured with a 32-bit packet unit, which converts the assigned values of the address register and instruction register in a set of address-data pairing structures into 16-bit binary values, arranges them in order from high bit to low bit, and outputs a 32-bit data word; and transmits the 32-bit data word to the programmable logic system module. The programmable logic system module is also equipped with an address resolver. The address resolver monitors the assignment status of each address-data pairing structure in real time. When it detects that the address register and instruction register in a set of address-data pairing structures have been written, it parses the target address and configuration value according to the received 32-bit data word, forwards the value to the corresponding underlying control register, and completes the parameter configuration.
6. A control parameter configuration system based on ZYNQ and RS485 bus as described in claim 5, characterized in that, The instructions include the PCS control parameter names and their corresponding configuration parameters.
7. A control parameter configuration system based on ZYNQ and RS485 bus as described in claim 6, characterized in that, The processing system module also includes maintaining a first mapping table, which establishes a mapping relationship between the names of PCS control parameters and their mapping addresses. The processing system module obtains the mapping address corresponding to the name of the PCS control parameter in the instruction through the first mapping table and writes the mapping address into the address register.
8. A control parameter configuration system based on ZYNQ and RS485 bus according to claim 7, characterized in that, The programmable logic system module also includes maintaining a second mapping table, which constructs the mapping relationship between the names, mapping addresses, and physical addresses of PCS control parameters. The programmable logic system module obtains the physical address corresponding to the parsed target address through the second mapping table.
