Share this

Research and Design of Robot Vision Servo Controller Based on Nios II

2026-04-06 04:52:03 · · #1
Introduction Altera's Nios II processor is a soft-core processor for programmable logic devices. The Nios II soft-core processor, along with peripherals such as memory and I/O interfaces, can be embedded into an FPGA to form a single-chip programmable system (SOPC), significantly reducing system cost, size, and power consumption. It is suitable for various embedded applications in networking, telecommunications, data communication, embedded systems, and consumer markets. This paper proposes a system based on the Nios II processor architecture for real-time motion detection and tracking of robots. A linear Kalman filter algorithm is used to quickly complete motion estimation and further analysis and correction. The multiplication and division operations in the algorithm utilize modules generated by MATLAB/DSP Builder as custom instructions for the Nios II processor. Research and Design of Robot Visual Servo Controllers Robot visual servo control uses various imaging systems to replace visual organs as the sensitive means of input, and a high-speed processor replaces the brain to complete the corresponding processing and interpretation. Its ultimate research goal is to enable robot visual servo controllers to observe and understand the world through vision like humans, possess the ability to autonomously adapt to the environment, and complete certain tasks with a certain degree of intelligence based on visual sensitivity and feedback. System Hardware Implementation The SOPC-based robot vision servo controller mainly consists of three parts: FPGA, memory, and peripherals, as shown in Figure 1. The camera position is fixed, and the range of images it can acquire is called the visual region. The camera is adjusted so that the visual region covers the robot's workspace, meaning the curve the robot needs to track is within this visual region. Images are acquired using the camera, and then the system processes these images, analyzing and extracting discrete sampling point sequences. Finally, the robot's motion path is planned based on the sampling point sequences. The core of the FPGA part is the Nios II processor Core. In typical embedded system development, when new peripheral modules are needed, corresponding peripheral chips are often added to the PCB or a higher-end CPU is used. However, the SOPC design allows for the inclusion of corresponding peripheral module cores within the same FPGA chip, connected to the Nios II processor Core via the on-chip Avalon bus, thus eliminating the need for further modifications at the PCB level. The imaging acquisition device acquires image sequences from the target scene and stores them in the SOPC's off-chip memory. Then, the Nios II processor and customized DSP operation instructions such as multiplication and division are used to implement the linear Kalman filter algorithm, thereby achieving the recognition and tracking of moving targets. System Software Implementation The discrete linear Kalman filter (DLKF) algorithm is an optimal linear recursive filtering method proposed by American engineer Kalman based on linear minimum variance estimation. It has a relatively simple mathematical structure and advantages in terms of low computational and storage requirements and high real-time performance. The filtering effect is particularly good after the initial filtering transition state. The basic algorithm of the linear Kalman filter is as follows: Consider a stochastic dynamic system with the following mathematical model: In Equation 1, x(k) is the system state vector, w(k) is the system noise vector, φ(k) and Γ(k) are the system matrices. In Equation 2, Z(k) is the system observation vector, H(k) is the system observation matrix, and V(k) is the system observation noise matrix. Regarding the stochasticity of the system, this paper assumes that the system noise and observation noise are uncorrelated zero-mean Gaussian white noise. The state estimation problem of a stochastic system involves estimating the system state based on a selected estimation criterion and acquired measurement information. The estimation criterion for Kalman filtering is: where the estimate is x(k) unbiased and has the minimum variance. Based on these two criteria, a complete filtering algorithm for the system can be derived: The prediction error equation is: The gain matrix equation is: The filtering error variance matrix is: In the above formulas, I is the identity matrix, Q is the autocovariance variance matrix of w(k), and R is the autocovariance variance matrix of V(k). Kalman filtering uses a recursive algorithm. When calculating the optimal filter value, K(k+1) is determined by P(k+1|k), P(k+1|k) is determined by P(k), and P(k+1) is determined by P(k+1|k) and K(k+1), and this recursive calculation is repeated. System Program Flow The main function of this system is to lock onto the moving target and control the motion platform to track the target in real time. The system utilizes a high-performance Nios II processor as the controller to manage the entire system's implementation process and employs an efficient linear Kalman filter algorithm to estimate the target's motion parameters, effectively improving image processing speed and enabling rapid tracking of moving targets. The system flow is as follows: 1. System Initialization: The SOPC sets the working mode of the USB interface miniature camera via the control bus and initializes its main control program variables. 2. Determining the Motion Area: The Nios II processor locks the moving object based on the image sequence and determines the motion tracking interval based on the tracked object. Subsequent tracking operations are performed within this tracking window. 3. Prediction Calculation: Calculations are performed using the linear Kalman filter equation. 4. Filtering: Prediction and filtering are interactive; prediction is obtained from filtering, and filtering is obtained from prediction. 5. Output: The SOPC sends control signals to the servo platform. This system uses a Stratix high-density FPGA integrating a Nios soft-core processor. The controller records the position and velocity of the moving target at each moment as observations through the camera. Then, optimal state estimation is performed according to formulas (3), (4), (5), and (6) to obtain the predicted values ​​of the moving target's position and velocity at each moment. Due to various interference factors, after seven or eight time periods, the predicted position is quite close to the observed position, thus achieving accurate state prediction. Conclusion This paper establishes a multi-joint robot vision servoing system based on an SOPC structure. The main function of the system, which successfully predicts the state parameters of a moving target using a linear Kalman filter algorithm, is to lock onto the moving target and achieve real-time tracking. The application of Kalman filtering significantly reduces the search space and image processing time, effectively improving the system's real-time performance and enabling rapid tracking of moving targets.
Read next

CATDOLL 123CM Momoko TPE

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22