Reset sensitivity setting method of game joystick, gamepad and storage medium
By designing the reset sensitivity setting method, the abnormal state of the game joystick is identified and dynamically calibrated and filtered, the problems of reset inaccuracy and jitter are solved, and higher reset accuracy and stability are achieved.
Patent Information
- Application Number
- CN202510212022.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-04-18
AI Technical Summary
Existing game sticks have detection accuracy and sensitivity problems when resetting, including sensor drift, noise interference and mismatch in response speeds, resulting in inaccurate resets and jitter.
Design a reset sensitivity setting method, identify abnormal states and start the corresponding maintenance processing program through the design of key parameter sets and real-time signal analysis. The method includes dynamic center point calibration, signal filtering and noise suppression, signal prediction compensation and reset state judgment.
Improves the accuracy and sensitivity of game joystick reset, reduces the impact of noise interference and sensor drift, and ensures the improvement of stability and response speed of the joystick after reset.
Smart Images

Figure CN119838207A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game joystick resetting, and more specifically, to a method for setting the resetting sensitivity of a game joystick, a game controller and a storage medium. Background Art
[0002] Modern game joysticks often use Hall effect sensors or potentiometers to detect the position of the joystick. The performance and signal processing methods of these sensors will directly affect the detection accuracy and sensitivity of the reset.
[0003] First, as the sensor wears out and ages, its output signal may drift, which will cause the detection of the reset position to shift, resulting in the problem of "center point misalignment" when the joystick is reset, and the sensor does not output the correct "center point" signal when the joystick is in the mechanical center position. This is manifested in the game as abnormal movement of the character or perspective.
[0004] Secondly, the sensor may be subject to external interference (such as electromagnetic interference or unstable current) which may increase the signal noise. The noise will cause the sensor output signal to fluctuate when the joystick approaches the center point, making it impossible for the software to accurately determine whether the joystick is completely reset. This is manifested as slight "jitter" or "drift" after reset.
[0005] In addition, the mismatch between the sensor response speed and the software sampling frequency also affects the sensitivity. If the sensor response speed is slow (for example, the signal processing of the Hall effect sensor is delayed), and the joystick resets quickly, the sensor signal may not keep up with the actual position change of the joystick. This is manifested as: even if the joystick has been mechanically reset, the software may still not be able to detect the center point, thus affecting the reset sensitivity.
[0006] In view of this, the present invention proposes a method for setting the reset sensitivity of a game joystick to solve the above problem. Summary of the invention
[0007] In order to overcome the above defects of the prior art and to achieve the above purpose, the present invention provides the following technical solution: a method for setting the reset sensitivity of a game joystick, comprising: step S1: designing a key parameter set and judging the reset sensitivity of the game joystick, obtaining the state of the game joystick, and starting a corresponding program;
[0008] Step S2: after the maintenance processing program is started, a real-time data set at time t is collected, and the real-time data set is preliminarily processed to obtain a quality-enhanced data set;
[0009] Step S3: If the state of the game joystick is abnormal noise, the enhanced data set is used to perform dynamic center point calibration; if the state of the game joystick is abnormal sensor drift, the enhanced data set is used to perform signal filtering and noise suppression; if the state of the game joystick is abnormal response speed, the enhanced data set is used to perform signal prediction compensation;
[0010] Step S4: Determine the state of the rocker after it is reset. If it is identified that the rocker has returned to the ideal center point, stop the inspection process. If it is identified that the rocker has not returned to the ideal center point, repeat step S3 until the rocker returns to the ideal center.
[0011] Preferably, the design method of the key parameter set includes:
[0012] The output signal value of the sensor at time t is set to S(t), which is used to represent the position information of the game joystick at time t, and the relationship formula is S(t)=Sc+ΔS+N(t), where Sc represents the signal value at the ideal center point, ΔS represents the drift, and N(t) represents the noise signal;
[0013] For the game joystick in the normal reset sensitivity state, keep the game joystick without input, collect the standard deviation of P_B times signal S(t), and calculate the average, and record the average value as the amplitude threshold;
[0014] Set the time delay of the sensor response signal change to the sensor response time T_r, and set the sampling frequency of the signal S(t) to f_r;
[0015] The reset threshold is defined as the threshold used to determine whether the game joystick is reset. σ represents the standard deviation of the signal S(t) when there is no input from the joystick, and L represents the sensitivity level.
[0016] Preferably, the method of determining the reset sensitivity of the game joystick and obtaining the state of the game joystick includes:
[0017] Keep the game joystick without input, the simplified formula of signal S(t) is S(t)=Sc+N(t), then calculate the standard deviation of signal S(t), if the standard deviation is greater than the amplitude threshold, it means that the sensitivity of the game joystick is poor, then the state of the game joystick is judged to be abnormal noise, otherwise, keep the game joystick at the ideal center point, if the signal jitter is manifested, then the state of the game joystick is judged to be abnormal noise;
[0018] Calculate the absolute deviation value ΔT_f=|T_r-f_r| between the sensor response time T_r and the sampling frequency f_r. If ΔT_f>ε, where ε is a very small positive value, the state of the game joystick is judged to be abnormal response speed.
[0019] The difference between the signal S(t) and Sc is calculated in real time to obtain the drift ΔS. If the drift ΔS is greater than the reset threshold If the signal deviates from the ideal center point, the state of the game joystick is judged to be abnormal sensor drift;
[0020] Identify the state of the game joystick at the current time t. If there is an abnormal state, start the maintenance processing program. If there is no abnormal state, start the normal working program.
[0021] Preferably, the method of collecting a real-time data set at time t and performing preliminary processing on the real-time data set to obtain a quality-enhanced data set includes:
[0022] Set the time period Z_q forward from time t as the base point, discretize the time period Z_q into time points, and collect real-time data sets of the joystick static state and moving state at each time point at the sampling frequency f_r;
[0023] The real-time data set includes the original signal S_q(t), timestamp and joystick status information;
[0024] Use the IQR method to remove outliers in the real-time data set, set them as gaps, and use interpolation to fill the gaps;
[0025] For the original signal S_q(t) in the static state, a moving average filter is used for processing, and the adaptive window size adjustment rule of the moving average filter is set, including pre-defining the high noise threshold Gz_y, the low noise threshold Gd_y, the maximum window step size Ck_max and the minimum window step size Ck_min, and calculating the standard deviation σ_y of the original signal S_q(t);
[0026] When the standard deviation σ_y is greater than the high noise threshold Gz_y, the window of the moving average filter is set to the maximum window step size Ck_max;
[0027] When the standard deviation σ_y is less than the low noise threshold Gd_y, the window of the moving average filter is set to the minimum window step size Ck_min;
[0028] When the standard deviation σ_y is between the low noise threshold Gd_y and the high noise threshold Gz_y, the window of the moving average filter is set to
[0029] The signal in the window is processed using weighted average, and the window is sequentially slid on the time-series signal S_q(t) to obtain the smoothed signal;
[0030] For the original signal S_q(t) in motion, use exponential weighted moving average to process it and obtain the smoothed signal;
[0031] The real-time data set after smoothing is normalized to obtain the quality-enhanced data set after preliminary processing.
[0032] Preferably, the method for performing dynamic center point calibration using the quality-enhanced data set comprises:
[0033] Perform low-pass filtering on the enhanced data set to obtain filtered signals S_jz(t) and S_yd(t) in static and moving states respectively;
[0034] Set the window to a fixed step size Ck_N, and design the center point calibration formula for each window as follows: Use the window to slide on the quality-enhanced data set after low-pass filtering to obtain the calibrated signal sequence, and predict the center point at the current time t according to the ARIMA model. According to the update formula S_gx(t) = α×S_jz 1 (t)+(1-α)×S_yd 1 (t) Get the calibration center point S_gx(t) at the current time t;
[0035] Among them, S_jz 1 (t) represents the center point of the signal S_jz(t) after prediction by the center point calibration formula and ARIMA model, S_yd 1 (t) represents the center point of the signal S_yd(t) after being predicted by the center point calibration formula and the ARIMA model, α is the adjustment coefficient, and α∈(0,1), S_zx(t) represents the center point after being processed by the center point calibration formula, S_N(t) i represents the i-th signal, ω i represents the weight of the ith signal.
[0036] Preferably, the method for performing signal filtering and noise suppression using the quality-enhanced data set comprises:
[0037] Based on the physical input of the joystick, the state vector of the joystick system is defined as Then the state equation of the rocker system is expressed as X(t+1)=A·X(t)+B·u(t)+e(t), and then the observation equation z(t)=H·X(t)+v(t) is obtained;
[0038] Where p(t) represents the displacement of the joystick, v(t) represents the velocity of the joystick, a(t) represents the acceleration of the joystick, A represents the state transfer matrix, and Δt represents the sampling time interval, B represents the control input matrix, u(t) represents the input signal, e(t) represents the system noise, z(t) represents the measurement value, H represents the observation matrix, and H = [1 0 0];
[0039] The Kalman filter can be used to estimate and predict the displacement, velocity and acceleration of the joystick to obtain the estimated value G_j;
[0040] Use moving average to slide the window of the enhanced data set, obtain the smoothed signal and calculate the standard deviation, which is used as the noise amplitude estimate, denoted as F_g;
[0041] Calculate the rate of change of the observed value over time period Z_q
[0042] Where z(t-Z_q) represents the observed value at the starting time t-Z_q of the time period Z_q;
[0043] Dynamically adjust the reset threshold τ(t)=k·F_g+β·B_h based on the noise amplitude estimation and change rate, and perform smoothing τ(t) 1 =γ·τ(t)+(1-γ)·τ(t-Z_q);
[0044] Where k is the noise safety factor, β is the weight of the signal change trend, γ is the smoothing coefficient, and τ(t-Z_q) represents the reset threshold at the start time t-Z_q of the time period Z_q;
[0045] If the absolute value of the estimated value G_j is less than τ(t) 1 , determine whether the joystick has returned to the center point and perform the reset operation; otherwise, keep the current state.
[0046] Preferably, the method for performing signal prediction compensation using the quality-enhanced data set comprises:
[0047] When the sampling frequency of the sensor is lower than the control system frequency, multi-step recursive prediction is used to calculate the signal value at future moments for sampling compensation;
[0048] When the sensor sampling frequency is higher than the control system frequency, the sampling points can be compressed by the sliding window fitting method to reduce the sampling signal.
[0049] Preferably, the method for determining the state of the rocker after it is reset includes:
[0050] Move the game joystick to the ideal center point, output the signal value S_ss, and calculate the absolute difference between the signal value S_ss and the signal value Sc at the ideal center point according to the relationship formula. If the absolute difference is less than the sensitivity threshold, it is judged that the joystick has returned to the ideal center point, otherwise, it is judged that the joystick has not returned to the ideal center point.
[0051] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it is applied to implement a method for setting the reset sensitivity of a game joystick.
[0052] A storage medium stores a computer program, which, when executed, is used to implement a method for setting the reset sensitivity of a game joystick.
[0053] The technical effects and advantages of a method for setting the reset sensitivity of a game joystick of the present invention are as follows:
[0054] 1. Dynamic reset sensitivity judgment and state recognition
[0055] Through the design of key parameter sets and real-time signal analysis, the abnormal state of the game joystick (abnormal noise, abnormal sensor drift and abnormal response speed) can be accurately identified, and the corresponding maintenance processing procedures can be initiated according to the abnormal state.
[0056] By comprehensively considering parameters such as noise signals, drift, and response time, the abnormal state of the game joystick can be fully identified. The accuracy and adaptability of the joystick reset sensitivity can be ensured through dynamic adjustment of the reset threshold. The signal changes of the joystick are analyzed in real time, and the maintenance process is initiated quickly to reduce the impact of abnormal conditions on the user experience.
[0057] 2. Efficient data collection and quality enhancement
[0058] By collecting real-time data sets over a time period and combining multiple signal processing methods such as moving average filtering, interpolation and normalization, a high-quality enhanced data set is generated.
[0059] The IQR method removes outliers, and the interpolation method fills in missing data to ensure data integrity and reliability. The dynamic window size adjustment rule is adopted to flexibly adjust the window step size of the moving average filter according to the noise level to balance the signal smoothing effect and information retention ability. The processing methods are designed for the static state and the moving state respectively to effectively deal with the data characteristics in different usage scenarios.
[0060] 3. Dynamic center point calibration
[0061] By performing low-pass filtering and sliding window processing on the quality-enhanced data set and combining the ARIMA model to predict the center point of the current time, dynamic center point calibration is achieved to improve the accuracy of joystick resetting.
[0062] The calibration process is based on real-time signal changes and can dynamically adapt to changes in the state of the joystick (such as drift or noise interference). The time series prediction capability of the ARIMA model can further improve the accuracy and stability of the center point calibration. Combined with low-pass filtering and sliding window processing, the impact of noise on the calibration results can be reduced and the robustness of the calibration can be enhanced.
[0063] 4. Signal filtering and noise suppression
[0064] The displacement, velocity and acceleration of the joystick are estimated based on the Kalman filter, and the signal smoothing and noise suppression are completed by combining moving average filtering and dynamic reset threshold adjustment.
[0065] The Kalman filter jointly estimates the displacement, velocity and acceleration of the joystick through the state equation and observation equation, and fully characterizes the dynamic characteristics of the joystick. According to the noise amplitude estimation and signal change rate, the reset threshold is dynamically adjusted to improve the adaptability and accuracy of noise suppression. The moving average filter is combined with the dynamic window sliding processing to effectively reduce the noise amplitude and enhance the smoothness and stability of the signal.
[0066] 5. Signal prediction compensation
[0067] Aiming at the mismatch between sensor sampling frequency and control system frequency, a multi-step recursive prediction and sliding window fitting method is proposed to achieve signal prediction compensation and sampling compression.
[0068] For low sampling frequencies, multi-step recursive predictions are used to calculate future signals to compensate for the lack of sampling points and improve the time resolution of the joystick signal. For high sampling frequencies, sliding window fitting is used to compress sampling points, reduce the amount of data, and reduce system resource consumption. Signal prediction compensation significantly improves the real-time response capability of the joystick and avoids signal delays or losses caused by sampling frequency differences.
[0069] 6. Accurate reset status judgment
[0070] By calculating the absolute difference between the signal value and the signal value at the ideal center point, combined with the sensitivity threshold, it is determined whether the joystick has returned to the ideal center point.
[0071] The sensitivity threshold is used to strictly judge the reset state to ensure the accuracy of the reset operation. If the joystick does not return to the ideal center point, the system can automatically repeat the calibration and filtering operations until the joystick is successfully reset. The accurate judgment and automatic processing of the reset state significantly improves the user's control experience and device stability.
[0072] The various modules of this method (such as state recognition, data processing, signal calibration and compensation, etc.) are designed independently and work together to form a modular system architecture. Through the collaborative work of multiple modules, the system can dynamically optimize the reset sensitivity, signal processing and response performance of the game joystick, providing users with a precise and smooth control experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a structural schematic diagram of a method for setting the reset sensitivity of a game joystick of the present invention;
[0074] Figure 2 The present invention is a schematic diagram of the steps of a method for setting the reset sensitivity of a game joystick. DETAILED DESCRIPTION
[0075] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] Example 1
[0077] See also Figure 1 and Figure 2 As shown, the method for setting the reset sensitivity of a game joystick described in this embodiment includes:
[0078] Modern game joysticks often use Hall effect sensors or potentiometers to detect the position of the joystick. The performance and signal processing methods of these sensors will directly affect the detection accuracy and sensitivity of the reset.
[0079] First, as the sensor wears out and ages, its output signal may drift, which will cause the detection of the reset position to shift, resulting in the problem of "center point misalignment" when the joystick is reset, and the sensor does not output the correct "center point" signal when the joystick is in the mechanical center position. This is manifested in the game as abnormal movement of the character or perspective.
[0080] Secondly, the sensor may be subject to external interference (such as electromagnetic interference or unstable current) which may increase the signal noise. The noise will cause the sensor output signal to fluctuate when the joystick approaches the center point, making it impossible for the software to accurately determine whether the joystick is completely reset. This is manifested as slight "jitter" or "drift" after reset.
[0081] In addition, the mismatch between the sensor response speed and the software sampling frequency also affects the sensitivity. If the sensor response speed is slow (for example, the signal processing of the Hall effect sensor is delayed), and the joystick resets quickly, the sensor signal may not keep up with the actual position change of the joystick. This is manifested as: even if the joystick has been mechanically reset, the software may still not be able to detect the center point, thus affecting the reset sensitivity.
[0082] Step S1: designing a key parameter set and determining the reset sensitivity of the game joystick, obtaining the state of the game joystick, and starting a corresponding program;
[0083] Data design and state judgment module: used to design key parameter sets and perform state judgment on the reset sensitivity of the game joystick;
[0084] The design approach for key parameter sets includes:
[0085] The output signal value of the sensor at time t is set to S(t), which is used to represent the position information of the game joystick at time t, and the relationship formula is S(t)=Sc+ΔS+N(t), where Sc represents the signal value at the ideal center point, and refers to the ideal output signal value of the sensor without any error and noise. It represents the value of the physical quantity measured by the sensor when it is not subject to any interference. In the present invention, when the joystick is manufactured, the sensor signal value corresponding to the mechanical center position of the joystick is defined as Sc (usually 0 or a fixed value), ΔS represents the drift (or deviation), and the drift or deviation will cause the sensor reading to systematically deviate from the true value, and N(t) represents the noise signal, which is caused by factors such as electronic noise, environmental interference, and random errors in the measurement process;
[0086] The output signal value S(t) is obtained by collecting the output signal value of the sensor through a hardware circuit. For Hall effect sensors, the output signal directly reflects the offset of the magnetic field and is usually an analog signal that needs to be converted into a digital signal through analog-to-digital conversion (ADC). For potentiometer sensors, the output signal is a change in voltage value, which also needs to be sampled by ADC.
[0087] If the joystick's motion range is [-R, R], then the sensor output signal S(t) also has a value range between [-R, R].
[0088] For the game joystick in the normal reset sensitivity state, keep the game joystick without input (stationary), collect the standard deviation of the P_B sub-signal S(t), and perform average calculation, and record the average value as the amplitude threshold;
[0089] Set the time delay of the sensor response signal change to the sensor response time T_r, and set the sampling frequency of the signal S(t) to f_r; the size of the sensor response time T_r determines the real-time performance of the reset detection algorithm. If the sensor response time T_r is large (such as the Hall sensor responds slowly), the signal prediction compensation algorithm is needed to compensate for the lag.
[0090] The reset threshold is defined as the threshold used to determine whether the game joystick is reset. σ represents the standard deviation of the game joystick no-input signal S(t), and L represents the sensitivity level, which can be preset by the factory or manually set by the user;
[0091] Determine the reset sensitivity of the game joystick and obtain the state of the game joystick. The specific method includes:
[0092] Keep the game joystick without input (stationary), the signal S(t) output by the sensor should only contain the ideal center point signal value Sc and the noise signal N(t). Because there is no change in physical quantity at this time, the drift or deviation ΔS can be ignored. Therefore, the simplified formula of the signal S(t) is S(t) = Sc + N(t), then calculate the standard deviation of the signal S(t). The standard deviation reflects the average amplitude of the signal S(t) and is used to evaluate the noise level of the sensor. If the standard deviation is greater than the amplitude threshold, it means that the sensitivity of the game joystick is poor, and the state of the game joystick is judged to be abnormal noise. Otherwise, keep the game joystick at the ideal center point. If the signal jitters, the state of the game joystick is judged to be abnormal noise.
[0093] Calculate the absolute deviation value ΔT_f = |T_r-f_r| between the sensor response time T_r and the sampling frequency f_r. If ΔT_f>ε, where ε is a very small positive value, the state of the game joystick is judged to be abnormal response speed. When the sensor response speed and the software sampling frequency are greater than the response threshold, the signal may be delayed, resulting in reset detection delay or misjudgment.
[0094] The difference between the signal S(t) and Sc is calculated in real time to obtain the drift ΔS. If the drift ΔS is greater than the reset threshold If the signal deviates from the ideal center point, the state of the game joystick is judged to be abnormal sensor drift;
[0095] Identify the state of the game joystick at the current time t. If there is an abnormal state, start the maintenance processing program. If there is no abnormal state, start the normal working program.
[0096] The noise anomaly, response speed anomaly and sensor drift anomaly identified and judged above can be superimposed, and the above abnormal conditions can all be judged by the remote sensing moving position on the control display interface of the gaming device, and the processing program can also be manually started by the user.
[0097] Step S2: after the maintenance processing program is started, a real-time data set at time t is collected, and the real-time data set is preliminarily processed to obtain a quality-enhanced data set;
[0098] Data preprocessing module: used to perform preliminary processing on real-time data sets to obtain quality-enhanced data sets;
[0099] The method of collecting the real-time data set at time t and performing preliminary processing on the real-time data set to obtain the quality-enhanced data set includes:
[0100] Set the time period Z_q forward from time t as the base point, discretize the time period Z_q into time points, and collect real-time data sets of the joystick static state and moving state at each time point at the sampling frequency f_r;
[0101] The real-time data set includes the original signal S_q(t), timestamp and joystick status information;
[0102] The sensor output signal S(t) of the joystick at different positions (e.g., any position, center point, maximum offset position) is recorded traversally. The timestamp is the time point of each sampling record, which is used for subsequent time series analysis. The state information of the joystick is used to record the physical state of the joystick (such as static, moving, maximum offset, etc.) for data annotation.
[0103] Collect data when the joystick is stationary to analyze noise and zero drift. Collect data when the joystick is moving to analyze signal response characteristics and hysteresis.
[0104] Use the IQR method to remove outliers in the real-time data set, set them as gaps, and use interpolation to fill the gaps;
[0105] For the original signal S_q(t) in a static state, a moving average filter is used for processing. Signal fluctuations in static data are mainly caused by noise. Moving average filtering can smooth noise, but the choice of window size will affect the smoothing effect. The adaptive window size adjustment rule of the moving average filter is set, including pre-defining the high noise threshold Gz_y, the low noise threshold Gd_y, the maximum window step Ck_max and the minimum window step Ck_min, and calculating the standard deviation σ_y of the original signal S_q(t);
[0106] When the standard deviation σ_y is greater than the high noise threshold Gz_y, the window of the moving average filter is set to the maximum window step size Ck_max; this ensures that the smoothing process can effectively reduce the impact of noise when the noise level is high.
[0107] When the standard deviation σ_y is less than the low noise threshold Gd_y, the window of the moving average filter is set to the minimum window step size Ck_min; this ensures that when the noise level is low, the smoothing process does not over-smooth the data, thereby maintaining the details of the data.
[0108] When the standard deviation σ_y is between the low noise threshold Gd_y and the high noise threshold Gz_y, the window of the moving average filter is set to This formula linearly adjusts the value of Ck_zj between Ck_max and Ck_min based on the relative position between σ_y and Gd_y and Gz_y.
[0109] The signal in the window is processed using weighted average, and the window is sequentially slid on the time-series signal S_q(t) to obtain the smoothed signal;
[0110] For the original signal S_q(t) in motion, use exponential weighted moving average to process it and obtain the smoothed signal;
[0111] The real-time data set after smoothing is normalized to obtain the quality-enhanced data set after preliminary processing.
[0112] Step S3: If the state of the game joystick is abnormal noise, the enhanced data set is used to perform dynamic center point calibration; if the state of the game joystick is abnormal sensor drift, the enhanced data set is used to perform signal filtering and noise suppression; if the state of the game joystick is abnormal response speed, the enhanced data set is used to perform signal prediction compensation;
[0113] Methods for dynamic center point calibration using augmented datasets include:
[0114] The quality enhancement data set is low-pass filtered to obtain the filtered signals S_jz(t) and S_yd(t) in the static state and the moving state respectively; low-pass filtering can reduce the high-frequency noise in the signal and make the signal smoother.
[0115] Set the window to a fixed step size Ck_N, and select the window size according to the state. If the joystick is in a static state, a larger window can be used to obtain a more accurate center point estimation; if the joystick is in a dynamic state, a smaller window can be used to respond faster to changes in the joystick position. For each window, the center point calibration formula is designed as Use the window to slide on the quality-enhanced data set after low-pass filtering to obtain the calibrated signal sequence, and predict the center point at the current time t according to the ARIMA model. According to the update formula S_gx(t) = α×S_jz 1 (t)+(1-α)×S_yd 1 (t) Get the calibration center point S_gx(t) at the current time t; this center point can be used for subsequent joystick control and signal processing.
[0116] Among them, S_jz 1 (t) represents the center point of the signal S_jz(t) after prediction by the center point calibration formula and ARIMA model, S_yd 1 (t) represents the center point of the signal S_yd(t) after being predicted by the center point calibration formula and the ARIMA model, α is the adjustment coefficient, and α∈(0,1), S_zx(t) represents the center point after being processed by the center point calibration formula, S_N(t) i represents the i-th signal, which in the present invention mainly refers to the signals S_jz(t) and S_yd(t) in the static state and the moving state respectively processed by the formula, ω i Represents the weight of the i-th signal, and the weight decays linearly, giving more weight to recent signals to better reflect the current state of the joystick.
[0117] Methods for signal filtering and noise suppression using enhanced datasets include:
[0118] Based on the physical input of the joystick (such as displacement, velocity, acceleration), the state vector of the joystick system is defined as Then the state equation of the rocker system is expressed as X(t+1)=A·X(t)+B·u(t)+e(t), and then the observation equation z(t)=H·X(t)+v(t) is obtained;
[0119] Where p(t) represents the displacement of the joystick (physical quantity, such as angle or position), v(t) represents the velocity of the joystick, a(t) represents the acceleration of the joystick, A represents the state transfer matrix, and describes the dynamic model of the system. Δt represents the sampling time interval, which is designed by the sampling frequency. B represents the control input matrix, which is used to describe the influence of the joystick operation input on the system. u(t) represents the input signal (such as the force of the joystick or external input), e(t) represents the system noise, z(t) represents the measurement value (such as the actual position of the joystick), H represents the observation matrix, and H = [1 0 0];
[0120] The Kalman filter can be used to estimate and predict the displacement, velocity and acceleration of the joystick to obtain the estimated value G_j;
[0121] Use moving average to slide the window of the enhanced data set, obtain the smoothed signal and calculate the standard deviation, which is used as the noise amplitude estimate, denoted as F_g;
[0122] Calculate the rate of change of the observed value over time period Z_q
[0123] Where z(t-Z_q) represents the observed value at the starting time t-Z_q of the time period Z_q;
[0124] Dynamically adjust the reset threshold τ(t)=k·F_g+β·B_h based on the noise amplitude estimation and change rate, and perform smoothing τ(t) 1 =γ·τ(t)+(1-γ)·τ(t-Z_q); it is used to determine whether the joystick has returned to the center point, that is, whether the displacement is small enough.
[0125] Where k is the noise safety factor, β is the weight of the signal change trend, γ is the smoothing coefficient, and τ(t-Z_q) represents the reset threshold at the start time t-Z_q of the time period Z_q;
[0126] If the absolute value of the estimated value G_j is less than τ(t) 1 , determine whether the joystick has returned to the center point and perform the reset operation; otherwise, keep the current state.
[0127] The reset operation may include resetting state variables such as the displacement, velocity, and acceleration of the joystick to initial values, or executing other related control logic.
[0128] Through the above processing, Kalman filtering combines physical models to optimize the estimation of noise, which can effectively smooth the signal and take into account real-time performance. The adaptability of the filter under different operating conditions is improved. The sliding window combines the signal change rate to estimate the noise level, which can more accurately distinguish between the static state and the dynamic operating state. It avoids misjudging high-frequency changes as noise during dynamic operation. The dynamic reset threshold combines the signal change trend to balance sensitivity and robustness. The stability of the judgment is guaranteed. The improved method can adapt to different noise environments and dynamic operating characteristics, further improving the robustness, real-time performance and accuracy of the system.
[0129] Methods for signal prediction compensation using enhanced datasets include:
[0130] When the sampling frequency of the sensor is lower than the control system frequency, multi-step recursive prediction is used to calculate the signal value at future moments for sampling compensation;
[0131] For example, a multi-step recursive prediction formula could be Where Sp(t+n) represents the signal value at the current time t at the next n time points, Sp(t+n-1) represents the signal value at the time t+n-1, v(t+n-1) represents the speed at the time t+n-1, Δt 1 represents the time interval, and a(t+n-1) represents the acceleration at time t+n-1.
[0132] When the sensor sampling frequency is higher than the control system frequency, the sampling points can be compressed by the sliding window fitting method to reduce the sampling signal.
[0133] The signal model obtained by sliding window fitting can summarize the trends of all sampling points and directly use the fitting results instead of all original sampling points during low-frequency control.
[0134] Step S4: judging the state of the rocker after it is reset, if it is identified that the rocker has returned to the ideal center point, then stopping the inspection process, if it is identified that the rocker has not returned to the ideal center point, then repeating step S3 until the rocker returns to the ideal center;
[0135] The method for judging the state after the joystick is reset includes:
[0136] Move the game joystick to the ideal center point, output the signal value S_ss, and calculate the absolute difference between the signal value S_ss and the signal value Sc at the ideal center point according to the relationship formula. If the absolute difference is less than the sensitivity threshold, it is judged that the joystick has returned to the ideal center point, otherwise, it is judged that the joystick has not returned to the ideal center point.
[0137] The sensitivity threshold is set by the manufacturer or by the user.
[0138] Example 2
[0139] See also Figure 1 As shown, the part not described in detail in this embodiment is described in Example 1, which provides a reset sensitivity setting system for a game joystick, including:
[0140] Data design and state judgment module: used to design key parameter sets and perform state judgment on the reset sensitivity of the game joystick;
[0141] Data preprocessing module: used to perform preliminary processing on real-time data sets to obtain quality-enhanced data sets;
[0142] Real-time processing module: If the state of the game joystick is abnormal noise, the enhanced data set is used for dynamic center point calibration; if the state of the game joystick is abnormal sensor drift, the enhanced data set is used for signal filtering and noise suppression; if the state of the game joystick is abnormal response speed, the enhanced data set is used for signal prediction compensation;
[0143] Reset judgment module: used to judge the state of the joystick after reset.
[0144] Example 3
[0145] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the reset sensitivity setting method of the game joystick provided above is implemented.
[0146] Since the electronic device introduced in this embodiment is an electronic device used to implement a method for setting the reset sensitivity of a game joystick in the embodiment of the present application, based on the method for setting the reset sensitivity of a game joystick introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements an electronic device used by a method for setting the reset sensitivity of a game joystick in the embodiment of the present application, it belongs to the scope of protection of the present application.
[0147] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0148] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for setting the reset sensitivity of a game joystick, characterized in that: include: Step S1: designing a key parameter set and determining the reset sensitivity of the game joystick, obtaining the state of the game joystick, and starting a corresponding program; Step S2: after starting the maintenance processing program, collect the real-time data set at time t, and perform preliminary processing on the real-time data set to obtain the quality-enhanced data set; Step S3: If the state of the game joystick is abnormal noise, the enhanced data set is used to perform dynamic center point calibration; if the state of the game joystick is abnormal sensor drift, the enhanced data set is used to perform signal filtering and noise suppression; if the state of the game joystick is abnormal response speed, the enhanced data set is used to perform signal prediction compensation; Step S4: Determine the state of the rocker after it is reset. If it is identified that the rocker has returned to the ideal center point, stop the inspection process. If it is identified that the rocker has not returned to the ideal center point, repeat step S3 until the rocker returns to the ideal center.
2. The method for setting the reset sensitivity of a game joystick according to claim 1, characterized in that: The design method of the key parameter set includes: The output signal value of the sensor at time t is set to S(t), which is used to represent the position information of the game joystick at time t, and the relationship formula is S(t)=Sc+ΔS+N(t), where Sc represents the signal value at the ideal center point, ΔS represents the drift, and N(t) represents the noise signal; For the game joystick in the normal reset sensitivity state, keep the game joystick without input, collect the standard deviation of P_B times signal S(t), and perform average calculation, and record the average value as the amplitude threshold; Set the time delay of the sensor response signal change to the sensor response time T_r, and set the sampling frequency of the signal S(t) to f_r; The reset threshold is defined as the threshold used to determine whether the game joystick is reset. σ represents the standard deviation of the signal S(t) when there is no input from the joystick, and L represents the sensitivity level.
3. The method for setting the reset sensitivity of a game joystick according to claim 2, characterized in that: The method of determining the reset sensitivity of the game joystick and obtaining the state of the game joystick includes: Keep the game joystick without input, the simplified formula of signal S(t) is S(t)=Sc+N(t), then calculate the standard deviation of signal S(t), if the standard deviation is greater than the amplitude threshold, it means that the sensitivity of the game joystick is poor, then the state of the game joystick is judged to be abnormal noise, otherwise, keep the game joystick at the ideal center point, if the signal jitter is manifested, then the state of the game joystick is judged to be abnormal noise; Calculate the absolute deviation value ΔT_f=|T_r-f_r| between the sensor response time T_r and the sampling frequency f_r. If ΔT_f>ε, where ε is a very small positive value, the state of the game joystick is judged to be abnormal response speed. The difference between the signal S(t) and Sc is calculated in real time to obtain the drift ΔS. If the drift ΔS is greater than the reset threshold φ, it means that the signal deviates from the ideal center point, and the state of the game joystick is judged to be abnormal sensor drift; Identify the state of the game joystick at the current time t. If there is an abnormal state, start the maintenance processing program. If there is no abnormal state, start the normal working program.
4. The method for setting the reset sensitivity of a game joystick according to claim 3, characterized in that: The method of collecting a real-time data set at time t and performing preliminary processing on the real-time data set to obtain a quality-enhanced data set includes: Set the time period Z_q forward from time t as the base point, discretize the time period Z_q into time points, and collect real-time data sets of the joystick static state and moving state at each time point at the sampling frequency f_r; The real-time data set includes the original signal S_q(t), timestamp and joystick status information; Use the IQR method to remove outliers in the real-time data set, set them as gaps, and use interpolation to fill the gaps; For the original signal S_q(t) in the static state, a moving average filter is used for processing, and the adaptive window size adjustment rule of the moving average filter is set, including pre-defining the high noise threshold Gz_y, the low noise threshold Gd_y, the maximum window step size Ck_max and the minimum window step size Ck_min, and calculating the standard deviation σ_y of the original signal S_q(t); When the standard deviation σ_y is greater than the high noise threshold Gz_y, the window of the moving average filter is set to the maximum window step size Ck_max; When the standard deviation σ_y is less than the low noise threshold Gd_y, the window of the moving average filter is set to the minimum window step size Ck_min; When the standard deviation σ_y is between the low noise threshold Gd_y and the high noise threshold Gz_y, the window of the moving average filter is set to The signal in the window is processed using weighted average, and the window is sequentially slid on the time-series signal S_q(t) to obtain the smoothed signal; For the original signal S_q(t) in motion, use exponential weighted moving average to process it and obtain the smoothed signal; The real-time data set after smoothing is normalized to obtain the quality-enhanced data set after preliminary processing.
5. A method for setting the reset sensitivity of a game joystick according to claim 4, characterized in that: The method for dynamic center point calibration using an enhanced data set comprises: Perform low-pass filtering on the enhanced data set to obtain filtered signals S_jz(t) and S_yd(t) in static and moving states respectively; Set the window to a fixed step size Ck_N, and design the center point calibration formula for each window as follows: Use the window to slide on the quality-enhanced data set after low-pass filtering to obtain the calibrated signal sequence, and predict the center point at the current time t according to the ARIMA model. According to the update formula S_gx(t) = α×S_jz 1 (t)+(1-α)×S_yd 1 (t) Get the calibration center point S_gx(t) at the current time t; Among them, S_jz 1 (t) represents the center point of the signal S_jz(t) after prediction by the center point calibration formula and ARIMA model, S_yd 1 (t) represents the center point of the signal S_yd(t) after being predicted by the center point calibration formula and the ARIMA model, α is the adjustment coefficient, and α∈(0,1), S_zx(t) represents the center point after being processed by the center point calibration formula, S_N(t) i represents the i-th signal, ω i represents the weight of the ith signal.
6. A method for setting the reset sensitivity of a game joystick according to claim 5, characterized in that: The method for performing signal filtering and noise suppression using a quality-enhanced data set includes: Based on the physical input of the joystick, the state vector of the joystick system is defined as Then the state equation of the rocker system is expressed as X(t+1)=A·X(t)+B·u(t)+e(t), and then the observation equation z(t)=H·X(t)+v(t) is obtained; Where p(t) represents the displacement of the joystick, v(t) represents the velocity of the joystick, a(t) represents the acceleration of the joystick, A represents the state transfer matrix, and Δt represents the sampling time interval, B represents the control input matrix, u(t) represents the input signal, e(t) represents the system noise, z(t) represents the measurement value, H represents the observation matrix, and H = [1 0 0]; The Kalman filter can be used to estimate and predict the displacement, velocity and acceleration of the joystick to obtain the estimated value G_j; Use moving average to slide the window of the enhanced data set, obtain the smoothed signal and calculate the standard deviation, which is used as the noise amplitude estimate, denoted as F_g; Calculate the rate of change of the observed value over time period Z_q Where z(t-Z_q) represents the observed value at the starting time t-Z_q of the time period Z_q; Dynamically adjust the reset threshold τ(t)=k·F_g+β·B_h based on the noise amplitude estimation and change rate, and perform smoothing τ(t) 1 =γ·τ(t)+(1-γ)·τ(t-Z_q); Where k is the noise safety factor, β is the weight of the signal change trend, γ is the smoothing coefficient, and τ(t-Z_q) represents the reset threshold at the start time t-Z_q of the time period Z_q; If the absolute value of the estimated value G_j is less than τ(t) 1 , determine whether the joystick has returned to the center point and perform the reset operation; otherwise, keep the current state.
7. A method for setting the reset sensitivity of a game joystick according to claim 6, characterized in that: The method for performing signal prediction compensation using the enhanced data set comprises: When the sampling frequency of the sensor is lower than the control system frequency, multi-step recursive prediction is used to calculate the signal value at future moments for sampling compensation; When the sensor sampling frequency is higher than the control system frequency, the sampling points can be compressed by the sliding window fitting method to reduce the sampling signal.
8. The method for setting the reset sensitivity of a game joystick according to claim 7, characterized in that: The method for determining the state of the rocker after it is reset comprises: Move the game joystick to the ideal center point, output the signal value S_ss, and calculate the absolute difference between the signal value S_ss and the signal value Sc at the ideal center point according to the relationship formula. If the absolute difference is less than the sensitivity threshold, it is judged that the joystick has returned to the ideal center point, otherwise, it is judged that the joystick has not returned to the ideal center point.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for setting the reset sensitivity of a game joystick according to any one of claims 1 to 8 is implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed, the method for setting the reset sensitivity of a game joystick according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Dynamic correction method and device for offset error of joystick of gamepad
CN121266103A
A dynamic correction method and device for gamepad joystick offset error
CN121266103B
Rocker dynamic centering method
CN121277371A
Method for dynamic centering of a rocker
CN121277371B