A kind of switch machine based on double-machine hot standby servo motor control and control method
The turnout switch machine controlled by dual-machine hot standby servo motors solves the problems of high cable cost, inability to perceive status in real time, and insufficient reliability of traditional turnout systems, and achieves high-precision and fast turnout control, ensuring railway safety and reliable system operation.
Patent Information
- Application Number
- CN202510582412.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-05-07
AI Technical Summary
Traditional railway turnout control systems suffer from high cable laying costs, inability to perceive operational status in real time, insufficient system reliability, long switching times due to redundant design, and the risk of data asynchrony.
A turnout switch machine based on dual-machine hot standby servo motor control is adopted, including an instruction input module, a dual-machine hot standby control module, an FPGA logic control module, a servo drive module, and a status monitoring module. Through the dual-machine hot standby design of the main controller and redundant controller, combined with the FPGA's three-level watchdog timer and consistency verification, seamless switching in case of failure is achieved. Servo motors are used to replace three-phase AC motors, and real-time monitoring and adaptive PID control algorithms are integrated.
Seamless fault switching of the system was achieved, control accuracy and response speed were improved, maintenance costs were reduced, continuous operation and safety of the system were ensured, the switch machine turnout control switch was eliminated, and the turnout positioning error was less than 0.5mm, which meets railway safety standards.
Smart Images

Figure CN120270298B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway turnout control technology, and in particular to a turnout switch machine and control method based on dual-machine hot standby servo motor control. Background Technology
[0002] Railway turnouts are essential devices widely used on railway lines for track switching, and their safety is paramount as a crucial component of the railway system. However, traditional railway turnout control technology has the following drawbacks:
[0003] 1. Traditional turnout systems use three-phase AC motors for driving and relay combinations to switch the turnouts, which has problems such as high cost of cable laying and inability to sense the operation status in real time.
[0004] 2. Most systems lack real-time status monitoring and redundancy design, resulting in insufficient system reliability and failure to meet railway safety requirements; a small number of redundancy schemes have long switching times (>100ms) and pose a risk of data asynchrony. Summary of the Invention
[0005] The purpose of this invention is to provide a turnout switch machine and control method based on dual-machine hot standby servo motor control, thereby solving the above-mentioned technical problems.
[0006] To achieve the above objectives, the present invention provides a turnout switch machine based on dual-machine hot standby servo motor control, comprising:
[0007] The instruction input module is used to generate operation instructions;
[0008] The dual-machine hot standby control module includes a main controller and a redundant controller with the same built-in control logic that communicate with each other. It is used to process operation instructions based on the main controller or the redundant controller that determines the control authority and generate target position control instructions.
[0009] The FPGA logic control module is used to generate drive signals based on target position control commands, monitor the fault status of the main controller and redundant controller in real time, and switch the control of the main controller and redundant controller based on the fault status.
[0010] The servo drive module includes a servo motor, used to control the position of railway turnouts based on drive signals;
[0011] The status monitoring module is used to monitor the operating status of the servo drive module and feed it back to the FPGA logic control module;
[0012] The instruction input module, dual-machine hot standby control module, FPGA logic control module and servo drive module are connected in sequence for communication. The servo drive module is also connected to the FPGA logic control module for feedback through the status monitoring module.
[0013] Preferably, the instruction input module communicates with the main controller and the redundant controller via an RS485 bus, and the main controller and the redundant controller communicate via a serial port to realize data synchronization and heartbeat signal mutual detection based on the timestamp-based differential synchronization algorithm.
[0014] Both the main controller and the redundant controller have built-in registers to store timestamped heartbeat signals and fault tables. Both the main controller and the redundant controller establish serial port connections with the FPGA logic control module, forming a star topology. This allows the FPGA logic control module to periodically retrieve the heartbeat signals stored in the registers for cross-validation.
[0015] Preferably, the FPGA logic control module includes a three-level watchdog timer, which includes a main timer, a backup timer, and a supervisor timer. The main timer is used to monitor the operating status of the main controller or redundant controller with control authority. The backup timer is used to monitor the operating status of the main controller or redundant controller with control authority when the main timer fails. The supervisor timer is used to monitor the health status of the main timer and the redundant timer. The refresh periods of the main timer, the backup timer, and the supervisor timer are 5mm, 20mm, and 50mm, respectively.
[0016] This is used to determine whether the heartbeat signals sent by the main controller and redundant controller to the FPGA logic control module are lost or the timestamps have timed out. If so, it is determined that the main controller has failed, and the severity of the failure is classified according to the timeout period, and control is switched at the same time.
[0017] Preferably, the control logic of both the main controller and the redundant controller is a PID control algorithm, which is used to adjust the control parameters of the PID control algorithm in real time according to the load changes. The proportional gain controls the response speed, the integral gain eliminates steady-state error, and the derivative gain suppresses oscillation.
[0018] Preferably, the condition monitoring module includes a magnetoelectric split-type multi-turn encoder and a Hall sensor to achieve dual verification of the drive motor position;
[0019] The resolution of the magnetoelectric split-type multi-turn encoder is greater than 23 bits.
[0020] Preferably, the FPGA logic control module is connected to the servo motor via a CAN bus, and the servo motor adopts a trajectory position control mode, supporting S-shaped acceleration and deceleration curves.
[0021] A control method for a turnout switch machine based on dual-machine hot standby servo motor control includes the following steps:
[0022] S1. System initialization: Initialize the dual-machine hot standby control module, FPGA logic control module and servo drive module respectively. In the initial state, the main controller has control and the redundant controller enters the hot standby state.
[0023] S2. Input operation commands using the command input module, then transmit the operation commands to the main controller, and then synchronously transmit them to the redundant controller via the serial port;
[0024] S3. Determine whether the main controller and the redundant controller are synchronized. If yes, proceed to step S4; otherwise, use a time-stamp-based differential synchronization algorithm to synchronize the data.
[0025] S4. The main controller sends a query command to the FPGA logic control module, and the FPGA logic control module feeds back the running status of the servo drive module from the previous time to the main controller.
[0026] S5. The main controller determines whether the received operation command is valid based on the running status feedback in step S4. If it is valid, step S6 is executed; otherwise, the command input module is notified.
[0027] S6. The main controller's control board sends the operation command to the main controller's driver board, generates the target position control command, and transmits the target position control command to the FPGA logic control module.
[0028] S7 and the FPGA logic control module perform consistency checks and generate drive signals based on the target position control instructions;
[0029] S8. The servo drive module rotates forward or backward according to the generated drive signal to change the position of the turnout. During this process, the status monitoring module monitors the operating status of the servo drive module to determine whether the turnout is in position. Once the turnout is in position, the servo drive module is shut down, and the dual-machine hot standby control module and FPGA logic control module store the updated data.
[0030] During steps S1-S8, the FPGA logic control module periodically determines whether the main controller has failed. If a failure occurs, the FPGA logic control module switches control from the main controller to the redundant controller, marks the current redundant controller as the main controller, and marks the original main controller after it has recovered as the redundant controller.
[0031] Preferably, step S3 specifically includes the following steps:
[0032] S31. Synchronization initialization;
[0033] S311. After the main controller and the redundant controller are powered on, a communication link is established through a handshake protocol.
[0034] S312. Exchange initial register data: system clock reference value T0 and initial values of key parameters, including turnout position, motor torque, fault codes, etc.
[0035] S313, The main controller periodically generates a timestamp sequence T. k :
[0036] T k =T0 + k*ΔT (k = 1, 2...n);
[0037] In the formula, ΔT is the synchronization period; T0 is the system clock reference value; k is the period counter of the main controller; and n is the total number of periods.
[0038] S32, Periodic data comparison;
[0039] S321. The main controller executes the following in each synchronization cycle: freeze the current control instruction output, and read its own register data M = {M1, M2, ..., M...} N},M1,M2,...,M N These represent the 1st, 2nd, ... Nth key parameters in the main controller's registers, including turnout position, motor torque, and fault code.
[0040] S322, Send a difference request packet to the redundant controller;
[0041] S323. After receiving the difference request packet, the redundant controller verifies its integrity and calculates its own parameter hash value using the CRC32 algorithm. B :
[0042] HASH B =CRC32(B1||B2||...||B N )
[0043] In the formula, B1, B2, ..., B N All data received by the redundant controllers are from the difference request packets.
[0044] S324. Compare the hash value (HASH) of the data M stored in the registers of the main controller. M With HASH B If the consistency is consistent, return a synchronization confirmation packet; otherwise, proceed to step S33.
[0045] S33. Calculate the difference and perform a synchronized decision;
[0046] S331. Calculate the data difference D:
[0047]
[0048] In the formula, Mi Main controller register data; B i This represents the redundant controller register data, where N is the number of critical parameters; δ is the anti-zero coefficient, and δ = 0.1;
[0049] S332. Set the threshold to D0. When D > D0, trigger the full synchronization strategy. When D ≤ D0, trigger the incremental synchronization strategy.
[0050] The full synchronization strategy is as follows: First, the main controller freezes the control output and sends the full data packet; second, the redundant controller receives the full data packet, verifies it, replaces its own register value with the received full data packet, and returns a synchronization completion confirmation packet; finally, after receiving the synchronization completion confirmation packet, the main controller compares the hash values for consistency, unfreezes the control output, and restores real-time control.
[0051] The incremental synchronization strategy is as follows: First, the main controller calculates the difference parameter set. Secondly, the main controller sends incremental data packets, i.e., the difference parameter set, to the redundant controller; finally, the redundant controller receives the incremental data packets, updates its local registers according to the index, and returns an incremental acknowledgment packet.
[0052] Preferably, step S5 specifically includes the following steps:
[0053] S51. The main controller receives the raw instruction data packet and stores it in a double buffer.
[0054] S52. Verify the static position conflict, opcode whitelist, and security signature of the original instruction data packet respectively;
[0055] The static position conflict verification method is as follows: First, the current position θ of the turnout is read in real time using a magneto-electric split multi-turn encoder. current Next, determine the illegal position: target position θ target It coincides with the current position |θ target -θ current If |≤0.5°, an error code will be returned; otherwise, it will be considered valid.
[0056] Preferably, in the control board described in step S6, the number of rotations N of the servo motor of the servo drive module is calculated using the following formula:
[0057]
[0058] In the formula, S represents the turnout opening stroke, in mm; G represents the reduction ratio; and P represents the lead screw, in mm / revolution.
[0059] The consistency check described in step S7 includes mutual verification of heartbeat signals between the main controller and the redundant controller, and cross-verification based on heartbeat signals stored in registers.
[0060] Therefore, the present invention employs the above-mentioned turnout switching machine and control method based on dual-machine hot standby servo motor control, which has the following beneficial effects:
[0061] 1. Dual-machine hot standby architecture: Through the redundancy design of the main redundant controller, combined with the FPGA's three-level watchdog (5ms / 20ms / 50ms) and consistency verification, seamless switching (≤30ms) is achieved in the event of a single controller failure, ensuring continuous system operation and meeting safety standards;
[0062] 2. A servo motor is used to replace the three-phase AC motor in the traditional switch machine. Positioning and reversing operations can be completed by controlling the servo motor, improving control accuracy and response speed. The switch machine's turnout control switch is eliminated, reducing maintenance costs. Furthermore, the servo drive motor adopts an adaptive PID control algorithm and an S-shaped acceleration and deceleration curve, combined with a 23-bit magnetoelectric encoder (accuracy ≤0.1mm), to achieve a turnout positioning error ≤0.5mm, further improving control accuracy.
[0063] 3. Integrated overcurrent (150% rated current), overheat (85℃), and stall (50ms cut-off) protection, combined with a fault-switching safety design (the main controller is immediately frozen and switched to the redundant controller upon verification failure), ensuring that the system is guided to a safe state in the event of failure.
[0064] 4. During the operation of the servo motor, monitor the switch machine's operating data (torque, position, and current value) in real time to provide a basis for judging the dynamic faults of the switch machine;
[0065] 5. The 485 bus is used to connect the instruction input module and the dual-machine hot standby control module, eliminating the need for cables and saving investment costs.
[0066] In summary, this invention employs a turnout switch machine and control method based on dual-machine hot standby servo motor control. Compared to existing switch machines, using servo motor control saves on control cables. By setting a specific number of rotations, the switch machine can be switched to the correct position, eliminating the need for automatic gate switch nodes. Furthermore, during the switching process, it can provide real-time feedback on electrical parameters such as position and torque, providing real-time data for switch machine and fault diagnosis. The dual-machine hot standby control method using servo motor drivers also improves system reliability.
[0067] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0068] Figure 1This is a structural block diagram of a turnout switch machine based on dual-machine hot standby servo motor control according to the present invention;
[0069] Figure 2 This is a flowchart of a control method for a turnout switch machine based on dual-machine hot standby servo motor control according to the present invention. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
[0071] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.
[0072] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0073] like Figure 1 As shown, a turnout switch machine based on dual-machine hot standby servo motor control includes: an instruction input module for generating operation instructions;
[0074] The dual-machine hot standby control module includes a main controller and a redundant controller with the same built-in control logic that communicate with each other. It is used to process operation instructions based on the main controller or the redundant controller that determines the control authority and generate target position control instructions.
[0075] The FPGA logic control module is used to generate drive signals based on target position control commands, monitor the fault status of the main controller and redundant controller in real time, and switch the control of the main controller and redundant controller based on the fault status; in this embodiment, the FPGA logic control module has parallel processing capabilities.
[0076] The servo drive module includes a servo motor, used to control the position of railway turnouts based on drive signals;
[0077] In this embodiment, the control principle of the servo motor is as follows:
[0078] First, the FPGA logic control module receives commands from the main controller or redundant controller. After receiving the command, it verifies it to ensure consistency and validity. Once verification is successful, the FPGA logic control module directly sends the control command to the servo motor (execution unit), and the servo motor simultaneously feeds back the execution result to the FPGA logic control module in real time. For example, when the servo motor needs to rotate a specific number of revolutions (e.g., 800 revolutions), the main controller or redundant controller generates a command and sends it to the FPGA logic control module, which then forwards the parsed command to the servo motor for execution.
[0079] Meanwhile, the system employs a "trajectory position mode" to control the servo motor. This mode can precisely plan and execute the motor's motion trajectory, ensuring smooth acceleration, constant speed operation, and deceleration. To optimize control performance, the drive unit utilizes a PID (proportional-integral-derivative) control algorithm.
[0080] The algorithm calculates the error by comparing the target position / velocity with the actual position / velocity fed back by the motor in real time, and adjusts the drive signal output to the motor accordingly to achieve fast response, eliminate steady-state error and suppress oscillation.
[0081] The direction of motor rotation (forward or reverse) can also be determined by comparing the target position with the current position: if the target position is greater than the current position, it rotates forward; if it is less than the target position, it rotates in reverse.
[0082] Furthermore, the servo motor is equipped with a high-precision magnetoelectric split-type multi-turn absolute encoder with a resolution of no less than 23 bits. It can detect the rotational position of the motor shaft in real time and accurately (including the precise position within a single turn and the total number of turns), and send this position information as feedback signals to the FPGA logic control module. Since the magnetoelectric split-type multi-turn absolute encoder is an absolute encoder, the current position can be obtained without performing a homing operation upon system startup. The FPGA logic control module utilizes the high-resolution position and speed information fed back by the encoder not only for PID closed-loop control but also for monitoring the actual operating status of the motor (such as changes in speed, position, and torque), and combines this with external sensors for turnout end position detection, ensuring the accuracy and safety of operation.
[0083] The status monitoring module is used to monitor the operating status of the servo drive module and feed it back to the FPGA logic control module;
[0084] In this embodiment, the operating status of the servo motor is mainly monitored by the FPGA logic control module through continuous reception and analysis of real-time feedback signals from the servo motor and its encoder. The monitoring includes: (a) Motion parameters: real-time monitoring of the servo motor's actual speed, precise position, and output torque changes. (b) Electrical parameters: the system can read the servo motor's current value in real-time and monitor whether the supply voltage is within the normal range (detecting low and high voltage errors), while also monitoring the servo motor temperature to prevent overheating. (c) Fault status: the FPGA logic control module monitors the status response commands fed back by the servo motor in real-time and compares them with the internally stored fault table to identify various potential faults, such as current sensor errors, encoder errors, Hall signal errors, excitation errors, tracking errors, over-temperature, overcurrent, overload, and motor stall. (d) Load conditions: the system monitors the servo motor's load torque in real-time and triggers an early warning when the load exceeds a preset threshold (e.g., 80% of the rated torque).
[0085] The feedback process is as follows: First, the information is generated at the source (servo motor and driver): The servo motor continuously generates accurate raw position data through its integrated magnetoelectric split multi-turn encoder (23-bit magnetoelectric type). At the same time, the servo driver uses internal sensors to continuously measure operating parameters: current, DC bus voltage, temperature, and monitor internal fault status (the above raw data is available inside the servo driver / motor unit).
[0086] The first transmission then takes place: from the servo driver to the FPGA logic control module (feedback is provided through the communication link connecting the servo motor and the FPGA logic control module): the servo driver packages the status information and sends the data packet to the FPGA logic control module at high speed and in real time through the communication link connecting the servo motor (execution unit) and the FPGA logic control module.
[0087] Then, the processing and analysis within the FPGA logic control module (logic control unit): The FPGA logic control module receives data packets, decodes and parses them: it parses the raw data, calculates the position and number of revolutions, converts current and temperature readings, identifies fault codes and formats the information, and organizes the processed information (position, speed, current, temperature, fault status, etc.) into structured messages.
[0088] Then comes the second transmission: from the FPGA logic control module to the main controller (feedback via a serial communication link connecting the FPGA logic control module and the main / redundant controller): the FPGA logic control module sends structured, processed status information to the currently active main controller via the serial communication link connecting the FPGA logic control module and the drive unit (main / redundant controller). At this point, high-level status information is transmitted, such as: "Current position: 125.3 mm", "Current speed: 50 mm / s", etc. (The above feedback loop (motor -> FPGA -> controller) closes the information loop, providing the main controller with the data needed for decision-making).
[0089] The feedback after receiving and processing is then processed: The main controller receives structured status data packets from the FPGA logic control module via a serial communication link, extracting key real-time values such as actual position and actual velocity. Based on upper-level commands and internal motion planning, it obtains the desired target position and velocity at the current moment, and then calculates the difference between the desired state and the actual state.
[0090] Position error = target position - actual position;
[0091] Speed error = Target speed - Actual speed;
[0092] Then calculate the PID parameters: the three components of the PID are calculated based on the error.
[0093] Proportional (P) term: P = Kp * Position error (processing current error)
[0094] Integral term (I): I = Ki * ∫(position error dt) (eliminating steady-state error)
[0095] Differential (D) term: D = Kd * d (position error) / dt
[0096] Combine all PID outputs: Control Output = P + I + D;
[0097] Then the PID output is converted into specific actions: the main controller converts the control output value representing the "effort level" into specific instructions to the servo system (such as target torque, adjusted target speed, or trajectory parameters).
[0098] Then, the updated command is issued: The main controller sends this new, finely tuned command (derived from PID calculation) down the control chain: First, it is sent to the FPGA logic control module through the serial communication link connecting the main controller and the FPGA logic control module; then, the FPGA logic control module forwards the command to the servo driver through the communication link connecting the FPGA logic control module and the servo motor (execution unit) to affect the behavior of the motor in the next control cycle.
[0099] Continuous loop: The entire process of "receiving feedback -> calculating error -> calculating PID -> generating instructions -> sending instructions" is repeated continuously at a high frequency (control loop rate) to achieve precise and stable motion control.
[0100] It should be noted that the PID control algorithm is used throughout the entire process of the switch machine's operation, ensuring smooth and precise motion. Specifically, it is applied to each stage of the command step-by-step execution process: (a) Start-up (acceleration stage): The PID-controlled servo motor starts smoothly according to the preset acceleration curve. (b) Switching (uniform speed operation and deceleration stage): During the main stroke of the switch switching, the PID maintains the servo motor at a set constant speed, and when approaching the target position, it decelerates smoothly according to the preset deceleration curve. (c) Locking (precise positioning stage): In the final stage of the operation, the PID algorithm ensures that the servo motor drives the switch to the final target position (positioned or reversed) with extreme precision, and may need to maintain this position to resist external interference, achieving reliable locking.
[0101] In this embodiment, during the switch machine switching process, the system collects voltage and current data and provides real-time feedback on the status: (a) Current acquisition: During the switch machine operation, the system "reads the torque, position, and current values output by the servo motor in real time" (the servo drive system integrates current sensors (sampling resistors and Hall effect sensors), which can directly measure the current flowing through the motor windings). (b) Voltage acquisition: The system has the ability to monitor the input power supply voltage of the servo driver (by monitoring the internal resistor divider of the driver to detect the power supply voltage) to ensure that the voltage is within the allowable operating range.
[0102] Real-time status information feedback: Real-time status information feedback is a closed-loop process that relies on the coordinated work of multiple stages:
[0103] Information source: mainly from the servo motor itself and its magnetoelectric split multi-turn encoder. The magnetoelectric split multi-turn encoder provides the core position and speed data, while the servo motor (or its driver) can provide status information such as current, temperature, load torque, and internal fault codes.
[0104] Initial feedback (motor to FPGA logic control module): The servo motor sends the status information it collects or generates internally to the FPGA logic control module in real time and continuously through the communication link (path 6) between the servo motor and the FPGA logic control module.
[0105] Secondary feedback (FPGA logic control module to controller): After receiving and processing the raw data from the servo motor, the FPGA logic control module integrates and updates the system status information (including servo motor execution results, key parameters, fault status, etc.) and feeds it back to the main / redundant controller of the drive unit in real time through another communication link (path 3).
[0106] Furthermore, the design of the entire system architecture and control flow emphasizes real-time performance. For example, the data synchronization frequency between the main controller and the redundant controller is very high (every 3 milliseconds), the heartbeat signal frequency is even higher (every 1 millisecond), the execution results and status information of the servo motors are described as "real-time feedback", and the fast takeover mechanism requires the switching to be completed within 30 milliseconds.
[0107] The instruction input module, dual-machine hot standby control module, FPGA logic control module and servo drive module are connected in sequence for communication. The servo drive module is also connected to the FPGA logic control module for feedback through the status monitoring module.
[0108] The instruction input module communicates with the main controller and the redundant controller via an RS485 bus. The main controller and the redundant controller communicate via a serial port to achieve data synchronization based on a timestamp-based differential synchronization algorithm (in this embodiment, the main controller and the redundant controller perform data synchronization every 3ms) and heartbeat signal mutual detection. Both the main controller and the redundant controller have built-in registers to store timestamped heartbeat signals and fault tables. Both the main controller and the redundant controller establish a serial port connection with the FPGA logic control module, forming a star topology. This allows the FPGA logic control module to periodically retrieve the heartbeat signals stored in the registers (in this embodiment, the main controller and the redundant controller upload a heartbeat signal to the FPGA logic control module every 1ms) for cross-validation.
[0109] The FPGA logic control module includes a three-level watchdog timer, consisting of a main timer, a backup timer, and a supervisor timer. The main timer monitors the operating status of the main controller or redundant controller with control authority. The backup timer monitors the operating status of the main controller or redundant controller with control authority when the main timer fails. The supervisor timer monitors the health status of the main timer and redundant timers. The refresh periods of the main timer, backup timer, and supervisor timer are 5mm, 20mm, and 50mm, respectively. The watchdog timer is used to determine whether the heartbeat signals sent by the main controller and redundant controller to the FPGA logic control module are lost or whether the timestamp has timed out (the upload heartbeat signal time exceeds a set threshold). If so, the main controller is considered to be faulty (in this embodiment, a timeout is set to confirm the fault after 3 times to avoid false alarms). The fault severity is classified according to the timeout duration, and control is switched accordingly. In this embodiment, the fault severity is divided into three levels: minor timeout triggers a warning, moderate timeout triggers rapid diagnosis, and severe timeout immediately initiates a switchover. This tiered strategy reduces the possibility of false alarms while ensuring a rapid response to serious problems.
[0110] Both the main controller and the redundant controller use PID control algorithms for their control logic. These algorithms adjust the control parameters in real time according to load changes. The proportional gain controls the response speed, the integral gain eliminates steady-state errors, and the derivative gain suppresses oscillations, ensuring that the system maintains stability and response speed under different operating conditions.
[0111] During operation of this embodiment, the system monitors the torque output by the servo motor in real time to reflect the actual load encountered during turnout switching. The FPGA logic control module plays a crucial role in providing load-related information to the main controller during this process, and its information transmission flow is as follows:
[0112] 1. The servo motor and its driver will feed back the raw operating status data, which contains real-time torque (load) information, to the FPGA logic control module through the communication link between the two.
[0113] 2. After receiving the raw data, the FPGA logic control module will perform necessary processing, parsing and formatting operations to integrate it into structured system status information that includes the current load status.
[0114] 3. The FPGA logic control module feeds back the processed status data containing real-time load information to the currently active main controller through the serial communication link between itself and the drive units (main controller and redundant controller).
[0115] After receiving status feedback containing load information, the main controller can obtain real-time load data.
[0116] In this embodiment, the load torque can also be monitored in real time. An early warning is triggered when the actual torque exceeds 80% of the rated torque to prevent equipment overload. Simultaneously, to ensure system safety, the following multiple protection measures are integrated:
[0117] 1) Overcurrent protection: When the current exceeds 150% of the rated value, the system will cut off the power supply within 10ms to prevent equipment damage;
[0118] 2) Overheat protection: When the servo motor temperature exceeds 85℃, the output power is automatically reduced to avoid malfunctions caused by overheating;
[0119] 3) Stall protection: When a servo motor stall is detected, the system cuts off the power and triggers an alarm within 50ms to prevent mechanical damage.
[0120] In this embodiment, the adaptive PID control algorithm parameter adjustment step dynamically adjusts the proportional gain (K) by real-time monitoring of the load torque and the turnout position deviation. p ), integral (K) i ) and differential (K d Gain, the specific steps are as follows:
[0121] Step 1, Parameter Initialization and Baseline Setting: Set the initial PID parameters (K p0 ,K i0 ,K d0 and the rated torque value M of the servo motor rated Meanwhile, the torque warning threshold is defined as 0.8 times M. rated .
[0122] Step 2: Real-time data acquisition and error calculation:
[0123] Load torque monitoring: The actual output torque M is acquired in real time through the torque sensor built into the servo drive module. actual .
[0124] Location feedback: Collect the current position X of the turnout. current Calculate the distance from the target position X target The deviation e(t):
[0125] e(t) = X target -X curent ;
[0126] Error change rate calculation: Based on the time step Δt, calculate the deviation change rate Δe(t): e(t-Δt) is the deviation at time t-Δt;
[0127] Third step: Based on the load torque change rate ΔM and the position deviation e(t), adjust the parameters according to the following rules:
[0128] proportional gain k p Adjustment: k p =k p0 +α·|e(t)|+β·|ΔM|, where α is the position deviation weighting coefficient and β is the torque change rate weighting coefficient, used to enhance the system response speed.
[0129] Integral gain K i Adjustment: The integral term weighting coefficient γ is used to suppress steady-state error and avoid integral saturation.
[0130] Differential gain K d Adjustment: k d =k d0 (1+δ·|Δe(t)|), where the differential term weighting coefficient δ is used to suppress overshoot and improve system stability.
[0131] Step 4: Control command output and overload protection;
[0132] Control signal generation: Substitute the adjusted PID control parameters into the control equation to output the drive signal u(t):
[0133]
[0134] Overload warning mechanism: When M actual ≥0.8M actual When this occurs, a warning signal is triggered and the following protective measures are activated:
[0135] 1. Limit the maximum output value of the control command u(t) to prevent torque overload;
[0136] 2. Switch to redundant controllers via FPGA logic control modules to ensure continuous system operation;
[0137] 3. Record the fault status and upload it to the status monitoring module for real-time processing by maintenance personnel.
[0138] The status monitoring module includes a magnetoelectric split-type multi-turn encoder and a Hall sensor to achieve dual verification of the drive motor position. The magnetoelectric split-type multi-turn encoder records the number of fixed position units per revolution and the total number of revolutions, providing high-resolution feedback. Simultaneously, the encoder directly feeds back position information, eliminating the need for system homing upon startup and allowing direct reading of the current position, significantly improving response speed and efficiency. The magnetoelectric split-type multi-turn encoder has a resolution greater than 23 bits, ensuring accurate real-time feedback. Furthermore, the magnetoelectric split-type encoder's anti-interference capabilities and temperature stability further guarantee its operational reliability in complex environments.
[0139] The FPGA logic control module is connected to the servo motor via the CAN bus. The servo motor adopts a trajectory position control mode and supports S-shaped acceleration and deceleration curves.
[0140] like Figure 2 As shown, a control method for a turnout switch machine based on dual-machine hot standby servo motor control includes the following steps:
[0141] S1. System initialization: Initialize the dual-machine hot standby control module, FPGA logic control module and servo drive module respectively. In the initial state, the main controller has control and the redundant controller enters the hot standby state.
[0142] S2. Input operation commands using the command input module, then transmit the operation commands to the main controller, and then synchronously transmit them to the redundant controller via the serial port;
[0143] S3. Determine whether the main controller and the redundant controller are synchronized. If yes, proceed to step S4; otherwise, use a time-stamp-based differential synchronization algorithm to synchronize the data.
[0144] In this embodiment, a differential synchronization algorithm is employed, which transmits only the changed data. Specifically, by comparing the data versions or timestamps of the main controller and redundant controllers, the changed portions are identified and transmitted, significantly reducing bandwidth consumption. Furthermore, a conflict resolution strategy (timestamp priority) and a clock synchronization mechanism effectively address data conflicts and clock asynchrony issues, ensuring stable system operation in complex environments. This synchronization mechanism optimizes communication efficiency and improves system reliability and real-time performance while maintaining data consistency.
[0145] Step S3 specifically includes the following steps:
[0146] S31. Synchronization initialization;
[0147] S311. After the main controller and the redundant controller are powered on, a communication link is established through a handshake protocol.
[0148] S312. Exchange initial register data: system clock reference value T0 (accuracy ≤ 1μs) and initial values of key parameters, including turnout position, motor torque, fault codes, etc.
[0149] S313, The main controller periodically generates a timestamp sequence T. k :
[0150] T k =T0 + k*ΔT (k = 1, 2...n);
[0151] In the formula, ΔT is the synchronization period (default value is 50ms, configurable range is 20ms to 100ms); T0 is the system clock reference value; k is the cycle counter of the main controller; n is the total number of cycles;
[0152] S32, Periodic data comparison;
[0153] S321. The main controller executes the following in each synchronization cycle: freeze the current control instruction output (maintaining the output buffer unchanged), and read its own register data M = {M1, M2, ..., M...} N},M1,M2,...,M N These represent the 1st, 2nd, ... Nth key parameters in the main controller's registers, including turnout position, motor torque, and fault code.
[0154] S322. Send a Differential Request (DRQ) packet to the redundant controller. Packet format:
[0155] |Baotou (0xAA55)|Timestamp (T) k )|Main controller parameter hash value (HASH) M |CRC16 checksum|;
[0156] S323. After receiving the difference request packet, the redundant controller verifies its integrity (CRC16 check) and calculates its own parameter hash value using the CRC32 algorithm. B :
[0157] HASH B =CRC32(B1||B2||...||B N )
[0158] In the formula, B1, B2, ..., B N All data received by the redundant controllers are from the difference request packets.
[0159] S324. Compare the hash value (HASH) of the data M stored in the registers of the main controller. M With HASH B If the consistency is consistent, return a synchronization confirmation packet; otherwise, proceed to step S33.
[0160] S33. Calculate the difference and perform a synchronized decision;
[0161] S331. Calculate the data difference D:
[0162]
[0163] In the formula, M i Main controller register data; B iThis represents the redundant controller register data, where N is the number of critical parameters; δ is the anti-zero coefficient, and δ = 0.1;
[0164] S332. Set the threshold to D0. When D > D0, trigger the full synchronization strategy. When D ≤ D0, trigger the incremental synchronization strategy.
[0165] The full synchronization strategy is as follows: First, the main controller freezes the control output and sends a full data packet (FULL_SYNC), with the format: | Packet header (0x55AA)| Timestamp (T k The status register contains full data; CRC32 checksum. Next, the redundant controller receives and verifies the full data packet, then replaces its own register value with the received full data packet and returns a synchronization completion confirmation packet (SYNC_OK), formatted as: |Packet header (0x5A5A)|Timestamp (T...). k )|Receive data hash value|CRC16 checksum|; Finally, after receiving the synchronization completion confirmation packet, the main controller compares the hash values for consistency, unfreezes the control output, and restores real-time control;
[0166] The incremental synchronization strategy is as follows: First, the main controller calculates the difference parameter set. Secondly, the master controller sends an incremental data packet (DELTA_SYNC) to the redundant controller, with the format: | Packet header (0xA5A5) | Timestamp (T k The set of differential parameters is: | Number of differential parameters (m) | Parameter index list | Parameter value list | CRC16 checksum |. Finally, the redundant controller receives the incremental data packet, updates the local register according to the index, and returns an incremental acknowledgment packet (DELTA_ACK).
[0167] S4. The main controller sends a query command to the FPGA logic control module, and the FPGA logic control module feeds back the running status of the servo drive module from the previous time to the main controller.
[0168] S5. The main controller determines whether the received operation command is valid based on the running status feedback in step S4. If it is valid, step S6 is executed; otherwise, the command input module is notified.
[0169] Step S5 specifically includes the following steps:
[0170] S51. The main controller receives the original instruction data packet in the following format: | Packet header (0x55AA) | Instruction length (2 bytes) | Operation instruction body | Digital signature | CRC32 checksum (4 bytes) | and stores it in a double buffer.
[0171] S52. Verify the static position conflict, opcode whitelist, and security signature of the original instruction data packet respectively;
[0172] The static position conflict verification method is as follows: First, the current position θ of the turnout is read in real time using a magneto-electric split multi-turn encoder. current (Accuracy ±0.1°); then perform illegal position determination: target position θ target It coincides with the current position |θ target -θ current If |≤0.5° (redundancy tolerance is ±0.5°), an error code is fed back; otherwise, it is deemed valid. In this embodiment, a second confirmation can also be performed by reversing the motion.
[0173] The method for operation code whitelist verification (semantic verification) is as follows:
[0174] Define valid opcodes (hexadecimal encoding): Table 1 Valid opcode definitions
[0175] Command Name Command Function 0x01 Turnout positioning 0x02 Inverted conversion 0x03 Emergency Lockdown
[0176] Parse the first byte opcode in the instruction body. If it does not belong to the whitelist set {0x01,0x02,0x03}, return error code 0xF002.
[0177] The secure signature verification (identity authentication) method is as follows: First, extract the 256-byte digital signature from the end of the instruction; then, use the preset public key to calculate the hash value of the instruction body (excluding the signature); finally, compare the hash values, and if they do not match, return the error code 0xF005.
[0178] In this embodiment, the operating status fed back in step S4 includes the forward or reverse rotation of the servo motor. The distinction between forward and reverse rotation of the servo motor is determined by the difference between the target position and the current position. Specifically, when the target position is greater than the current position, the motor rotates forward (clockwise); when the target position is less than the current position, the motor rotates in reverse (counterclockwise), thereby achieving precise direction control and position positioning.
[0179] During the forward or reverse rotation process, the dual-machine hot standby control module first calculates the target position value for forward or reverse rotation based on the turnout displacement requirement, and sends it to the FPGA logic control module via serial port. When the target position value is greater than the current position value, the servo motor will rotate in the forward direction (clockwise); when the target position value is less than the current position value, the servo motor will rotate in the reverse direction (counterclockwise).
[0180] After the start command is sent, the servo motor begins to rotate forward or reverse. Simultaneously, the encoder monitors the servo motor's position in real time to ensure it moves in the expected direction (acceleration phase -> constant speed operation -> deceleration phase -> precise positioning). When the servo motor reaches the target position for forward or reverse rotation, a stop command is sent to complete the forward or reverse operation and confirm that the turnout has accurately moved to the designated position.
[0181] S6. The main controller's control board sends the operation command to the main controller's driver board, generates the target position control command, and transmits the target position control command to the FPGA logic control module.
[0182] The control board described in step S6 calculates the number of rotations N of the servo motor in the servo drive module using the following formula:
[0183]
[0184] In the formula, S represents the turnout opening stroke, in mm; G represents the reduction ratio; and P represents the lead screw stroke, in mm / revolution.
[0185] In this embodiment, S = 160mm, G = 50 / 1, P = 10mm / revolution, and substituting these values into the above formula yields N = 800. At this point, the main controller synchronizes the command to the redundant controller, converts 800 to hexadecimal, and groups it into bytes to obtain the 800 revolutions instruction. Simultaneously, the main controller and the redundant controller send the 800-revolution motor write control parsing instruction to the FPGA logic control module via serial port for data verification.
[0186] The FPGA logic control module forwards the above instructions to the servo motor, driving it to rotate forward or reverse until it reaches the target position. During this process, single-turn position data and multi-turn data are acquired through a magnetoelectric split-type multi-turn encoder. Simultaneously, feedback from an external Hall sensor detects the turnout end position to determine if the turnout is in position, with an accuracy greater than 0.1mm. Through real-time feedback from the servo motor, the FPGA logic control module monitors the speed, position, and torque changes during the turnout's movement, achieving precise acceleration / deceleration and position / reverse control.
[0187] The FPGA logic control module monitors the servo motor's feedback status in real time and queries the fault table to ensure the servo motor executes commands correctly and without faults. Simultaneously, the servo motor's execution results and status information are fed back to the FPGA logic control module in real time for subsequent querying and analysis.
[0188] Once the servo motor completes its current action, the updated data feedback is sent to the FPGA logic control module and the dual-machine hot standby control module. The dual-machine hot standby control module receives the information, updates the system status, and records the operation log (detailed log recording helps in troubleshooting and allows for attempts to resynchronize or manually correct the data. Through this process, the system can effectively manage and control motor operation, ensuring data accuracy and consistency), preparing for the next operation.
[0189] In terms of anomaly handling, if data mismatch, query failure, or abnormality is detected in motor operation, the system will trigger an alarm mechanism to notify maintenance personnel to intervene.
[0190] Table 2 Fault Table of this Embodiment
[0191]
[0192] S7 and the FPGA logic control module perform consistency checks and generate drive signals based on the target position control instructions;
[0193] The consistency check described in step S7 includes mutual verification of heartbeat signals between the main controller and the redundant controller, and cross-verification based on heartbeat signals stored in registers.
[0194] In this embodiment, the timestamp is accurate to the millisecond level. The main controller timestamps the data when generating it, and redundant controllers record the timestamps while receiving the data, ensuring data order and consistency and avoiding data conflicts when multiple controllers work together. The synchronized content includes key information such as system status (e.g., servo motor operating status, position, and speed information), control parameters (e.g., PID gain, acceleration curve), operation commands (e.g., start and stop commands), and fault logs, ensuring the accuracy of system operation and fault diagnosis.
[0195] Step S7 specifically includes the following steps:
[0196] S71, Heartbeat signal generation and transmission;
[0197] The main controller and the redundant controller each use their own independent crystal oscillators (accuracy ±50ppm) to generate a reference clock;
[0198] S72, The receiving end verifies the heartbeat signal;
[0199] S721, receives heartbeat signals;
[0200] S722, Decode, Verify Rising Edge Interval = 50ms ± 2.5ms;
[0201] S723, Synchronization Header Verification (0xA55A) allows 1 bit of fault tolerance;
[0202] S724 and CRC16 checksums;
[0203] S725, Status word validity check, controller ID∈{0x1,0x2}, heartbeat counter continuously increments.
[0204] Table 3 Fault Judgment Matrix
[0205]
[0206] S73, Cross-validation;
[0207] The main controller and the redundant controller each maintain a 32-bit status register. The register adopts a high-order split structure design. Specifically, the high 16 bits of the main controller status register store its own heartbeat counter (incrementing by 1 every 100ms period, with a counting range of 0 to 65535), and the low 16 bits store the heartbeat count value parsed from the heartbeat frame of the redundant controller in real time. The status register of the redundant controller is deployed in a mirror structure, with its high 16 bits being its own counter and its low 16 bits being the main controller counter.
[0208] During operation, the two machines trigger periodic cross-validation via independent hardware timers:
[0209] S731, Synchronization verification cycle: After receiving 10 heartbeat signals (i.e. 1 second), the main controller and the redundant controller automatically read each other's status register;
[0210] S732, Counter Difference Calculation: Compare the locally stored counterpart counter value with the latest received value, and calculate the absolute difference ΔC = |C|. 本地备份 -C 远程实际 |;
[0211] S733. Consistency determination: If ΔC > 2 (allowing ±1 cycle error due to transmission delay), it is determined that the two machines are out of sync, triggering the following actions:
[0212] The main controller immediately freezes the control command output and sends a forced synchronization request (the highest priority CAN message, ID: 0x0) to the redundant controller, while simultaneously initiating the full data synchronization process.
[0213] S734, Abnormal Isolation: If the synchronization verification fails three times in a row, the system will automatically switch the faulty main controller or redundant controller to offline state and generate a hardware fault log. At the same time, it will provide dual prompts through LED indicators and the host computer alarm system.
[0214] S8. The servo drive module rotates forward or backward according to the generated drive signal to change the position of the turnout. During this process, the status monitoring module monitors the operating status of the servo drive module to determine whether the turnout is in position. Once the turnout is in position, the servo drive module is shut down, and the dual-machine hot standby control module and FPGA logic control module store the updated data.
[0215] During steps S1-S8, the FPGA logic control module periodically checks whether the main controller has failed. If a failure occurs, the FPGA logic control module switches control from the main controller to the redundant controller, marking the current redundant controller as the main controller and the original main controller (after recovery) as the redundant controller. Specifically, if a failure occurs, the FPGA logic control module immediately initiates the switching process: sending a high-priority takeover signal to the redundant controller, temporarily freezing the main controller's output, and activating the switchover log recording function. Upon receiving the takeover signal, the redundant controller immediately enters the takeover preparation state, verifies the signal's validity, loads the latest operating status and parameters, switches its internal operating mode to main control mode, and sends a ready signal to the FPGA logic control module.
[0216] In this embodiment, when a fault occurs, a smooth switch is first performed between the main controller and the redundant controller; then the redundant controller quickly takes over control. That is, the FPGA logic control module uses hardware-level parallel processing capabilities to perform multiple tasks such as fault detection, switch triggering, and status monitoring at the same time, so that the time from fault detection to complete transfer of control to the redundant controller is controlled within 30ms (the redundant controller preloads some key data and instructions during normal operation so that it can start quickly when taking over).
[0217] After the switchover is complete, the FPGA logic control module updates the system status and marks the original redundant controller as the current master controller. If the original master controller recovers, it will be rejoined as a new redundant controller using the status management module to ensure a smooth transition (the status management module is responsible for maintaining and updating the operating status information of the entire system, including the role, operating mode, and key parameters of each controller).
[0218] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A control method for a turnout switch machine based on dual-machine hot standby servo motor control, characterized in that: A turnout switch machine based on dual-machine hot standby servo motor control is characterized by comprising: The instruction input module is used to generate operation instructions; The dual-machine hot standby control module includes a main controller and a redundant controller with the same built-in control logic that communicate with each other. It is used to process operation instructions based on the main controller or the redundant controller that determines the control authority and generate target position control instructions. The FPGA logic control module is used to generate drive signals based on target position control commands, monitor the fault status of the main controller and redundant controller in real time, and switch the control of the main controller and redundant controller based on the fault status. The servo drive module includes a servo motor, used to control the position of railway turnouts based on drive signals; The status monitoring module is used to monitor the operating status of the servo drive module and feed it back to the FPGA logic control module; The instruction input module, dual-machine hot standby control module, FPGA logic control module and servo drive module are connected in sequence for communication. The servo drive module is also connected to the FPGA logic control module for feedback through the status monitoring module. The control method includes the following steps: S1. System initialization: Initialize the dual-machine hot standby control module, FPGA logic control module and servo drive module respectively. In the initial state, the main controller has control and the redundant controller enters the hot standby state. S2. Input operation commands using the command input module, then transmit the operation commands to the main controller, and then synchronously transmit them to the redundant controller via the serial port; S3. Determine whether the main controller and the redundant controller are synchronized. If yes, proceed to step S4; otherwise, use a time-stamp-based differential synchronization algorithm to synchronize the data. S4. The main controller sends a query command to the FPGA logic control module, and the FPGA logic control module feeds back the running status of the servo drive module from the previous time to the main controller. S5. The main controller determines whether the received operation command is valid based on the running status feedback in step S4. If it is valid, step S6 is executed; otherwise, the command input module is notified. S6. The main controller's control board sends the operation command to the main controller's driver board, generates the target position control command, and transmits the target position control command to the FPGA logic control module. S7 and the FPGA logic control module perform consistency checks and generate drive signals based on the target position control instructions; S8. The servo drive module rotates forward or backward according to the generated drive signal to change the position of the turnout. During this process, the status monitoring module monitors the operating status of the servo drive module to determine whether the turnout is in position. Once the turnout is in position, the servo drive module is shut down, and the dual-machine hot standby control module and FPGA logic control module store the updated data. During steps S1-S8, the FPGA logic control module periodically determines whether the main controller has failed. If a failure occurs, the FPGA logic control module switches the control from the main controller to the redundant controller, marks the current redundant controller as the main controller, and marks the original main controller after it has recovered as the redundant controller. Step S3 specifically includes the following steps: S31. Synchronization initialization; S311. After the main controller and the redundant controller are powered on, a communication link is established through a handshake protocol. S312. Exchange initial register data: system clock reference value T0 and initial values of key parameters, including turnout position, motor torque, fault codes, etc. S313, The main controller periodically generates a timestamp sequence T. k : T k =T0+k*ΔT(k=1,2...n); In the formula, ΔT is the synchronization period; T0 is the system clock reference value; k is the period counter of the main controller; and n is the total number of periods. S32, Periodic data comparison; S321. The main controller executes the following in each synchronization cycle: freeze the current control instruction output, and read its own register data M = {M1, M2, ..., M...} N },M1,M2,...,M N These represent the 1st, 2nd, ..., Nth key parameters in the main controller's registers, including turnout position, motor torque, and fault code. S322, Send a difference request packet to the redundant controller; S323. After receiving the difference request packet, the redundant controller verifies its integrity and calculates its own parameter hash value using the CRC32 algorithm. B : HASH B =CRC32(B1||B2||...||B N ) In the formula, B1, B2, ..., B N All data received by the redundant controllers are from the difference request packets. S324. Compare the hash value (HASH) of the data M stored in the registers of the main controller. M With HASH B If the consistency is consistent, return a synchronization confirmation packet; otherwise, proceed to step S33. S33. Calculate the difference and perform a synchronized decision; S331. Calculate the data difference D: In the formula, M i Main controller register data; B i This represents the redundant controller register data, where N is the number of critical parameters; δ is the anti-zero coefficient, and δ = 0.1; S332. Set the threshold to D0. When D > D0, trigger the full synchronization strategy. When D ≤ D0, trigger the incremental synchronization strategy. The full synchronization strategy is as follows: First, the main controller freezes the control output and sends the full data packet; second, the redundant controller receives the full data packet, verifies it, replaces its own register value with the received full data packet, and returns a synchronization completion confirmation packet; finally, after receiving the synchronization completion confirmation packet, the main controller compares the hash values for consistency, unfreezes the control output, and restores real-time control. The incremental synchronization strategy is as follows: First, the main controller calculates the difference parameter set. Secondly, the main controller sends incremental data packets, i.e., the difference parameter set, to the redundant controller; finally, the redundant controller receives the incremental data packets, updates its local registers according to the index, and returns an incremental acknowledgment packet.
2. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: Step S5 specifically includes the following steps: S51. The main controller receives the raw instruction data packet and stores it in a double buffer. S52. Verify the static position conflict, opcode whitelist, and security signature of the original instruction data packet respectively; The static position conflict verification method is as follows: First, the current position θ of the turnout is read in real time using a magneto-electric split multi-turn encoder. current Then, determine the illegal position: target position θ target It coincides with the current position |θ target -θ current If |≤0.5°, an error code will be returned; otherwise, it will be considered valid.
3. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: The control board described in step S6 calculates the number of rotations N of the servo motor in the servo drive module using the following formula: In the formula, S represents the turnout opening stroke, in mm; G represents the reduction ratio; and P represents the lead screw, in mm / revolution. The consistency check described in step S7 includes mutual verification of heartbeat signals between the main controller and the redundant controller, and cross-verification based on heartbeat signals stored in registers.
4. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: The instruction input module communicates with the main controller and the redundant controller via RS485 bus. The main controller and the redundant controller communicate via serial port to realize data synchronization and heartbeat signal mutual detection based on the timestamp-based differential synchronization algorithm. Both the main controller and the redundant controller have built-in registers to store timestamped heartbeat signals and fault tables. Both the main controller and the redundant controller establish serial port connections with the FPGA logic control module, forming a star topology. This allows the FPGA logic control module to periodically retrieve the heartbeat signals stored in the registers for cross-validation.
5. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 4, characterized in that: The FPGA logic control module includes a three-level watchdog timer, which consists of a main timer, a backup timer, and a supervisor timer. The main timer is used to monitor the operating status of the main controller or redundant controller with control authority. The backup timer is used to monitor the operating status of the main controller or redundant controller with control authority when the main timer fails. The supervisor timer is used to monitor the health status of the main timer and the redundant timer. The refresh periods of the main timer, the backup timer, and the supervisor timer are 5mm, 20mm, and 50mm, respectively. This is used to determine whether the heartbeat signals sent by the main controller and redundant controller to the FPGA logic control module are lost or the timestamps have timed out. If so, it is determined that the main controller has failed, and the severity of the failure is classified according to the timeout period, and control is switched at the same time.
6. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: Both the main controller and the redundant controller use PID control algorithms for their control logic. These algorithms adjust the control parameters in real time according to load changes. The proportional gain controls the response speed, the integral gain eliminates steady-state errors, and the derivative gain suppresses oscillations.
7. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: The condition monitoring module includes a magnetoelectric split-type multi-turn encoder and a Hall sensor to achieve dual verification of the drive motor position; The resolution of the magnetoelectric split-type multi-turn encoder is greater than 23 bits.
8. The control method for a turnout switch machine based on dual-machine hot standby servo motor control according to claim 1, characterized in that: The FPGA logic control module is connected to the servo motor via the CAN bus. The servo motor adopts a trajectory position control mode and supports S-shaped acceleration and deceleration curves.
Citation Information
Patent Citations
Warm standby redundant system for turnout controller
CN106125544A
Fault monitoring system of straddle type monorail turnout redundancy control system
CN117331300A