Swing arm control method, system and storage medium for road traffic warning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANHE COLLEGE GUANGDONG POLYTECHNIC NORMAL UNIV
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-07
AI Technical Summary
目前,为增强路障的警示效果,业界通常采用以下几种方式:其一,在路障表面粘贴反光材料,利用车辆灯光进行被动反射,虽成本低廉但警示效果完全依赖于车辆大灯照射,在无光或光线不佳的环境下效果大打折扣,且属于静态警示,驾驶员易产生视觉疲劳;其二,在路障顶部固定旗帜或彩条,通过鲜艳颜色增加被动可视性,但其飘动完全依赖自然风力,无风时仍为静态,警示效果极不稳定、不可控;其三,采用LED警示灯实现常亮或频闪,虽为较为主流的主动警示方式,但其闪烁模式相对简单,长期观察下驾驶员仍可能产生适应性忽视;其四,少数高端路障集成声音报警功能,然而这类设备通常结构复杂、成本高昂,且声光警示动作缺乏协同设计,未能形成具有强烈指向性的复合警示信号
[0014] This invention proposes a swing arm control method for road traffic warnings. This method can break the driver's visual adaptation through dynamic visual signals of complex trajectories, thereby improving the effectiveness of road warnings.
Smart Images

Figure CN122525997A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic management technology, and in particular to a swing arm control method, system and storage medium for road traffic warning. Background Technology
[0002] Roadblocks are used in various scenarios such as road construction, traffic accident handling, temporary traffic control, and warning of dangerous road sections. As the most common safety isolation and warning device, the effectiveness of their warning function directly affects road traffic safety. Currently, to enhance the warning effect of roadblocks, the industry typically employs the following methods: First, reflective materials are pasted onto the roadblock surface, passively reflecting vehicle headlights. While inexpensive, this method relies entirely on headlight illumination, significantly reducing effectiveness in low-light or dark environments. Furthermore, as a static warning, it can easily cause driver fatigue. Second, flags or stripes are fixed to the top of the roadblock, increasing passive visibility through vibrant colors. However, their movement depends entirely on natural wind, remaining static even without wind, resulting in an unstable and uncontrollable warning effect. Third, LED warning lights are used for constant illumination or flashing. While a mainstream active warning method, their flashing patterns are relatively simple, and drivers may become accustomed to ignoring them after prolonged observation. Fourth, a few high-end roadblocks integrate audible alarm functions. However, these devices are typically complex in structure, expensive, and lack coordinated design between audible and visual warning actions, failing to create a strong, directional, composite warning signal. In summary, existing roadblock warning devices generally suffer from problems such as single and fixed warning modes, easy visual adaptation, insufficient multi-sensory coordination, poor environmental adaptability, and low deployment flexibility, which cannot meet the urgent need for efficient dynamic warnings in complex traffic environments.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a control method for a swing arm used for road traffic warnings, aiming to improve the warning capability of the swing arm. To achieve the above objective, this invention provides a control method for a swing arm used for road traffic warnings, applied to a swing arm device. The swing arm device includes: a fixing device, a red flag, more than one rotary motor, and a robotic arm. The fixing device is used to mount the swing arm device on an external road barrier. The robotic arm is connected to the fixing device. The red flag is located at the end of the robotic arm. The intelligent swing arm control method for road traffic warnings includes the following steps: Obtain the control mode data of the swing arm device at the current moment; The target rotation angle data is determined based on the control mode data, and the target rotation angle data is used to control the more than one rotary motor to operate in coordination. Control the operation of more than one rotary motor according to the target rotation angle data to make the red flag sway.
[0005] Optionally, the more than one rotary motor includes: a first rotary motor and a second rotary motor, and the step of determining the target rotation angle data based on the current control mode data includes: Generate a sine reference signal and a cosine reference signal based on the current control mode data; The first target rotation angle data of the first rotary motor is determined based on the sinusoidal reference signal; The second target rotation angle data of the second rotary motor is determined based on the cosine reference signal; The sine reference signal and the cosine reference signal have the same frequency and a phase difference of 90 degrees.
[0006] Optionally, the step of controlling the operation of the corresponding motor based on the first target turning angle data and the second target turning angle data to make the red flag generate a swaying trajectory includes: Based on the first target rotation angle data, the first rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the horizontal plane; Based on the second target rotation angle data, the second rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the vertical plane; The combined effect of the periodic reciprocating oscillation in the horizontal plane and the periodic reciprocating oscillation in the vertical plane causes the end of the red flag to generate a conical circumferential swaying trajectory.
[0007] Optionally, the more than one rotary motor further includes: a third rotary motor, and the step of controlling the more than one rotary motor to operate according to the target rotation angle data to make the red flag generate a swaying trajectory further includes: The operation of the third rotating motor is controlled according to the third target rotation angle data of the third rotating motor, so that the red flag rotates continuously around its own axis.
[0008] Optionally, the step of generating a sine reference signal and a cosine reference signal based on the current control mode data includes: When the current control mode data is normal mode data, determine the normal frequency value and normal swing angle range value of the sine reference signal and the cosine reference signal; When the current control mode data is enhanced mode data, the enhanced frequency value and enhanced swing angle range value of the sine reference signal and the cosine reference signal are determined, wherein the enhanced frequency value is greater than the normal frequency value and the enhanced swing angle range value is greater than the normal swing angle range value; When the current control mode data is energy-saving mode data, the energy-saving frequency value and energy-saving swing angle range value of the sine reference signal and the cosine reference signal are determined. The energy-saving frequency value is less than the normal frequency value, and the energy-saving swing angle range value is less than the normal swing angle range value.
[0009] Optionally, the step of obtaining the control mode data of the swing arm device at the current moment may further include: Acquire environmental sensing data, including light intensity data, ambient sound data, and weather status data; The target control mode is determined based on the environmental perception data, and the target control mode includes a normal mode, an enhanced mode, or an energy-saving mode. The current control mode data is generated based on the target control mode.
[0010] Optionally, the step of determining the target control mode based on the environmental perception data includes: Based on the light intensity data, determine whether the current environment is a daytime or nighttime environment; Determine the current ambient noise level based on the ambient sound data; Based on the weather status data, determine whether the current weather is normal or severe. The target control mode is determined based on the daytime or nighttime environment, the environmental noise level, and the normal or severe weather.
[0011] Furthermore, to achieve the above objectives, the present invention also provides a swing arm control system for road traffic warning, applied to a swing arm device. The swing arm device includes: a fixing device, a red flag, multiple rotary motors, and a robotic arm. The fixing device is used to install the swing arm device on an external road barrier. The robotic arm includes a main control robotic arm and a moving robotic arm. One end of the main control robotic arm is fixedly connected to the fixing device, and the moving robotic arm is rotatably connected to the other end of the main control robotic arm. The red flag is disposed at the end of the moving robotic arm. The swing arm control system for road traffic warning includes: The acquisition module is used to acquire data on the current control mode. The determining module is used to determine target rotation angle data based on the current control mode data, and the target rotation angle data is used to control the coordinated operation of the multiple rotary motors; The control module is used to control the operation of the multiple rotating motors according to the target rotation angle data, so that the red flag produces a swaying trajectory.
[0012] Optionally, the swing arm device further includes: a rotary bearing, which is disposed between the main control robotic arm and the motion robotic arm, wherein the outer ring of the rotary bearing is fixedly connected to the main control robotic arm, and the inner ring of the rotary bearing is fixedly connected to the motion robotic arm; The plurality of rotary motors include: a first rotary motor and a second rotary motor. The first rotary motor is mounted on the fixture. The output shaft of the first rotary motor is fixedly connected to the main control robotic arm and is used to drive the main control robotic arm to rotate in the horizontal plane. The second rotary motor is mounted on the main control robotic arm, and the output shaft of the second rotary motor is fixedly connected to the motion robotic arm, for driving the motion robotic arm to swing in a vertical plane around the axis of the rotary bearing.
[0013] In addition, to achieve the above objectives, the present invention also provides a storage medium storing a swing arm control program for road traffic warning, wherein when the swing arm control program for road traffic warning is executed by a processor, it implements the steps of the swing arm control method for road traffic warning described in any of the above claims.
[0014] This invention proposes a swing arm control method for road traffic warnings. This method can break the driver's visual adaptation through dynamic visual signals of complex trajectories, thereby improving the effectiveness of road warnings. Attached Figure Description
[0015] Figure 1 This is a front view of the three-dimensional structure of the swing arm device for road traffic warning in the hardware operating environment of the embodiment of the present invention; Figure 2 This is a partial connection structure cross-sectional schematic diagram of the swing arm device for road traffic warning in the hardware operating environment of the embodiment of the present invention; Figure 3 This is a three-dimensional structural diagram of the swing arm device for road traffic warning in the hardware operating environment of the embodiment of the present invention; Figure 4 This is a flowchart illustrating the first embodiment of the swing arm method for road traffic warning according to the present invention; Figure 5 This is a flowchart illustrating a second embodiment of the swing arm method for road traffic warning according to the present invention; Figure 6 An execution logic diagram for a swing arm control system used for road traffic warning.
[0016] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0017] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0018] This invention provides a swing arm device for road traffic warning, which can be understood as referring to... Figures 1 to 3 In some examples of the present invention, the swing arm device includes a fixture 3, a first rotary motor 4, a main control robotic arm 1, a second rotary motor 7, a motion robotic arm 6, a rotary bearing 5, a third rotary motor 8, a gripper 10, and a red flag 11.
[0019] Reference Figure 1 In some examples of this invention, the fixture 3 is made of high-strength engineering plastic, such as ABS+PC alloy, or optionally, lightweight aluminum alloy by injection molding or CNC machining, with its bottom profile precisely matching the circular or square platform at the top of the standard traffic cone 9. The fixture 3 integrates a quick-locking mechanism, such as a knob-type eccentric cam clamping structure or a spring-return chuck, which allows the entire swing arm device to be securely locked onto the top of the roadblock by manual rotation or pressing, without any tools. The top of the fixture 3 has a flange with threaded holes for mounting the first rotary motor 4.
[0020] Using the above structure, the fixing device 3 serves as the connection base between the swing arm device and the external road barrier. Its quick-locking design enables the modular and rapid deployment of the swing arm device. The high-level dynamic warning function can be flexibly added to the standard traffic cone 9 without replacing the existing road barrier, which greatly reduces the cost of use and the deployment threshold.
[0021] Reference Figure 1 and Figure 2 In some examples of this invention, the first rotary motor 4 is a high-precision hybrid stepper motor or AC servo motor, its body being vertically fixed to the flange above the fixture 3 by four hexagon socket head cap screws. The output shaft of the first rotary motor 4 extends upward in the vertical direction (Z-axis), and a keyway is machined on the shaft and a coupling is installed thereon. The step angle of the first rotary motor 4 is 1.8 degrees, which can be reduced to 0.09 degrees after being subdivided with a driver, and is used to provide rotational power in the horizontal plane, driving the main control robotic arm 1 to perform periodic reciprocating swings in the horizontal plane.
[0022] It should be noted that the output shaft of the first rotary motor 4 is connected to the lower end of the main control robotic arm 1 via a coupling. When the first rotary motor 4 receives the pulse direction signal sent by the MCU, the output shaft rotates precisely according to the target rotation angle data, thereby driving the main control robotic arm 1 to swing around the Z-axis in the horizontal plane.
[0023] Reference Figure 1 and Figure 2In some examples of this invention, the main control robotic arm 1 is an inverted L-shaped hollow shell, formed by two die-cast aluminum alloy parts joined together. The lower end of the main control robotic arm 1 is driven and connected to the output shaft of the first rotary motor 4 via a coupling, and the upper end extends horizontally to form a cantilever structure. The vertical section of the main control robotic arm 1 is designed with a sealed electronic compartment, which integrates a microcontroller, i.e., an MCU, a motor drive module, a buzzer, a power supply module, and status indicator lights, among other electronic components.
[0024] The MCU uses an STM32F103 series 32-bit ARM Cortex-M3 processor with a main frequency of 72MHz. It has multiple built-in general-purpose timers, a PWM generator, Flash and RAM. The MCU has a pre-stored motion control algorithm based on a trigonometric function table. The motor drive module uses three independent TB67S109 stepper motor drivers or servo drivers, which are electrically connected to the windings of the first rotary motor 4, the second rotary motor 7 and the third rotary motor 8, respectively. The drivers receive pulse direction signals from the MCU to achieve precise control of the motor speed, direction and absolute angular position.
[0025] With the above configuration, the main control robotic arm 1 serves as both the structural support frame of the swing arm equipment and the integrated carrier of the electronic control system. Its inverted L-shaped structure and internal sealed electronic compartment design ensure sufficient structural rigidity while providing waterproof and dustproof protection for electronic components, thereby improving the reliability and service life of the equipment in complex outdoor environments.
[0026] Reference Figure 1 and Figure 2 In some examples of the present invention, the second rotary motor 7 is of the same model as the first rotary motor 4, and its housing is fixedly mounted on the horizontal extension end of the main control robotic arm 1 via a right-angle adapter bracket. The output shaft of the second rotary motor 7 is arranged along the horizontal Y-axis to provide pitch or oscillation power in the vertical plane.
[0027] It should be noted that the output shaft of the second rotary motor 7 is fixedly connected to one end of the motion robotic arm 6 via a flange. When the second rotary motor 7 receives the drive signal from the MCU, the output shaft rotates according to the target rotation angle data, thereby driving the motion robotic arm 6 to periodically reciprocate around the horizontal Y-axis in the vertical plane.
[0028] Reference Figure 1 and Figure 2 In some examples of this invention, the robotic arm 6 is a hollow carbon fiber tube with a length of 150mm to 250mm, which is lightweight and has high rigidity. One end of the robotic arm 6 is driven to the output shaft of the second rotary motor 7 via a flange, and the other end is used to mount the third rotary motor 8. The inside of the tube of the robotic arm 6 has a pre-reserved wiring channel for laying the power and signal lines of the third rotary motor 8.
[0029] With the above structure, the motion robotic arm 6 is made of carbon fiber hollow tube material, which greatly reduces the mass of the end moving parts while ensuring sufficient bending stiffness, reduces the driving load of the second rotary motor 7, and also reduces the inertial resistance of the first rotary motor 4 during horizontal swing, making the overall motion response more sensitive and faster.
[0030] Reference Figure 2 In some examples of the present invention, the swing arm device further includes a connecting robotic arm 2, which refers to an interface assembly that enables reliable signal and power transmission between the main control robotic arm 1 and the motion robotic arm 6. Specifically, the connecting robotic arm 2 includes a flexible flat ribbon cable or a miniature slip ring, with its two ends respectively welded to the main control board inside the main control robotic arm 1 and the motor interface board at the end of the motion robotic arm 6.
[0031] With the above configuration, the connecting robotic arm 2 achieves the electrical connection between the main control robotic arm 1 and the motion robotic arm 6 through a flexible flat cable or a miniature slip ring. This design allows the electrical connection to remain open even when the motion robotic arm 6 swings within a range of ±90 degrees, without breaking due to cable fatigue, thus ensuring the synchronous and reliable rotational motion and signal transmission.
[0032] Reference Figure 1 and Figure 2 In some examples of the present invention, the rotary bearing 5 is a miniature deep groove ball bearing, such as the MR85ZZ model. The outer ring of the rotary bearing 5, i.e. the fixed part, is pressed into a bearing housing by a tight fit. The bearing housing is connected to the output shaft of the third rotary motor 8 by a key. The inner ring of the rotary bearing 5, i.e. the rotating part, is fixedly connected to the clamp 10 and can rotate freely.
[0033] It should be noted that the rotary bearing 5 is located between the third rotary motor 8 and the gripper 10, realizing the rotatable connection between the output shaft of the third rotary motor 8 and the gripper 10, so that the third rotary motor 8 can drive the red flag 11 to rotate continuously around its own axis, while the vertical plane swing of the motion robotic arm 6 is driven independently by the second rotary motor 7, and the two movements do not interfere with each other.
[0034] Reference Figure 1 and Figure 2 In some examples of this invention, the third rotary motor 8 is a small DC geared motor with a reduction ratio of 1:50 and a rated speed of 60 rpm. The housing of the third rotary motor 8 is fixedly mounted to the distal end of the robotic arm 6 by screws. The output shaft of the third rotary motor 8 is connected to the bearing seat of the rotary bearing 5 by a key connection, and is used to drive the red flag 11 to rotate around its own axis.
[0035] Using the above structure, the third rotary motor 8 drives the Hongqi 11 to rotate continuously around its own axis, creating a dynamic flipping effect on the flag surface and further enhancing the visual prominence of the Hongqi 11. The third rotary motor 8 works in conjunction with the first rotary motor 4 and the second rotary motor 7 to realize the three-dimensional composite motion of the Hongqi 11: sinusoidal oscillation in the horizontal plane, cosine oscillation in the vertical plane, and spin motion around its own axis.
[0036] This invention provides a method for controlling a swing arm for road traffic warnings, referring to... Figure 4 , Figure 2 This is a flowchart illustrating the first embodiment of a swing arm control method for road traffic warning according to the present invention.
[0037] In this embodiment, the swing arm control method for road traffic warning includes: Step S1: Obtain the control mode data of the swing arm device at the current moment; In this embodiment, the swing arm device includes a fixator, a main control robotic arm, a motion robotic arm, a red flag, and multiple rotary motors. The bottom contour of the fixator matches the top of a standard traffic cone, and it integrates a quick-locking mechanism, achieving rapid installation with the road barrier via a rotary eccentric cam or spring-returning claw. Control mode data is generated by a microcontroller, i.e., an MCU, preferably an STM32F103 series, based on a preset program or external instructions. This control mode data characterizes the current operating state of the swing arm device, including normal mode, enhanced mode, and energy-saving mode. After power-on, the MCU loads the pre-set control program and reads the current control mode data to determine the swing strategy of the red flag.
[0038] Step S2: Determine the target rotation angle data based on the control mode data. The target rotation angle data is used to control the coordinated operation of more than one rotary motor. In this embodiment, the target rotation angle data includes the first target rotation angle data of the first rotary motor and the second target rotation angle data of the second rotary motor. The MCU pre-stores a motion control algorithm based on a trigonometric function table. According to the frequency value and swing angle range value corresponding to the control mode data, it generates a sine reference signal and a cosine reference signal, which are mapped to the target rotation angle data of the first and second rotary motors, respectively. It should be noted that the sine reference signal and the cosine reference signal have the same frequency and a 90-degree phase difference to ensure that the coordinated motion of the two-axis motors can synthesize a conical circular swaying trajectory.
[0039] Step S3: Control the operation of more than one rotary motor according to the target rotation angle data to make the red flag sway.
[0040] In this embodiment, a TB67S109 stepper motor driver is typically used to output pulse direction signals to the first and second rotary motors via the motor drive module. These pulse direction signals can be PWM or DIR. It should be noted that the type of driver and the driving signal are not limited here. The first rotary motor drives the main control robotic arm to perform periodic reciprocating swings in the horizontal plane, while the second rotary motor drives the motion robotic arm to perform periodic reciprocating swings in the vertical plane. Under their combined action, the end of the red flag generates a conical circular swaying trajectory. Furthermore, the buzzer integrated inside the main control robotic arm is time-sequentially correlated with the red flag's swaying motion, achieving a coordinated sound and light warning effect. This allows the dynamic visual signals of complex trajectories to disrupt the driver's visual adaptation, improving the effectiveness of road warnings.
[0041] Furthermore, based on the first embodiment, a second embodiment of the swing arm control method for road traffic warning of the present invention is proposed. In this embodiment, reference is made to... Figure 5 The more than one rotary motor includes: a first rotary motor and a second rotary motor, and the step of determining the target rotation angle data based on the current control mode data includes: Step S21: Generate a sine reference signal and a cosine reference signal based on the current control mode data; In this embodiment, sine and cosine reference signals are generated based on the built-in trigonometric function table and timer interrupt mechanism. Specifically, within one control cycle, the pre-stored sine function value table is queried at equal time intervals, and the sine and cosine sequences are output sequentially. It should be noted that the sine and cosine reference signals have the same frequency, and the cosine reference signal lags the sine reference signal by 90 degrees in phase. This phase relationship ensures that the trajectory of the flag's end in space after the two-axis motion is synthesized is a regular conical circular motion. Optionally, the amplitudes of the sine and cosine reference signals can be scaled according to the control mode data to adjust the swing amplitude range.
[0042] Step S22: Determine the first target rotation angle data of the first rotary motor based on the sinusoidal reference signal; In this embodiment, optionally, the first rotary motor is a high-precision hybrid stepper motor with a step angle of 1.8 degrees, which can be subdivided to 0.09 degrees with the help of a driver. It is mounted on the flange above the fixture, and its output shaft is arranged along the vertical Z-axis to provide rotational power in the horizontal plane. The first target rotation angle data is obtained by proportional mapping of a sine reference signal. Specifically, the instantaneous value of the sine reference signal is multiplied by a preset swing angle scaling factor to convert it into the target absolute angle of the main control robotic arm in the horizontal plane. It should be noted that the sign of the first target rotation angle data determines the direction of rotation of the first rotary motor. A positive value corresponds to clockwise rotation, and a negative value corresponds to counterclockwise rotation, thereby realizing the periodic reciprocating swing of the main control robotic arm in the horizontal plane.
[0043] Step S23: Determine the second target rotation angle data of the second rotary motor based on the cosine reference signal; The sine reference signal and the cosine reference signal have the same frequency and a phase difference of 90 degrees.
[0044] In this embodiment, the second rotary motor is the same model as the first rotary motor and is fixedly mounted on the horizontal extension end of the main control robotic arm via a right-angle adapter bracket. Its output shaft is arranged along the horizontal Y-axis to provide pitch power in the vertical plane. The second target rotation angle data is obtained by proportional mapping of a cosine reference signal. The mapping method is the same as that for the first target rotation angle data: the instantaneous value of the cosine reference signal is multiplied by the swing angle proportional coefficient to convert it into the target absolute angle of the moving robotic arm in the vertical plane. It should be noted that the sign of the second target rotation angle data determines the direction of rotation of the second rotary motor; a positive value corresponds to upward swing, and a negative value corresponds to downward swing, thereby realizing the periodic reciprocating swing of the moving robotic arm in the vertical plane.
[0045] Furthermore, the step of controlling the operation of the corresponding motor based on the first target turning angle data and the second target turning angle data to make the red flag generate a swaying trajectory includes: Based on the first target rotation angle data, the first rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the horizontal plane; Based on the second target rotation angle data, the second rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the vertical plane; The combined effect of the periodic reciprocating oscillation in the horizontal plane and the periodic reciprocating oscillation in the vertical plane causes the end of the red flag to generate a conical circumferential swaying trajectory.
[0046] In this embodiment, the first target rotation angle data is converted into pulse quantity and direction signals, and sent to the first rotary motor via the motor drive module. The first rotary motor drives the main control robotic arm to periodically reciprocate around the Z-axis in the horizontal plane according to the received pulse signals. The oscillation pattern follows the temporal characteristics of a sine function, starting from zero degrees, oscillating sequentially to the maximum positive angle, returning to zero degrees, oscillating to the maximum negative angle, and then returning to zero degrees, completing one complete oscillation cycle. It should be noted that the oscillation angle range is determined by the control mode data; the oscillation angle range is smaller in the normal mode and larger in the enhanced mode. Similarly, the MCU simultaneously converts the second target rotation angle data into pulse quantity and direction signals, and sends them to the second rotary motor via the motor drive module. The second rotary motor drives the motion robotic arm to periodically reciprocate around the horizontal Y-axis in the vertical plane according to the received pulse signals. The oscillation pattern follows the temporal characteristics of a cosine function. Since the motion robotic arm is connected to the main control robotic arm via a connecting robotic arm, the oscillation of the motion robotic arm is superimposed on the horizontal oscillation of the main control robotic arm, forming a two-dimensional composite motion.
[0047] In this embodiment, the sinusoidal oscillation in the horizontal plane and the cosine oscillation in the vertical plane have a 90-degree phase difference. Their combined motion causes the trajectory of the flag's end in space to form a conical circular shape. Specifically, when the main control robotic arm is at its maximum horizontal swing angle, the moving robotic arm is precisely at the middle position in the vertical direction; when the main control robotic arm returns to the middle horizontal position, the moving robotic arm reaches its maximum vertical swing angle. This "conical circular swaying" trajectory, generated by the coordinated motion with a specific phase relationship, is a complex visual signal rarely seen in nature. It is highly similar to the action of actively waving a flag, effectively breaking the driver's visual adaptation and improving the capture rate and attention of the warning signal.
[0048] Furthermore, based on the first or second embodiment, a third embodiment of the swing arm control method for road traffic warning of the present invention is proposed. In this embodiment, the more than one rotary motor further includes: a third rotary motor. The step of controlling the more than one rotary motor to operate according to the target turning angle data to make the red flag generate a swaying trajectory further includes: The operation of the third rotating motor is controlled according to the third target rotation angle data of the third rotating motor, so that the red flag rotates continuously around its own axis.
[0049] In this embodiment, the third rotary motor is a small DC geared motor with a reduction ratio of 1:50 and a rated speed of 60 rpm. It is fixedly mounted to the distal end of the robotic arm with screws. The output shaft of the third rotary motor is connected to the gripper via a rotary bearing (using a miniature deep groove ball bearing MR85ZZ). The gripper is a spring-return elastic clamp that firmly holds the carbon fiber flagpole of the red flag. The third target rotation angle data is a uniform speed rotation command. The MCU controls the third rotary motor to drive the red flag to rotate continuously around its own flagpole axis at a constant speed. It should be noted that the red flag's spin motion and the conical surface's circular swaying motion are independent yet synchronous. The spin creates a dynamic flipping effect on the flag surface, further enhancing the red flag's visual prominence. Optionally, the speed of the third rotary motor can be adjusted according to the control mode. The speed is higher in the enhanced mode and lower or paused in the energy-saving mode.
[0050] Furthermore, the step of generating a sine reference signal and a cosine reference signal based on the current control mode data includes: When the current control mode data is normal mode data, determine the normal frequency value and normal swing angle range value of the sine reference signal and the cosine reference signal; In this embodiment, the normal mode is suitable for road warning scenarios under general traffic conditions and normal weather conditions. The normal frequency value is set to 0.5Hz to 1Hz, corresponding to a swing cycle of 30 to 60 times per minute. This frequency range simulates the natural rhythm of manually waving a flag, ensuring both dynamic warning effect and avoiding mechanical wear and energy consumption caused by excessive swinging. The normal swing angle range is set to ±30 degrees in the horizontal direction and ±20 degrees in the vertical direction. This swing range ensures that the flag moves within a reasonable space and will not collide with surrounding objects due to excessive swinging. It should be noted that the normal mode is the system's default operating mode and is automatically activated when there are no special environmental conditions or external commands.
[0051] When the current control mode data is enhanced mode data, the enhanced frequency value and enhanced swing angle range value of the sine reference signal and the cosine reference signal are determined, wherein the enhanced frequency value is greater than the normal frequency value and the enhanced swing angle range value is greater than the normal swing angle range value; In this embodiment, the enhanced mode is suitable for special scenarios requiring high-intensity warnings, such as highways, nighttime, inclement weather, or traffic accident scenes. The enhanced frequency is set to 1.5Hz to 2.5Hz, corresponding to a swing cycle of 90 to 150 times per minute. The faster swing frequency makes the movement of the red flag more conspicuous, quickly attracting the driver's attention. The enhanced swing angle range is set to ±60 degrees horizontally and ±45 degrees vertically. The larger swing amplitude makes the conical circumferential swaying trajectory of the red flag more exaggerated, covering a larger spatial area and improving long-distance visibility. It should be noted that in the enhanced mode, the buzzer simultaneously increases its sound frequency and volume, achieving a synergistic enhancement of visual and auditory warnings.
[0052] When the current control mode data is energy-saving mode data, the energy-saving frequency value and energy-saving swing angle range value of the sine reference signal and the cosine reference signal are determined. The energy-saving frequency value is less than the normal frequency value, and the energy-saving swing angle range value is less than the normal swing angle range value.
[0053] In this embodiment, the energy-saving mode is suitable for scenarios such as low-speed road sections, good daytime weather, or low battery power, to extend the continuous working time of the system. The energy-saving frequency value is set to 0.2Hz to 0.5Hz, corresponding to an oscillation cycle of 12 to 30 times per minute. The lower oscillation frequency significantly reduces the operating power consumption of the motor. The energy-saving swing angle range is set to ±15 degrees in the horizontal direction and ±10 degrees in the vertical direction. The smaller swing amplitude further reduces the drive load of the motor. It should be noted that in energy-saving mode, the third rotary motor can be paused to save energy, and the buzzer will also reduce its volume or sound intermittently. The system uses the TP4056 charging management chip and MT3608 boost regulator circuit to efficiently manage the energy of the 18650 lithium-ion battery, ensuring the longest possible working range in energy-saving mode.
[0054] Furthermore, based on any of the above embodiments, a fourth embodiment of the swing arm control method for road traffic warning of the present invention is proposed. In this embodiment, the step of obtaining the control mode data of the swing arm device at the current moment further includes: Acquire environmental sensing data, including light intensity data, ambient sound data, and weather status data; The target control mode is determined based on the environmental perception data, and the target control mode includes a normal mode, an enhanced mode, or an energy-saving mode. The current control mode data is generated based on the target control mode.
[0055] In this embodiment, environmental perception data is collected by multiple types of sensors deployed on the main control robotic arm of the swing-arm device. Light intensity data is collected by a photosensitive sensor to determine whether the current environment is daytime or nighttime. Ambient sound data is collected by a microphone sensor to assess the noise level of the surrounding environment. Weather status data can be obtained by connecting to an external meteorological data source or by a combination of temperature, humidity, and rain sensors built into the device. It should be noted that the collection cycle of environmental perception data can be set according to actual needs, generally updating every 10 to 30 seconds to balance the response speed to environmental changes and the energy consumption of the sensors. Optionally, weather status data can also be obtained in real time from a cloud-based meteorological service platform via a wireless network interface to improve the accuracy of weather assessment. Determining the target control mode is a decision-making process that integrates the three perception data points: light intensity, ambient noise, and weather status. Specifically, after acquiring the three environmental perception data points, each data point is compared with preset threshold conditions, and the target control mode is determined according to preset decision rules based on the comparison results. It should be noted that the decision rules can be configured according to the actual application scenario. For example, in a rainy nighttime scenario on a highway, even if the light intensity is low but the noise is high and the weather is bad, the system will still determine the enhanced mode to ensure that the warning effect is not weakened by environmental factors.
[0056] Furthermore, the step of determining the target control mode based on the environmental perception data includes: Based on the light intensity data, determine whether the current environment is a daytime or nighttime environment; Determine the current ambient noise level based on the ambient sound data; Based on the weather status data, determine whether the current weather is normal or severe. The target control mode is determined based on the daytime or nighttime environment, the environmental noise level, and the normal or severe weather.
[0057] In this embodiment, weather condition determination can be achieved by integrating data from multiple sensors or external meteorological information. Specifically, when the temperature detected by the temperature and humidity sensor is lower than a preset low-temperature threshold or the humidity is higher than a preset high-humidity threshold, or when the rain sensor detects precipitation, the current weather is determined to be severe weather; otherwise, it is determined to be normal weather. It should be noted that severe weather conditions, such as rain, fog, and strong winds, can reduce the driver's visibility and vehicle braking distance, requiring stronger warning signals to ensure road safety. In severe weather, the system automatically switches to enhanced mode, increasing the oscillation frequency and amplitude, while simultaneously increasing the buzzer volume, to achieve coordinated warning enhancement through multiple sensory channels.
[0058] Furthermore, this invention also proposes a swing arm control system for road traffic warning, applied to a swing arm device. The swing arm device includes: a fixing device, a red flag, multiple rotary motors, and a robotic arm. The fixing device is used to install the swing arm device on an external road barrier. The robotic arm includes a main control robotic arm and a moving robotic arm. One end of the main control robotic arm is fixedly connected to the fixing device, and the moving robotic arm is rotatably connected to the other end of the main control robotic arm. Optionally, refer to... Figure 6 , Figure 6 An execution logic diagram for a swing arm control system for road traffic warning, wherein the red flag is disposed at the end of the moving robotic arm, and the swing arm control system for road traffic warning includes: The acquisition module is used to acquire data on the current control mode. The determining module is used to determine target rotation angle data based on the current control mode data, and the target rotation angle data is used to control the coordinated operation of the multiple rotary motors; The control module is used to control the operation of the multiple rotating motors according to the target rotation angle data, so that the red flag produces a swaying trajectory.
[0059] Furthermore, the swing arm device also includes: a rotary bearing, which is disposed between the main control robotic arm and the moving robotic arm, wherein the outer ring of the rotary bearing is fixedly connected to the main control robotic arm, and the inner ring of the rotary bearing is fixedly connected to the moving robotic arm; The plurality of rotary motors include: a first rotary motor and a second rotary motor. The first rotary motor is mounted on the fixture. The output shaft of the first rotary motor is fixedly connected to the main control robotic arm and is used to drive the main control robotic arm to rotate in the horizontal plane. The second rotary motor is mounted on the main control robotic arm, and the output shaft of the second rotary motor is fixedly connected to the motion robotic arm, for driving the motion robotic arm to swing in a vertical plane around the axis of the rotary bearing.
[0060] Furthermore, this embodiment of the invention also proposes a storage medium storing a swing arm control program for road traffic warning, wherein when the swing arm control program for road traffic warning is executed by a processor, it implements the steps of the embodiment of the swing arm control method for road traffic warning described above.
[0061] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0062] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0063] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0064] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for controlling a swing arm for road traffic warning, characterized in that, An intelligent swing arm control method for road traffic warning is applied to a swing arm device, which includes: a fixing device, a red flag, more than one rotary motor, and a robotic arm. The fixing device is used to install the swing arm device on an external road barrier. The robotic arm is connected to the fixing device, and the red flag is located at the end of the robotic arm. The method includes the following steps: Obtain the control mode data of the swing arm device at the current moment; The target rotation angle data is determined based on the control mode data, and the target rotation angle data is used to control the more than one rotary motor to operate in coordination. Control the operation of more than one rotary motor according to the target rotation angle data to make the red flag sway.
2. The swing arm control method for road traffic warning as described in claim 1, characterized in that, The more than one rotary motor includes: a first rotary motor and a second rotary motor, and the step of determining the target rotation angle data based on the current control mode data includes: Generate a sine reference signal and a cosine reference signal based on the current control mode data; The first target rotation angle data of the first rotary motor is determined based on the sinusoidal reference signal; The second target rotation angle data of the second rotary motor is determined based on the cosine reference signal; The sine reference signal and the cosine reference signal have the same frequency and a phase difference of 90 degrees.
3. The swing arm control method for road traffic warning as described in claim 2, characterized in that, The step of controlling the operation of the corresponding motor based on the first target angle data and the second target angle data to make the red flag generate a swaying trajectory includes: Based on the first target rotation angle data, the first rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the horizontal plane; Based on the second target rotation angle data, the second rotary motor is controlled to drive the corresponding robotic arm to perform periodic reciprocating swings in the vertical plane; The combined effect of the periodic reciprocating oscillation in the horizontal plane and the periodic reciprocating oscillation in the vertical plane causes the end of the red flag to generate a conical circumferential swaying trajectory.
4. The swing arm control method for road traffic warning as described in claim 2, characterized in that, The more than one rotating motor further includes: a third rotating motor, and the step of controlling the more than one rotating motor to operate according to the target rotation angle data to make the red flag produce a swaying trajectory further includes: The operation of the third rotating motor is controlled according to the third target rotation angle data of the third rotating motor, so that the red flag rotates continuously around its own axis.
5. The swing arm control method for road traffic warning as described in claim 2, characterized in that, The step of generating sine reference signals and cosine reference signals based on the current control mode data includes: When the current control mode data is normal mode data, determine the normal frequency value and normal swing angle range value of the sine reference signal and the cosine reference signal; When the current control mode data is enhanced mode data, the enhanced frequency value and enhanced swing angle range value of the sine reference signal and the cosine reference signal are determined, wherein the enhanced frequency value is greater than the normal frequency value and the enhanced swing angle range value is greater than the normal swing angle range value; When the current control mode data is energy-saving mode data, the energy-saving frequency value and energy-saving swing angle range value of the sine reference signal and the cosine reference signal are determined. The energy-saving frequency value is less than the normal frequency value, and the energy-saving swing angle range value is less than the normal swing angle range value.
6. The swing arm control method for road traffic warning as described in any one of claims 1 to 5, characterized in that, Before the step of obtaining the control mode data of the swing arm device at the current moment, the method further includes: Acquire environmental sensing data, including light intensity data, ambient sound data, and weather status data; The target control mode is determined based on the environmental perception data, and the target control mode includes a normal mode, an enhanced mode, or an energy-saving mode. The current control mode data is generated based on the target control mode.
7. The swing arm control method for road traffic warning as described in claim 6, characterized in that, The step of determining the target control mode based on the environmental perception data includes: Based on the light intensity data, determine whether the current environment is a daytime or nighttime environment; Determine the current ambient noise level based on the ambient sound data; Based on the weather status data, determine whether the current weather is normal or severe. The target control mode is determined based on the daytime or nighttime environment, the environmental noise level, and the normal or severe weather.
8. A swing arm control system for road traffic warning, characterized in that, An application is made to a swing-arm device, which includes: a fixing device, a red flag, multiple rotary motors, and a robotic arm. The fixing device is used to install the swing-arm device on an external road barrier. The robotic arm includes a main control robotic arm and a moving robotic arm. One end of the main control robotic arm is fixedly connected to the fixing device, and the moving robotic arm is rotatably connected to the other end of the main control robotic arm. The red flag is located at the end of the moving robotic arm. The swing-arm control system for road traffic warning includes: The acquisition module is used to acquire data on the current control mode. The determining module is used to determine target rotation angle data based on the current control mode data, and the target rotation angle data is used to control the coordinated operation of the multiple rotary motors; The control module is used to control the operation of the multiple rotating motors according to the target rotation angle data, so that the red flag produces a swaying trajectory.
9. The swing arm control system for road traffic warning as described in claim 8, characterized in that, The swing arm device further includes: a rotary bearing, which is disposed between the main control robotic arm and the moving robotic arm, wherein the outer ring of the rotary bearing is fixedly connected to the main control robotic arm and the inner ring of the rotary bearing is fixedly connected to the moving robotic arm; The plurality of rotary motors include: a first rotary motor and a second rotary motor. The first rotary motor is mounted on the fixture. The output shaft of the first rotary motor is fixedly connected to the main control robotic arm and is used to drive the main control robotic arm to rotate in the horizontal plane. The second rotary motor is mounted on the main control robotic arm, and the output shaft of the second rotary motor is fixedly connected to the motion robotic arm, for driving the motion robotic arm to swing in a vertical plane around the axis of the rotary bearing.
10. A storage medium, characterized in that, The storage medium stores a swing arm control program for road traffic warning, which, when executed by a processor, implements the steps of the swing arm control method for road traffic warning as described in any one of claims 1 to 7.