Neurobehavioral evaluation system for studying small animal perception and coping
By designing a neurobehavioral assessment system, using magnetic connections and servo motor control to simulate predators and prey, and combining OpenCV algorithms to identify and track animal behavior, the system solves the problem that existing platforms cannot simulate the predation and defense behaviors of small animals, and achieves controllable repeatability and data accuracy in experiments.
Patent Information
- Application Number
- CN202310117339.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Existing neurobehavioral experimental platforms cannot effectively simulate and evaluate the predation and defense behaviors of small animals in a laboratory environment, resulting in uncontrollable experimental conditions, poor repeatability, and difficulties in data collection.
A neurobehavioral assessment system was designed, including a load-bearing table frame, a slide rail module, a servo motor assembly, a slide rail platform, a small animal activity chamber, a role simulation module, and a data analysis and control module. The system simulates predators and prey by connecting them with magnets, and uses cameras and OpenCV algorithms to identify and track animal behavior in real time, controlling the servo motors to simulate predation or escape behaviors.
It enables controlled and repeatable simulation of predation and defense behaviors in small animals in a laboratory environment, improves data accuracy and processing speed, reduces costs, and provides important support for behavioral pattern analysis.
Smart Images

Figure CN116211288B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of neurobehavioral experimental technology, specifically relating to a neurobehavioral assessment system for studying perception and response in small animals. Background Technology
[0002] Animal behavior science primarily focuses on the scientific and objective study of animal behavior in its natural state, including communication, emotional expression, learning, social behavior, and reproductive behavior. Neurobehavioral science, building upon animal behavior science, goes further to understand the underlying neural mechanisms, structural and functional differences in animal behavior. Currently, the most mature neurobehavioral experimental platforms include the open field test, the Morris water maze test, the Barnes maze, and the elevated cross maze. These platforms are mainly used to test animal emotional expression and social behavior.
[0003] However, for animals, survival is always the top priority, and predation and defense behaviors are precisely the two most important behaviors in the process of animal survival. They are both mature instinctive behaviors with specific action sequences that can be easily reproduced in a laboratory environment. Moreover, these behaviors are very typical under the same conditions, but very flexible in treatment or alternative stimuli. This makes them very suitable for solving the fundamental question of how neuronal activity drives complex behaviors, or more specifically, the scientific question of how neurons are active in the process of perception and response.
[0004] In the current research context, there is no unified research platform to evaluate predation and defense behaviors, and experiments under existing conditions have the following shortcomings: especially predation behavior, most experiments use natural prey to test predation, but this leads to problems such as uncontrollable conditions, inconvenience in repeating experiments, difficulty in data collection, and relatively large random errors in repeated experiments.
[0005] Therefore, it is necessary to develop a new neurobehavioral assessment system for studying perception and coping in small animals. Summary of the Invention
[0006] The purpose of this invention is to provide a neurobehavioral assessment system for studying the perception and response of small animals, in order to solve the problems mentioned in the background art that can simulate various social behaviors of animals in the natural environment, such as predation or defense behavior, as much as possible in a laboratory environment, and that the uncontrollability caused by natural social roles, as well as the inability to replicate experimental procedures and results.
[0007] The present invention discloses a neurobehavioral assessment system for studying perception and coping in small animals, comprising:
[0008] Load-bearing table frame;
[0009] The slide rail module is mounted on a load-bearing table frame and includes a first slide rail, a second slide rail and a third slide rail. The second slide rail and the third slide rail are arranged parallel to each other and are connected by a linkage rod. The two ends of the first slide rail are respectively fixed on the second slide rail and the third slide rail.
[0010] A servo motor assembly includes a first servo motor and a second servo motor. The output shaft of the first servo motor is connected to a first slide rail and is used to drive the first slide rail to run. The output shaft of the second servo motor is connected to a second slide rail and a third slide rail via a linkage rod and is used to drive the second slide rail and the third slide rail to move.
[0011] A slide rail stage is mounted on a first slide rail. Driven by a first servo motor, the slide rail stage can move along the first slide rail. Driven by a second servo motor, the first slide rail can move along the second and third slide rails.
[0012] The support frame spans across the load-bearing table frame without contacting it.
[0013] Small animal activity enclosures are mounted on a support frame;
[0014] The role simulation module is used to simulate predators and prey. It includes a first magnet and a second magnet. The first magnet is placed on the slide rail platform, and the second magnet is placed on the bottom plate of the small animal activity chamber. The second magnet is connected to the first magnet by magnetic force. When the first magnet moves, it can drive the second magnet to move synchronously.
[0015] A camera is installed above the small animal activity enclosure to record the scene inside the enclosure.
[0016] The data analysis and control module is connected to the servo motor group and the camera respectively. It is used to process the scene images recorded by the camera, identify the distance between the small animal and the character simulation module, and control the character simulation module to simulate predator or prey. At the same time, it records the motion parameters of the small animal and the character simulation module.
[0017] Optionally, the data analysis and control module uses OpenCV to receive images from the camera frame by frame, and calls a function to process each received frame, specifically:
[0018] The image undergoes a color model conversion, specifically from RGB to HSV color gamut.
[0019] Based on the color range of the detected target object in the HSV color gamut, a mask for the target object's color is obtained, wherein the target object includes small animals and social roles simulated by the role simulation module;
[0020] Median filtering is applied to the mask image of the target object's color to obtain a target object mask image with clearer contour boundaries;
[0021] The contour detection function is executed using OpenCV to obtain the contour of the target object, find the smallest rectangle to enclose the contour of the target object, and return the coordinate information of the four corners of the rectangle. The centroid coordinates of the target object are then calculated.
[0022] Each frame of image can simultaneously acquire the centroid coordinates of multiple targets, and the distance information between the targets can be obtained by calculation.
[0023] By processing each frame of the image, a continuous coordinate information is obtained, and the motion trajectory of the target object is displayed.
[0024] The processing time for each frame is obtained based on the camera's frame rate. The instantaneous velocity of the target object between two adjacent frames is calculated based on the distance the target object moves in each frame. The total distance the target object moves between each two frames is summed to obtain the total distance the target object moves.
[0025] Optionally, the motion parameters of the animal and character simulation module include:
[0026] Animal outline and center of gravity coordinates, character simulation module outline and center of gravity coordinates, animal movement trajectory, character simulation module movement trajectory, animal real-time movement speed, character simulation module real-time movement speed, actual distance between animal and character simulation module, total distance moved by animal, total distance moved by character simulation module.
[0027] Optionally, the control role simulation module simulates a predator, specifically as follows:
[0028] Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated. When the distance between the animal and the social role is greater than a first preset distance, it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance and a first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role is controlled to hunt the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the social role has captured the animal, and the social role is kept still and a harm stimulus is given to the animal. The first preset distance is greater than the second preset distance.
[0029] Optionally, the control of social roles in hunting small animals specifically includes:
[0030] The bottom of the small animal activity enclosure is divided into 9 areas: upper left, upper, upper right, right, lower right, lower, lower left, left, and the middle area.
[0031] A rectangular coordinate system is established based on the coordinates of the social role. The quadrant of the rectangular coordinate system with the social role as the origin is determined. Based on the orientation of the quadrant where the small animal is located, the servo motor is controlled to move along the diagonal of that quadrant at a preset speed to simulate the social role chasing the small animal.
[0032] Optionally, the control role simulation module simulates a prey, specifically:
[0033] Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated. When the distance between the animal and the social role is greater than a first preset distance, it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance and a first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role needs to be controlled to escape from the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the animal has captured the social role, the social role is kept still, and the animal is given a food reward. The first preset distance is greater than the second preset distance.
[0034] Optionally, social roles can be controlled to avoid small animals, specifically:
[0035] The bottom of the small animal activity enclosure is divided into 9 areas: upper left, upper, upper right, right, lower right, lower, lower left, left, and the middle area.
[0036] When the social character simulated by the character simulation module is in the middle area, a rectangular coordinate system is established with the social character as the origin to determine which quadrant the small animal is in. Based on the quadrant in which the small animal is located, the servo motor group is controlled to work, so that the social character moves along the diagonal of the opposite quadrant at a preset speed to simulate the escape from the small animal.
[0037] When the social character simulated by the character simulation module is in the upper area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal.
[0038] When the social character simulated by the character simulation module is in the right area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal.
[0039] When the social character simulated by the character simulation module is in the lower area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed, simulating the escape from the small animal.
[0040] When the social character simulated by the character simulation module is in the left area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed, simulating the escape from the small animal.
[0041] When the social character simulated by the character simulation module is in the upper left area, the upper left vertex is used as the angle bisector. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal.
[0042] When the social character simulated by the character simulation module is in the upper right area, the angle bisector is drawn from the upper left and right vertices. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal.
[0043] When the social character simulated by the character simulation module is in the lower right region, the lower right vertex is used as the angle bisector. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal.
[0044] When the social character simulated by the character simulation module is in the lower left area, the angle bisector is drawn from the lower left vertex. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal.
[0045] Optionally, the data analysis and control module includes a computer, a regulated power supply, an STM32 microcontroller, an external circuit board, and a servo motor controller.
[0046] The regulated power supply is connected to the servo motor controller;
[0047] The computer communicates with the STM32 microcontroller via serial port. The STM32 microcontroller is connected to an external circuit board, which is connected to a servo motor controller.
[0048] The computer transmits the rotation direction and speed signals of the first and second servo motors to the STM32 microcontroller via a serial port. After decoding, the STM32 microcontroller converts the digital signal of rotation direction into a high-low level signal and the speed signal into a PWM wave signal.
[0049] The external circuit board is used to amplify the analog signals output by the STM32 microcontroller.
[0050] The servo motor controller controls the rotation direction and speed of the first and second servo motors based on high and low level signals and PWM wave signals.
[0051] Optionally, the external circuit board includes two amplifier circuits, each consisting of a 1 kΩ resistor and a 2N2222 through-hole NPN transistor.
[0052] Optionally, it also includes a camera bracket that spans the support frame and does not contact the support frame or the load-bearing table frame, wherein the camera is mounted on the camera bracket.
[0053] The present invention has the following advantages:
[0054] (1) This invention can identify targets in real time and obtain relevant motion parameters, providing data interpretation support for perception and response behavior. Secondly, the behavioral interaction algorithm provides two important behavioral patterns that are closely related to animal survival: predation and defense. Compared with other existing behavioral assessment experimental platforms, its advantages are that it provides two novel and important behavioral patterns for research and analysis, has a faster processing speed and higher accuracy. Compared with the natural state, controllable artificial interactive objects can make the experiment repeat a large number of times to induce relevant behavioral responses in small animals, the data is more convincing, and the cost is lower.
[0055] (2) This invention can remotely control the movement of the second magnet on the small animal activity chamber, simulating the social role of the small animal relatively undisturbed, reducing the impact of the experimental device itself on the small animal. Secondly, the social role simulated by the second magnet can completely controllably repeat certain behaviors to induce relevant behavioral patterns of perception and response in the small animal, satisfying the repeatability of the experiment and improving the accuracy of the data. Moreover, compared with other robots that artificially simulate the social role of small animals, the second magnet (simulating the social role) of the small animal activity chamber can be changed in size or shape at any time according to the actual experimental needs, making it more universal.
[0056] (3) The present invention can ensure that there is no interference between the slide rail module, the small animal activity chamber and the camera, avoid the interference of vibration on the experiment, and improve the accuracy of data. Attached Figure Description
[0057] Figure 1 This is a front view structural diagram of the present invention;
[0058] Figure 2 This is a three-dimensional structural diagram of the present invention;
[0059] Figure 3 This is a structural schematic diagram of the load-bearing table frame and slide rail module in this invention;
[0060] Figure 4 This is a schematic diagram of the data analysis and control module in this invention;
[0061] Figure 5 This is a flowchart of the software processing in this invention;
[0062] Figure 6 This is a block diagram of the data analysis and control module in this invention (excluding the computer terminal);
[0063] In the diagram: 1. Load-bearing table frame, 101-rubber, 102-tabletop, 2. Aluminum frame, 3. First screw, 4. Table corner, 401-rubber table pad, 5. Screw hole, 6. Concave steel plate, 7. Linkage rod, 8. Slide rail module, 801-first slide rail, 802-second slide rail, 803-third slide rail, 9-convex steel plate, 10. Loading platform, 11. Slide rail loading platform, 12. Second servo motor, 13. Slot, 14. Second screw, 15. 16. First servo motor, 17. First magnet, 18. Support frame, 19. Aluminum strip, 20. Small animal activity compartment, 21. Cross slot, 22. Second magnet, 23. Camera bracket, 24. Top crossbar, 25. Camera support clip, 26. Camera, 27. Regulated power supply, 28. STM32 microcontroller, 29. External circuit board, 20. 1000 ohm resistor, 20. 21. Through-hole NPN transistor, 22. Servo motor controller. Detailed Implementation
[0064] The present invention will now be described in detail with reference to the accompanying drawings.
[0065] like Figure 1 As shown in this embodiment, a neurobehavioral assessment system for studying small animal perception and response includes a load-bearing table frame 1, a slide rail module 8, a servo motor assembly, a slide rail platform 11, a support frame 17, a small animal activity chamber 19, a role simulation module, a camera bracket 22, a camera 25, and a data analysis and control module.
[0066] In this embodiment, the load-bearing table frame 1 includes a tabletop 102 and rubber 101 mounted on the tabletop 102. An aluminum frame 2 is located below the load-bearing table frame 1. The aluminum frame 2 uses an embedded snap-fit structure and is fixed by a first screw 3. The four table corners 4 at the bottom of the aluminum frame 2 are equipped with height-adjustable rubber table pads 401. The rubber table pads 401 serve two purposes: adjusting the level and providing anti-slip and shock absorption. The tabletop 102 is fixed to the aluminum frame 2 with self-tapping screws, and a layer of rubber 101 is attached to its surface to increase friction and provide shock absorption. Four through-hole screw holes 5 are drilled in the tabletop for fixing the slide rail module 8.
[0067] In this embodiment, the slide rail module 8 is mounted on the load-bearing table frame 1. The slide rail module 8 includes a first slide rail 801, a second slide rail 802, and a third slide rail 803. The second slide rail 802 and the third slide rail 803 are arranged parallel to each other and spaced apart. The second slide rail 802 and the third slide rail 803 are fixed to the tabletop 102 by a concave steel plate 6, and the second slide rail 802 and the third slide rail 803 are connected by a linkage rod 7 to form a longitudinal movement. The two ends of the first slide rail 801 are respectively fixed to the loading platforms 10 of the second slide rail 802 and the third slide rail 803 by convex steel plates 9, forming an overall "I" shape, so that the slide rail loading platform 11 mounted on the first slide rail 801 can move across the entire plane.
[0068] In this embodiment, the servo motor assembly includes a first servo motor 15 and a second servo motor 12. The first servo motor 15 is fixed to one end of the first slide rail 801 via a slot 13 and a second screw 14, and the output shaft of the first servo motor 15 is connected to the first slide rail 801 for independently driving the first slide rail 801 to move laterally, thereby driving the slide rail platform 11. The second servo motor 12 is fixed to one side of the third slide rail 803 via a slot 13 and a second screw 14, and the output shaft of the second servo motor 12 is connected to the second slide rail 802 and the third slide rail 803 via a linkage rod 7 for driving the second slide rail 802 and the third slide rail 803 to move.
[0069] In this embodiment, the support frame 17 is constructed by fixing aluminum strips 18 and T-shaped screws, spanning the entire load-bearing table frame 1 without contact, thus avoiding vibration interference from the slide rail module.
[0070] In this embodiment, the small animal activity enclosure 19 is mounted on the support frame 17. It is used for behavioral testing of small animals' perception and responses. The small animal activity enclosure 19 is constructed from five acrylic panels. One acrylic panel, after being covered with wallpaper, is placed directly on the support frame 17. The other four acrylic panels are joined together via cross-shaped slots 20 and stand around a square base plate, forming an activity area for the small animal. The wallpaper is used to facilitate the cleaning of small animal excrement.
[0071] In this embodiment, the role simulation module is used to simulate predator and prey. It includes a first magnet 16 and a second magnet 21. The first magnet 16 is placed on the slide rail platform 11, and the second magnet 21 is placed on the bottom plate of the small animal activity chamber 19. The second magnet 21 is connected to the first magnet 16 by magnetic force. When the first magnet 16 moves, it can drive the second magnet 21 to move synchronously. The second magnet 21 is used to simulate social roles.
[0072] In this embodiment, the camera bracket 22 spans the entire support frame 17 without contacting the support frame 17 or the load-bearing table frame 1. The camera support clip 24 is fixed to a suitable position on its top crossbar 23 using a slotted knob, and the height of the camera bracket 22 is adjusted so that the small animal activity chamber 19 below is centered in the field of view of the camera 25. The camera 25 is fixed to the camera support clip 24 with screws and connected to a computer via a USB cable. It records the scene inside the small animal activity chamber 19 and synchronizes the scene to the computer in real time, achieving closed-loop control.
[0073] In this embodiment, the data analysis and control module is connected to the servo motor group and the camera 25 respectively. It is used to process the scene image recorded by the camera 25, identify the distance between the small animal and the role simulation module, and control the role simulation module to simulate the predator and the prey. At the same time, it records the motion parameters of the small animal and the role simulation module.
[0074] In this embodiment, the data analysis and control module uses OpenCV to receive images from camera 25 frame by frame. Each received frame is processed by calling a function, specifically:
[0075] The system receives real-time synchronized video feeds from camera 25 and processes the video stream frame by frame using OpenCV (A1). First, it converts the color model of the image from RGB to HSV color gamut (A2). Then, based on the color range of the detected target object (i.e., small animals and social characters) within the HSV color gamut, it obtains a color mask for the target object (A3). Next, it applies median filtering (A4) to the target object color mask image to obtain a target object mask image with clearer contour boundaries. Finally, it executes a contour detection function using OpenCV to obtain the contour of the target object and finds a minimum rectangle (without rotation) to enclose the target object's contour (A5), returning the coordinates of the four corners of this rectangle. The centroid coordinates of the target object can then be calculated (A6). Multiple centroid coordinates of targets can be obtained simultaneously in each frame, and the distance information between targets can be obtained through mathematical calculations. Processing each frame in the above manner yields a continuous set of coordinate information, which is displayed on the screen as the movement trajectory of the target object. Based on the frame rate of camera 25, the processing time for each frame can be obtained. Based on the distance the target object moves in two adjacent frames, the instantaneous velocity of the target object between each two frames can be calculated. Summing the distances the target object moves between each two frames yields the total distance A7. The distances in the above processing steps refer to the distances between pixels in the image. By measuring the actual object, the conversion relationship between pixel distances and actual distances can be obtained, thus yielding the actual distance and actual velocity.
[0076] In this embodiment, the motion parameters of the small animal and character simulation module include:
[0077] Animal outline and center of gravity coordinates, character simulation module outline and center of gravity coordinates, animal movement trajectory, character simulation module movement trajectory, animal real-time movement speed, character simulation module real-time movement speed, actual distance between animal and character simulation module, total distance moved by animal, total distance moved by character simulation module.
[0078] After obtaining the coordinates of the target, the behavioral interaction algorithm A8 is activated, which includes a control role simulation module to simulate predators and social control roles hunting small animals.
[0079] In this embodiment, the control role simulation module simulates a predator, specifically as follows:
[0080] Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated, i.e., the real-time distance change. When the distance between the animal and the social role is greater than a first preset distance (e.g., 30cm, which can be adjusted according to specific experimental needs), it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance (e.g., 10cm, which can be adjusted according to specific experimental needs) and the first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role is controlled to hunt the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the social role has captured the animal, the social role is kept still, and a harm stimulus is given to the animal, where the first preset distance is greater than the second preset distance.
[0081] In this embodiment, controlling the social role to hunt small animals specifically means:
[0082] The bottom surface of the small animal activity chamber 19 is divided into 9 areas: upper left, upper top, upper right, right, lower right, lower bottom, lower left, left, and center. A Cartesian coordinate system is established with the coordinates of the social role as the origin. The quadrant of the Cartesian coordinate system with the social role as the origin is determined. Based on the quadrant position of the small animal, the servo motor is controlled to move along the diagonal of that quadrant at a preset speed to simulate the social role chasing the small animal.
[0083] In this embodiment, the control role simulation module simulates the prey, specifically as follows:
[0084] Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated. When the distance between the animal and the social role is greater than a first preset distance, it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance and a first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role needs to be controlled to escape from the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the animal has captured the social role, the social role is kept still, and the animal is given a food reward. The first preset distance is greater than the second preset distance.
[0085] In this embodiment, controlling the social role to avoid the small animal is specifically as follows:
[0086] The bottom surface of the small animal activity chamber 19 is divided into 9 areas: upper left, upper, upper right, right, lower right, lower, lower left, left, and middle area.
[0087] When the social character simulated by the character simulation module is in the middle area, a rectangular coordinate system is established with the social character as the origin to determine which quadrant the small animal is in. Based on the quadrant in which the small animal is located, the servo motor group is controlled to work, so that the social character moves along the diagonal of the opposite quadrant at a preset speed to simulate the escape from the small animal.
[0088] When the social character simulated by the character simulation module is in the upper area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal.
[0089] When the social character simulated by the character simulation module is in the right area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal.
[0090] When the social character simulated by the character simulation module is in the lower area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed, simulating the escape from the small animal.
[0091] When the social character simulated by the character simulation module is in the left area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed, simulating the escape from the small animal.
[0092] When the social character simulated by the character simulation module is in the upper left area, the upper left vertex is used as the angle bisector. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal.
[0093] When the social character simulated by the character simulation module is in the upper right area, the angle bisector is drawn from the upper left and right vertices. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal.
[0094] When the social character simulated by the character simulation module is in the lower right region, the lower right vertex is used as the angle bisector. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal.
[0095] When the social character simulated by the character simulation module is in the lower left area, the angle bisector is drawn from the lower left vertex. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal.
[0096] In this embodiment, the data analysis and control module includes a computer, a regulated power supply 26, an STM32 microcontroller 27, an external circuit board 28, and a servo motor controller 29; the regulated power supply 26 is connected to the servo motor controller 29; the computer communicates with the STM32 microcontroller 27 via serial port, the STM32 microcontroller 27 is connected to the external circuit board 28, and the external circuit board 28 is connected to the servo motor controller 29.
[0097] After the behavioral interaction algorithm A8 finishes its judgment, the computer generates the direction and speed signals required to control the servo motor group and sends them to the STM32 microcontroller 27 via serial port. The STM32 microcontroller 27 decodes the direction and speed signals through the USART communication protocol and converts the direction signals into high and low level signals, and converts the speed signals into PWM waves of a specific frequency. Then, through the external circuit board 28 and the regulated power supply 26, the direction and speed signals are amplified and transmitted to the servo motor controller 29. The servo motor controller 29 then controls the first servo motor 15 and the second servo motor 12 to drive the slide rail platform 11 to move on the plane. The first magnet 16 on the slide rail platform 11 attracts the second magnetic block 21 (simulating a social role) to move synchronously, realizing the interaction A9 with the small animal's attack or defense, forming a closed-loop control system.
[0098] In this embodiment, the servo motor controller 29 adopts a speed mode control method, which requires a specific amplifier circuit to recognize the analog signals of the STM32 microcontroller 27.
[0099] In this embodiment, the external circuit board 28 includes two amplifier circuits, each of which consists of a 1 kΩ resistor 2801 and a 2N2222 through-hole NPN transistor 2802.
[0100] In this embodiment, the USART communication protocol can provide multiple baud rates, making it more widely used, and can achieve high-speed data communication, reducing system latency; speed mode control can provide more flexible control over the movement of the servo motor.
[0101] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A neurobehavioral assessment platform for studying perception and response in small animals, characterized in that, include: Load-bearing table frame (1); The slide rail module (8) is set on the load-bearing table frame (1) and includes a first slide rail (801), a second slide rail (802) and a third slide rail (803). The second slide rail (802) and the third slide rail (803) are arranged parallel to each other and are connected by a linkage rod (7). The two ends of the first slide rail (801) are respectively fixed on the second slide rail (802) and the third slide rail (803). The servo motor assembly includes a first servo motor (15) and a second servo motor (12). The output shaft of the first servo motor (15) is connected to the first slide rail (801) and is used to drive the first slide rail (801) to run. The output shaft of the second servo motor (12) is connected to the second slide rail (802) and the third slide rail (803) through the linkage rod (7) and is used to drive the second slide rail (802) and the third slide rail (803) to move. The slide rail stage (11) is mounted on the first slide rail (801). Driven by the first servo motor (15), the slide rail stage (11) can move along the first slide rail (801). Driven by the second servo motor (12), the first slide rail (801) can move along the second slide rail (802) and the third slide rail (803). The support frame (17) spans across the load-bearing table frame (1) and has no contact with the load-bearing table frame (1); Small animal activity enclosure (19), which is set on support frame (17); The role simulation module is used to simulate predators and prey. It includes a first magnet (16) and a second magnet (21). The first magnet (16) is placed on the slide rail platform (11), and the second magnet (21) is placed on the bottom plate of the small animal activity chamber (19). The second magnet (21) is connected to the first magnet (16) by magnetic force. When the first magnet (16) moves, it can drive the second magnet (21) to move synchronously. A camera (25) is set above the small animal activity chamber (19) to record the scene inside the small animal activity chamber (19); The data analysis and control module is connected to the servo motor group and the camera (25) respectively. It is used to process the scene recorded by the camera (25), identify the distance between the small animal and the role simulation module, and control the role simulation module to simulate the predator and the prey. At the same time, it records the motion parameters of the small animal and the role simulation module.
2. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 1, characterized in that: The data analysis and control module uses OpenCV to receive images from the camera (25) frame by frame. Each received frame is processed by calling a function, specifically: The image undergoes a color model conversion, specifically from RGB to HSV color gamut. Based on the color range of the detected target object in the HSV color gamut, a mask for the target object's color is obtained, wherein the target object includes small animals and social roles simulated by the role simulation module; Median filtering is applied to the mask image of the target object's color to obtain a target object mask image with clearer contour boundaries; The contour detection function is executed using OpenCV to obtain the contour of the target object, find the smallest rectangle to enclose the contour of the target object, and return the coordinate information of the four corners of the rectangle. The centroid coordinates of the target object are then calculated. Each frame of image can simultaneously acquire the centroid coordinates of multiple targets, and the distance information between the targets can be obtained by calculation. By processing each frame of the image, a continuous coordinate information is obtained, and the motion trajectory of the target object is displayed. The processing time of each frame is obtained based on the frame rate of the camera (25). The instantaneous velocity of the target between two frames is calculated based on the distance the target moves in two adjacent frames. The total distance the target moves is obtained by summing the distances between two frames.
3. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 2, characterized in that: The motion parameters of the animal and character simulation module include: Animal outline and center of gravity coordinates, character simulation module outline and center of gravity coordinates, animal movement trajectory, character simulation module movement trajectory, animal real-time movement speed, character simulation module real-time movement speed, actual distance between animal and character simulation module, total distance moved by animal, total distance moved by character simulation module.
4. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 3, characterized in that: The control role simulation module simulates a predator, specifically as follows: Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated. When the distance between the animal and the social role is greater than a first preset distance, it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance and a first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role is controlled to hunt the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the social role has captured the animal, and the social role is kept still and a harm stimulus is given to the animal. Here, the first preset distance is greater than the second preset distance.
5. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 4, characterized in that: The control of social roles in hunting small animals specifically refers to: The bottom of the small animal activity chamber (19) is divided into 9 areas, namely the upper left, upper, upper right, right, lower right, lower, lower left, left and middle areas; A rectangular coordinate system is established with the coordinates of the social role as the origin. The quadrant of the rectangular coordinate system with the social role as the origin is determined. Based on the orientation of the quadrant where the small animal is located, the servo motor is controlled to move along the diagonal of that quadrant at a preset speed to simulate the social role chasing the small animal.
6. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 5, characterized in that: The control role simulation module simulates the prey, specifically as follows: Based on the coordinate information of the social role simulated by the animal and role simulation module, the distance between the animal and the social role in each frame is calculated. When the distance between the animal and the social role is greater than a first preset distance, it is considered that the animal and the social role are at a safe distance, and the social role is kept still, indicating that no animal has been detected. When the distance between the animal and the social role is between a second preset distance and a first preset distance, it is considered that the animal has entered the warning range of the social role, and the social role needs to be controlled to escape from the animal. When the distance between the animal and the social role is less than the second preset distance, it is considered that the animal has captured the social role, the social role is kept still, and the animal is given a food reward. The first preset distance is greater than the second preset distance.
7. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 6, characterized in that: Controlling social roles to avoid small animals, specifically: The bottom of the small animal activity chamber (19) is divided into 9 areas, namely the upper left, upper, upper right, right, lower right, lower, lower left, left and middle areas; When the social character simulated by the character simulation module is in the middle area, a rectangular coordinate system is established with the social character as the origin to determine which quadrant the small animal is in. Based on the quadrant in which the small animal is located, the servo motor group is controlled to work, so that the social character moves along the diagonal of the opposite quadrant at a preset speed to simulate the escape from the small animal. When the social character simulated by the character simulation module is in the upper area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the right area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the third quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the third quadrant at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the lower area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the second quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the second quadrant at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the left area, a rectangular coordinate system is established with the social character as the origin. If the small animal is in the first quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the fourth quadrant at a preset speed. If the small animal is in the fourth quadrant, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves along the diagonal of the first quadrant at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the upper left area, the upper left vertex is used as the angle bisector. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the upper right area, the angle bisector is drawn from the upper left and right vertices. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically downward at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the lower right region, the lower right vertex is used as the angle bisector. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the left at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal. When the social character simulated by the character simulation module is in the lower left area, the angle bisector is drawn from the lower left vertex. When the small animal is above the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves horizontally to the right at a preset speed. When the small animal is below the angle bisector, the servo motor group is controlled according to the quadrant in which the small animal is located, so that the social character moves vertically upward at a preset speed, simulating the escape from the small animal.
8. The neurobehavioral assessment platform for studying perception and response in small animals according to any one of claims 1 to 7, characterized in that: The data analysis and control module includes a computer, a regulated power supply (26), an STM32 microcontroller (27), an external circuit board (28), and a servo motor controller (29). The regulated power supply (26) is connected to the servo motor controller (29); The computer communicates with the STM32 microcontroller (27) via serial port. The STM32 microcontroller (27) is connected to an external circuit board (28), and the external circuit board (28) is connected to a servo motor controller (29). The computer transmits the rotation direction and speed signals of the first servo motor (15) and the second servo motor (12) to the STM32 microcontroller (27) via serial port. After decoding, the STM32 microcontroller (27) converts the digital signal of rotation direction into a high-low level signal and the speed signal into a PWM wave signal. The external circuit board (28) is used to amplify the analog signal output by the STM32 microcontroller (27); The servo motor controller (29) controls the rotation direction and speed of the first servo motor (15) and the second servo motor (12) based on high and low level signals and PWM wave signals.
9. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 8, characterized in that: The external circuit board (28) includes two amplifier circuits, each consisting of a 1 kΩ resistor and a 2N2222 through-hole NPN transistor.
10. The neurobehavioral assessment platform for studying perception and response in small animals according to claim 9, characterized in that: It also includes a camera bracket (22) that spans the support frame (17) and does not contact the support frame (17) and the load-bearing table frame (1), and the camera (25) is mounted on the camera bracket (22).
Citation Information
Patent Citations
Aquatic animal water surface predation ripple characteristic monitoring method and device thereof
CN111156968A
System For 3D Monitoring And Analysis Of Motion Behavior Of Targets
US20080152192A1