A method and device for detecting misalignment of command signals and a method and device for repairing misalignment of command signals

By performing differential processing and autocorrelation analysis on the slope signals in the flight simulation turntable, the command signal misalignment caused by clock out of synchronization is detected and repaired, the command signal misalignment problem in the flight simulation turntable, and the control performance and simulation accuracy are improved. The cost of hardware synchronization has increased.

CN115963812BActive Publication Date: 2024-12-06HARBIN INST OF TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310060935.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-18
Publication Date
2024-12-06
Estimated Expiration
2043-01-18

AI Technical Summary

Technical Problem

In the flight simulation turntable, due to the error in the clock crystal frequency of the upper and lower cameras, the command signal is misaligned during transmission, affecting the control accuracy and system life.

Method used

The differential processing is performed by using ramp signals, and the period and crystal state of signal misalignment are detected through autocorrelation analysis, and the command signal is repaired based on the software to avoid increasing hardware costs.

Benefits of technology

Accurate detection and repair of instruction signal misalignment is realized, control performance and simulation accuracy are improved, and cost increases caused by hardware synchronization is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115963812B_ABST
    Figure CN115963812B_ABST
Patent Text Reader

Abstract

The present application discloses a detection method and device for command signal misalignment and a repair method and device, which belong to the field of electromechanical system computer control. The detection method utilizes the idea of ​​autocorrelation function, and can accurately detect the period of signal misalignment caused by the asynchronous clocks of the upper and lower computers (different crystal oscillator periods) through a simple ramp signal. On this basis, by diagnosing and classifying the motion state of the flight simulation turntable in real time, the repair method can realize the repair of the differential jump of the command signal under different motion states, with a low missed judgment rate, and by setting a step-by-step repair method, the signal misalignment problem occurring at one sampling point can be compensated for at multiple sampling points, which can greatly weaken the mutation phenomenon of the command differential signal, significantly improve the control performance of the turntable electromechanical servo system, and ensure the accuracy of the simulation. It can be applied to the detection and repair of the command signal of the flight simulation turntable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method and device for detecting misalignment of a command signal, as well as a method and device for repairing the misalignment of a command signal, and belongs to the field of computer control of electromechanical systems. Background Art

[0002] In electromechanical servo systems such as flight simulation turntables, command signals are generally sent from the host computer to the slave computer, which is then received and executed by the slave computer. Taking the five-axis simulation turntable as an example, its components generally include three major parts: the mechanical table body, the control cabinet, and the isolation transformer cabinet. The electric control cabinet includes an industrial computer and various boards, PLCs, motor drivers, etc. Generally, the user's host computer or simulation machine sends command signals to the turntable control computer and receives the returned data. However, since the clock crystal oscillator frequencies of the host computer and the slave computer always have errors with the standard values ​​and cannot be absolutely the same, the problem of sending and receiving data misalignment may occur during the data transmission process. For example, if the crystal oscillator of the slave computer is slightly faster, after a period of time, the accumulated time error reaches a sampling cycle, which will cause the slave computer to sample the same data sent by the host computer twice in a row. On the contrary, if the crystal oscillator of the lower computer is slightly slower, after a period of time, the data collected by the lower computer twice in a row will just miss the data in the middle of the three data sent continuously by the upper computer. This phenomenon is the signal misalignment caused by the clock asynchrony of the two communication devices (or the difference in crystal oscillator frequency). For continuously changing signals, misalignment will cause the received signal to jump or pause. The size of the signal jump is related to the rate of change of the signal, and the impact of this problem is related to the purpose of the signal. In the flight simulation turntable, the command change rate is fast, and the amplitude change caused by the misalignment of the command signal is large, and the corresponding differential signal will have a large jump. When there is a forward feed or other differential link in the turntable controller, the differential signal jump often causes a sudden change in the control quantity, which not only affects the control and simulation accuracy, but also affects the service life of the system.

[0003] Common solutions to this problem include: 1. Do not use forward feed or other controllers containing differential links. 2. Reduce the bandwidth of the system to weaken the impact. 3. Use an external clock to achieve synchronous data transmission and reception. The first two methods will lose system performance, and the third method, although it solves the problem from a hardware perspective, will increase costs and bring unnecessary expenses. Summary of the invention

[0004] The purpose of the present application is to provide a method and device for detecting and repairing command signal misalignment, which utilizes the periodicity of signal misalignment, adopts a ramp signal as a test signal for analysis to obtain the period of signal misalignment, realizes the detection of command signal misalignment, and repairs the command signal from a software perspective based on this information, thereby solving the problem of command signal misalignment caused by clock asynchrony without increasing costs or losing performance.

[0005] To achieve the above-mentioned purpose, the first aspect of the present application provides a method for detecting misalignment of a command signal, which is applied to a flight simulation turntable, the flight simulation turntable comprising a lower computer and an upper computer for sending a command signal to the lower computer, the detection method comprising:

[0006] Receive a ramp signal sent by a host computer, perform differential processing twice on the ramp signal and obtain a velocity signal and an acceleration signal respectively, wherein the ramp signal includes a plurality of sampling points;

[0007] A target array is obtained according to the ramp signal, the speed signal and the acceleration signal, and an autocorrelation analysis is performed on the target array to obtain a period of signal misalignment and a crystal oscillator state of a lower computer, wherein the target array includes subscripts of a number of sampling points where signal misalignment occurs due to different crystal oscillator periods, and the crystal oscillator state of the lower computer includes a crystal oscillator that is too fast and a crystal oscillator that is too slow;

[0008] Acquire the command signal at the current moment, analyze the command signal at the current moment and the command signals at several moments in the past, and obtain the motion state of the flight simulation turntable at the current moment;

[0009] The command signal at the current moment is detected according to the motion state, the crystal oscillator state and the cycle of the signal misalignment to determine whether the command signal at the current moment is in a misalignment state.

[0010] In one embodiment, performing two differential processes on the ramp signal includes:

[0011] The above-mentioned speed signal is obtained by performing differential processing on the above-mentioned ramp signal through a differential formula, and the above-mentioned differential formula is as follows:

[0012]

[0013] Among them, r_test_diff is the speed signal, r_in is the ramp signal, i is the subscript of the sampling point, and is the preset sampling period;

[0014] The above-mentioned acceleration signal is obtained by performing differential processing on the above-mentioned velocity signal again using the above-mentioned differential formula.

[0015] In one embodiment, the target array is obtained according to the ramp signal, the speed signal and the acceleration signal, and the autocorrelation analysis of the target array includes:

[0016] Several dislocation points are obtained through the following conditional formula:

[0017]

[0018] Among them, r_test_diff2 is the acceleration signal, k is the rate of the ramp signal, α max is the maximum acceleration of the flight simulation turntable;

[0019] The above-mentioned several misalignment points are used as sampling points of signal misalignment caused by different crystal oscillator periods and stored in the posi array to obtain the above-mentioned target array;

[0020] The above target array is subjected to correlation analysis through the following autocorrelation function:

[0021]

[0022] In one embodiment, the above-mentioned motion state includes forward motion, reverse motion and near-stationary motion;

[0023] The above analysis based on the command signal at the current moment and the command signals at several moments in the past, the motion state of the flight simulation turntable at the current moment includes:

[0024] According to the command signal at the current moment and the command signals at several moments in the past, a polynomial fitting based on the least squares method is performed in combination with the preset sampling period to obtain the polynomial coefficients. The polynomial is:

[0025]

[0026] The coefficients of the above polynomial are:

[0027]

[0028] Among them, x i are the values ​​of the sampling periods corresponding to several command signals, X v is the error sum of squares of the command signal in matrix form, Y r A number of command signals in matrix form;

[0029] The speed of the fitting point based on the above polynomial coefficients is:

[0030] υ=result[1]+result[2]·2·6·Δt

[0031] Among them, result[1] is the coefficient of the first-order term, result[2] is the coefficient of the second-order term, the number of fittings in the program is set to 2, and 6 is the value of the sampling period corresponding to the command signal at the current moment;

[0032] When the speed v of the fitting point is greater than 0.01° / s, the above motion state is forward motion, when the speed v of the fitting point is less than -0.01° / s, the above motion state is reverse motion, and when the speed v of the fitting point is between -0.01° / s and 0.01° / s, the above motion state is close to stillness.

[0033] In one implementation, the determining whether the command signal at the current moment is in a misaligned state includes:

[0034] The above motion state is combined with the above crystal oscillator state to obtain a plurality of combined states, and different repair modes are preset for different combined states;

[0035] When the command signal at the current moment is within the preset cycle threshold, the command signal is detected to determine whether the command signal is in any of the above-mentioned combination states. If so, the command signal at the current moment is determined to be in a misaligned state and needs to be repaired, wherein the preset cycle threshold is a cycle T±3;

[0036] Otherwise, it is determined that the command signal at the current moment is in a non-misaligned state and does not need to be repaired. The above steps are repeated to detect the command signal when the command signal at the current moment is within the preset cycle threshold, and to determine whether the command signal is in any one of several combination states until a command signal in a misaligned state is detected.

[0037] A second aspect of the present application provides a method for repairing a misaligned command signal, which is applied to a flight simulation turntable, the flight simulation turntable comprising a lower computer and an upper computer for sending a command signal to the lower computer, the repair method comprising:

[0038] When the command signal at the current moment received by the above-mentioned lower computer is detected by the detection method in the first aspect of the present application or any one of the embodiments of the first aspect of the present application, and it is determined that the command signal at the current moment is in a misaligned state, the following steps are performed:

[0039] According to the preset error value, repair mode and repair steps, the command signal at the current moment is repaired step by step using the following formula:

[0040]

[0041] Among them, the above r_corrected is the repaired command signal, r_real[0] is the command signal at the current moment, max_repairtimes is the number of repair steps, times is the count of the number of repair steps, delta_repair is the error value, and repair_mode is the repair mode.

[0042] The third aspect of the present application provides a detection device for command signal misalignment, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the first aspect or any one of the embodiments of the first aspect when executing the computer program.

[0043] The fourth aspect of the present application provides a device for repairing misaligned command signals, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the second aspect when executing the computer program.

[0044] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, the steps in the first aspect or any one of the embodiments of the first aspect are implemented.

[0045] The sixth aspect of the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, the steps in the second aspect are implemented.

[0046] As can be seen from the above, the present application provides a method and device for detecting command signal misalignment, which utilizes the idea of ​​autocorrelation function. Through a simple ramp signal, the period of signal misalignment caused by the asynchronous clocks of the upper and lower computers (different crystal oscillator periods) can be accurately detected. The detection method is simple, effective and accurate, and solves the problem of how to judge whether the command signal is misaligned from the algorithm level. On this basis, the present application also provides a method and device for repairing command signal misalignment, which repairs the misaligned command signal, and realizes the repair of the differential jump of the command signal under different motion states by real-time diagnosis and classification of the motion state of the flight simulation turntable. The missed judgment rate is low, and by setting a step-by-step repair method, the signal misalignment problem occurring at a command signal sampling point is compensated for at multiple sampling points, which can greatly weaken the mutation phenomenon of the command differential signal, significantly improve the control performance of the turntable electromechanical servo system, ensure the accuracy of the simulation, and overcome the cost increase caused by the traditional method of using hardware synchronization for command signal detection and repair. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 The instruction misalignment that occurs when the crystal oscillator of the lower computer provided in the embodiment of the present application is too fast;

[0049] Figure 2 The second-order difference result of the command signal when the crystal oscillator of the lower computer provided in the embodiment of the present application is too fast;

[0050] Figure 3 The instruction misalignment that occurs when the crystal oscillator of the lower computer provided in the embodiment of the present application is too slow;

[0051] Figure 4 The second-order difference result of the command signal when the crystal oscillator of the lower computer provided in the embodiment of the present application is too slow;

[0052] Figure 5 A schematic diagram of command misalignment when the forward motion and crystal oscillation are too fast provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of command misalignment when the crystal oscillator is too slow in the forward motion provided by the embodiment of the present application;

[0054] Figure 7 A schematic diagram of command misalignment when reverse motion and crystal oscillation are too fast provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of command misalignment when reverse motion and crystal oscillator are too slow provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of the misalignment detection and repair process provided in an embodiment of the present application;

[0057] Fig.10 The algorithm flow chart provided for the embodiment of the present application;

[0058] Fig.11 A sinusoidal command signal sent by the host computer provided in the embodiment of the present application;

[0059] Fig.12 A sinusoidal command signal (crystal oscillator is too fast) received by the lower computer provided in the embodiment of the present application;

[0060] Fig.13 A sinusoidal command signal (the crystal oscillator is too slow) received by the lower computer provided in the embodiment of the present application;

[0061] Fig.14 The program output information provided in the embodiment of the present application (the crystal oscillator is too slow);

[0062] Fig.15 A comparison diagram before and after repair provided in an embodiment of the present application (the crystal oscillator is too slow);

[0063] Fig.16 A partial enlarged comparison diagram before and after repair provided in an embodiment of the present application (the crystal oscillator is too slow);

[0064] Fig.17 A differential comparison diagram of the command signal before and after the repair provided in the embodiment of the present application (the crystal oscillator is too slow);

[0065] Fig.18 The program output information provided in the embodiment of the present application (the crystal oscillator is too fast);

[0066] Fig.19 A comparison chart before and after repair provided in the embodiment of the present application (the crystal oscillator is too fast);

[0067] Fig. 20 A partial enlarged comparison diagram before and after repair provided in an embodiment of the present application (the crystal oscillator is too fast);

[0068] Fig.21 A differential comparison diagram of the command signal before and after the repair provided in the embodiment of the present application (the crystal oscillator is too fast);

[0069] Fig. 22 This is a comparison diagram of the command signals before and after repair when the crystal oscillator is too slow after adding the mutation value provided in the embodiment of the present application. DETAILED DESCRIPTION

[0070] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0071] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0072] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0073] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0074] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0075] Embodiment 1

[0076] The present application embodiment provides a method for detecting misalignment of a command signal, which is applied to a flight simulation turntable, the flight simulation turntable including a lower computer and an upper computer for sending a command signal to the lower computer, the detection method comprising:

[0077] Step 11: receiving a ramp signal sent by a host computer, performing two differential processes on the ramp signal and obtaining a velocity signal and an acceleration signal respectively, wherein the ramp signal includes a plurality of sampling points;

[0078] Optionally, a ramp signal with a rate of k and a sampling point number of DATASIZE sent by the host computer is received and stored, and the ramp signal is recorded as r_in. Then the ramp signal is differentially processed twice. The first differential processing obtains the speed signal and is stored as r_test_diff. The second differential processing obtains the acceleration signal and is stored as r_test_diff2. Among them, k can be any value within the motor limit parameters, and the default value is . When selecting DATASIZE, it should be noted that there can be no less than 2 command signal misalignments during the duration of the ramp signal. The default value of DATASIZE is 100000. If it is not large enough, the size of DATASIZE can be modified. There is no limitation here.

[0079] Specifically, the ramp signal is subjected to a first differential processing by a differential formula to obtain the above speed signal r_test_diff, and the differential formula is as follows:

[0080]

[0081] Among them, r_test_diff is the speed signal, r_in is the ramp signal, i is the subscript of the sampling point, and is the preset sampling period; the above speed signal r_test_diff is further differentially processed by the above differential formula to obtain the acceleration signal r_test_diff2.

[0082] Step 12: Obtain a target array according to the ramp signal r_in, the speed signal r_test_diff and the acceleration signal r_test_diff2, perform autocorrelation analysis on the target array, and obtain the period T of signal misalignment and the crystal oscillator status flag of the lower computer, wherein the target array includes the subscripts i of several sampling points where signal misalignment occurs due to different crystal oscillator periods, and the crystal oscillator status flag of the lower computer includes the crystal oscillator being too fast and the crystal oscillator being too slow;

[0083] Optionally, when screening the misalignment point (i.e., the sampling point where the signal misalignment occurs due to different crystal oscillator periods), since the crystal oscillator period of the lower computer may be shorter or longer than that of the upper computer, it is necessary to discuss the two phenomena separately. When the crystal oscillator period of the lower computer is shorter than that of the upper computer, as the difference in crystal oscillator period accumulates, the final result is After a sampling point, the two sampling points of the lower computer will be located on the same data segment of the upper computer, that is, the two sampling values ​​are the same, thus causing errors. This type of signal misalignment is as follows: Figure 1 As shown, the command signal received by the lower computer at this time is subjected to second-order difference, that is, two-time difference processing, and the following can be obtained: Figure 2 The signal shown. It can be seen that the second-order difference at the misalignment point will have a negative jump, and the second-order difference at the next point of the misalignment point will have a positive jump. When the crystal oscillator period of the lower computer is longer than that of the upper computer, the lower computer will lose the sampling value of a certain point after several samplings, such as Figure 3 As shown, in this case, the second-order differential signal of the command signal obtained by the lower computer is as follows Figure 4 As shown. It can be seen that at this time, the second-order difference of the command signal has a positive jump at the misalignment point, and a negative jump at the next sampling point of the misalignment point. The rule is exactly the opposite of when the crystal oscillator period is short. Therefore, the present embodiment of the application regards the sampling point that satisfies the following conditional formulas at the same time as the misalignment point:

[0084]

[0085] Among them, r_test_diff2 is the acceleration signal, k is the rate of the ramp signal, α maxis the maximum acceleration of the flight simulation turntable; the above-mentioned several offset points are stored in the posi array, and the above-mentioned target array is obtained.

[0086] In practical applications, due to missed sampling and repeated sampling, the theoretical error should be In order to leave a margin, and considering the limitation of the maximum acceleration of the motor itself, the first inequality mentioned above is obtained. Since the value of the sampling point at the next moment will return to the state of synchronization with the host computer, the speed will also return to the normal value. Therefore, the acceleration at the current sampling point and the next sampling point should be the same in size and opposite in sign in theory. In order to leave a margin, the second inequality mentioned above is obtained. The embodiment of the present application uses an array posi[] to store the subscripts of the sampling points. If the sampling point meets the above conditional formula, posi[i] = 100, otherwise it is 0.

[0087] At the same time, two variables are used to store the magnitude relationship between the acceleration of the current sampling point and the acceleration of the next sampling point. When the former is larger than the latter, it is indicated by increasing time_fast by 1, and vice versa, it is indicated by increasing time_slow by 1. Based on this method, the above posi array can be correlated by the following autocorrelation function:

[0088]

[0089] Among them, except that the DC component r(0) is the maximum value, when m is an integer multiple of the period T, r(m) produces an extreme value, otherwise r(m) is 0. In order to screen out the period T where the signal misalignment occurs, the DC component must first be eliminated, and at the same time, the autocorrelation function must be able to decay rapidly as m increases, so that the influence of the extreme value at the integer multiple of T can be eliminated, and finally the m value with the largest r(m) is screened out, which should be T. Therefore, the autocorrelation function actually used in the embodiment of the present application is:

[0090]

[0091] This weighting method can make the denominator of the autocorrelation function increase linearly as m doubles, effectively eliminating the influence of several integer multiples of T on the maximum value of the autocorrelation function. At the same time, according to the size relationship between time_fast and time_slow, it can be judged whether the crystal oscillator period of the lower computer is slower or faster.

[0092] The embodiment of the present application utilizes the idea of ​​autocorrelation function. Through a simple ramp test signal, the period T of the signal misalignment phenomenon caused by the asynchrony of the upper and lower computer clocks can be accurately detected. The test method is simple, effective and accurate. It solves the problem caused by the misalignment of the command signal from the algorithm level and overcomes the disadvantage of increased cost caused by the traditional method of using hardware synchronization.

[0093] Step 13: Obtain the command signal r_cur at the current moment, and analyze the command signal at the current moment and the command signals at several moments in the past to obtain the motion state mode of the flight simulation turntable at the current moment; wherein the motion state mode includes forward motion, reverse motion and near-stationary motion;

[0094] In one application scenario, the above-mentioned motion state mode at the current moment is obtained by analyzing the command signal at the current moment and the command signals at several moments in the past, including:

[0095] First, the command signals of the previous five moments are stored in the r_real array. At the same time, the first-order differential result (i.e., speed signal) corresponding to the r_real array is calculated according to the above differential formula and saved in the r_real_diff array. Then, the r_real_diff array is differentiated to obtain the second-order differential signal and store it in the r_real_diff2 array. In these three arrays, the array table i represents the value before the i moment. For example, r_real_diff[1] represents the first-order differential value of the lower computer command signal at the previous moment. By analogy, r_real[1] to r_real[5] are stored in y[] in reverse order, i.e., y[] = {r_real[5], r_real[4], r_real[3], r_real[2], r_real[1]}. At the same time, according to the above preset sampling period, x[] = {1*delta_s, 2*delta_s, 3*delta_s, 4*delta_s, 5*delta_s}. Then, a polynomial fitting based on the least squares method is performed based on the command signals at the first five moments and the x values ​​(values ​​of the sampling period) corresponding to each command signal. Assume that the fitting polynomial of the embodiment of the present application is:

[0096]

[0097] Then the sum of square errors of each command signal is:

[0098]

[0099] The error sum of squares can be decomposed into a matrix form:

[0100]

[0101] S=(X υ θ-Y r ) T (X υ θ-Y r )

[0102] At this time, for the optimal function, it should satisfy:

[0103]

[0104] Finally, the polynomial coefficients can be obtained as:

[0105]

[0106] Among them, x i are the values ​​of the sampling periods corresponding to several command signals, X v is the error sum of squares of the command signal in matrix form, Y r A number of command signals in matrix form;

[0107] The polynomial coefficients obtained by fitting are stored in the result array, where result[1] stores the coefficients of the first-order term and result[2] stores the coefficients of the second-order term. The sampling period corresponding to the command signal at the current moment is 6. The number of fitting times in the program is set to 2. On the one hand, it is considered that the error of fitting into a straight line is large. When the number of fitting times is high, not only will the Runge phenomenon occur, but the actual motor cannot produce complex motions such as high-order polynomials in such a short time. Therefore, the speed at the fitting point can be obtained.

[0108] When the speed v of the fitting point is greater than 0.01, the above motion state is forward motion, when the speed v of the fitting point is less than -0.01, the above motion state is reverse motion, and when the speed v of the fitting point is between -0.01 and 0.01, the above motion state is close to stillness. Through real-time diagnosis and classification of the system motion state mode, the signal differential jump is repaired under different motion states, and the missed judgment rate is low.

[0109] Step 14: Detect the command signal at the current moment according to the motion state mode, the crystal oscillator state flag and the cycle T of the signal misalignment, and determine whether the command signal at the current moment is in a misalignment state;

[0110] Optionally, when judging whether the command signal at the current moment is in a misaligned state, it is judged whether the command signal at the current moment needs to be repaired according to the misaligned state, and the judgment result is recorded as do_repair. If it is in a misaligned state, it is judged whether the misalignment is caused by the crystal oscillator. If so, the error value delta_repair to be repaired and the repair mode repair_mode to be repaired are given. If the misalignment is not caused by the crystal oscillator, or the current command signal is not misaligned, or the signal is misaligned due to the crystal oscillator but the motor is in a stationary state at this time, there is no need to give the error value to be repaired.

[0111] Optionally, the determining whether the command signal at the current moment is in a misaligned state includes:

[0112] The motion state mode is combined with the crystal state flag to obtain several combination states, and different repair modes are preset for different combination states; when the command signal is within the preset cycle threshold, the command signal is detected to determine whether the command signal at the current moment is any of the several combination states. If so, the command signal at the current moment is determined to be in a misaligned state, and do_repair is set to 1 to indicate that the command signal needs to be repaired, wherein the preset cycle threshold is the cycle T±3 of the signal misalignment;

[0113] Otherwise, it is determined that the command signal at the current moment is in a non-misaligned state, do_repair is set to 0 to indicate that the command signal does not need to be repaired, and then the above-mentioned step of starting to detect the command signal when the command signal is within the preset cycle threshold is repeated to determine whether the command signal at the current moment is any one of the above-mentioned several combination states until a command signal in a misaligned state is detected.

[0114] Specifically, by dividing the motion state at the current moment into forward motion, reverse motion, and near-stationary motion, and combining the two crystal oscillator states of the crystal oscillator being too fast and the crystal oscillator being too slow, the embodiment of the present application combines the two states to obtain several basic combination states, simplifying the originally complex and irregular analysis process into the judgment of the command misalignment caused by uniform motion within a short time interval, greatly simplifying the complexity of the problem. First, define a flag flag_repair that can be repaired, whose initial value is 1, indicating that the misalignment can be repaired at this time. At this time, for each command signal at the current moment, it is divided into the following five states:

[0115] First, let’s introduce the first combination state: forward motion and crystal oscillator too fast. The schematic diagram of the command signal misalignment caused by this combination state is as follows Figure 5 As shown in the figure, v represents the speed of the command signal at the current moment, and v0 represents the speed of the command signal at the previous moment. This kind of command signal caused by signal misalignment caused by the crystal oscillator should meet the following conditions:

[0116]

[0117] For the second combination state: forward motion, crystal oscillator is too slow. The schematic diagram of this command signal misalignment is as follows Figure 6 This kind of command signal caused by signal misalignment caused by the crystal oscillator should meet the following conditions:

[0118]

[0119] For the third combination state: reverse motion, crystal oscillator is too fast. The schematic diagram of this command signal misalignment is as follows Figure 7 This kind of command signal caused by signal misalignment caused by the crystal oscillator should meet the following conditions:

[0120]

[0121] For the fourth combination state: reverse motion, crystal oscillator is too slow. The schematic diagram of this command signal misalignment is as follows Figure 8 This kind of command signal caused by signal misalignment caused by the crystal oscillator should meet the following conditions:

[0122]

[0123] It should be noted that for other combination states: near static, crystal oscillator too fast / too slow. At this time, since the motor speed is close to 0, even if two identical values ​​are collected continuously, or one value is missed, there is almost no performance in the numerical value. Therefore, at this moment, the embodiment of the present application does not judge whether the command signal is in a misaligned state.

[0124] Furthermore, when flag_repair=1, and the above four combined states are detected or the current state is static, flag_repair will be set to 0, and do_repair will be set to 1 (not set to 1 when static), indicating that the command signal at that moment needs to be repaired, and the error value to be repaired is recorded at the same time:

[0125] delta_repair=abs(r_real_diff[1])·Δt

[0126] At the same time, according to the different states, different values ​​of 1 to 4 are assigned to repair_mode (no value is assigned when static), and the counter count is cleared. After that, when the command signal is input again, the detection module does not perform misalignment detection, but only performs the self-increment operation of count++ until count = T-3, which means that the misalignment of the command signal caused by the different crystal oscillator cycles is about to occur again. Only then will flag_repair be set to 1, and the detection module will start working in the next step. If no misalignment of the command signal is detected, it means that the selected detection starting point may be located at the normal command signal mutation point, that is, the starting position is looking for an error, then keep flag_repair = 1 to continue detection until the command misalignment is detected again, reset the starting point, and repeat the above process. The whole process is as follows: Fig. 9 and 10As shown. It can be seen that the detection method provided in the embodiment of the present application takes into account the normal signal mutation phenomenon that may occur when the system is tracking a certain instruction signal, and shields the mutation value that occurs within the period T. It not only has a ±3 fault tolerance margin for the period T caused by the signal misalignment caused by the crystal oscillator error, but also has the ability to re-find the starting point and shield other internal mutation points, effectively reducing the false positive rate and missed positive rate.

[0127] As can be seen from the above, the present application provides a method and device for detecting command signal misalignment, which utilizes the idea of ​​autocorrelation function, and can accurately detect the period of signal misalignment caused by the asynchronous clocks of the upper and lower computers (different crystal oscillator periods) through a simple ramp signal. The detection method is simple, effective and accurate, and solves the problem of how to judge whether the command signal is misaligned from the algorithm level, overcoming the cost increase caused by the traditional method of using hardware synchronization for command signals. On this basis, by performing real-time diagnosis and classification of the motion state of the flight simulation turntable, the repair of the differential jump of the command signal under different motion states can be realized in the subsequent repair process, and the missed judgment rate is low.

[0128] Embodiment 2

[0129] The embodiment of the present application provides a method for repairing a misaligned command signal, which is applied to a flight simulation turntable, the flight simulation turntable including a lower computer and an upper computer for sending a command signal to the lower computer, the repair method comprising:

[0130] When the command signal at the current moment received by the above-mentioned lower computer is detected by the detection method provided in the first embodiment of the present application, and it is determined that the command signal at the current moment is in a misaligned state, the following steps are performed:

[0131] Step 21: According to the preset error value delta_repair, repair mode repair_mode and repair step number max_repairtimes, the command signal at the current moment is repaired step by step through the step-by-step repair formula, and the repaired command signal is stored in the r_corrected array. The command signal can be repaired through r_corrected.

[0132] In one application scenario, each time the judgment part of the signal misalignment is executed, if the value of do_repair is 0, it means that the current command signal does not need to be repaired, so the command signal r_real[0] at the current moment is directly assigned to r_corrected. If the value of do_repair is 1, the repair program is entered, and times_repair is first incremented. If times_repair is greater than max_repairtimes, the step-by-step repair is completed. At this time, r_real[0] is assigned to r_corrected, and do_repair and times_repair are set to 0. In addition, step-by-step repair will be performed according to the different repair_modes. The step-by-step repair formula is:

[0133]

[0134] Wherein, times is the count of the number of repair steps. The embodiment of the present application can significantly reduce the differential value at the misalignment point of the command signal generated by the crystal oscillator through this step-by-step repair design. The normal repair of taking the median or fitting value can reduce the differential value of this point by up to 50%. The step-by-step method adopted in the embodiment of the present application, taking max_repairtimes taking the default value of 20 as an example, can reduce the differential value of this point by 95%, which significantly improves the repair effect and reduces the impact of the motor. And by compensating for the signal misalignment problem that occurs at a command signal sampling point by dividing it into multiple sampling points, the mutation phenomenon of the command differential signal can be greatly weakened, significantly improving the control performance of the turntable electromechanical servo system and ensuring the accuracy of the simulation.

[0135] As can be seen from the above, the embodiment of the present application provides a method for repairing misaligned command signals, and repairs misaligned command signals. By diagnosing and classifying the motion state of the flight simulation turntable in real time, the differential jump of the command signal under different motion states can be repaired, and the missed judgment rate is low. By setting a step-by-step repair method, the signal misalignment problem that occurs at a command signal sampling point can be compensated for at multiple sampling points, which can greatly weaken the mutation phenomenon of the command differential signal, significantly improve the control performance of the turntable electromechanical servo system, and ensure the accuracy of the simulation.

[0136] Embodiment 3

[0137] In order to verify the effectiveness of the method provided in the embodiment of the present application, Fig.10 The method flow chart shown in the figure is designed to perform simulation experiments with a program, and MATLAB is used to simulate the sinusoidal command signal of the actual flight simulation turntable, such as Fig.11As shown in the figure, the amplitude of the host computer's sinusoidal command signal is 2, the frequency is 1.59Hz, its maximum speed and maximum acceleration are both within the common turntable limit parameter range, the sampling interval is set to, and the total duration is about 100s. The purpose of using a sinusoidal signal is that the speed also changes in the form of a cosine signal during the entire signal cycle, which can traverse the common movement modes of the motor. At the same time, it simulates the command signals collected by the lower computer when the crystal oscillator is too fast and too slow, as shown in the figure. Figure 12-13 As shown. The following is a detection method provided in the embodiment of the present application for detection, and a repair method provided in the embodiment of the present application for repairing the misaligned command signal. The specific steps are as follows:

[0138] (1) First, send a ramp signal to the lower computer, input the signal received by the lower computer into the program, and call the getT function to obtain the current crystal oscillator state and crystal oscillator period. Here, the ramp signal received by the lower computer is simulated, the rate k is selected as 1, and the number of sampling points DATASIZE is selected as 100000. The ramp signals collected by the lower computer when the crystal oscillator is too fast and too slow are respectively input. After analysis, the program gives the period T and crystal oscillator state of the current crystal oscillator error. The test results are as follows: Fig.14 , as shown in Figure 18. It can be seen that in the case where the crystal oscillator is too fast or too slow, the program can accurately identify the crystal oscillator state and the period of crystal oscillator error and inform the user.

[0139] (2) According to the actual working conditions and the constraints on the error of the differential value of the command signal, the maximum number of repair steps max_repairtimes is selected. The larger the parameter is, the more steps the error of a single command signal can be repaired in, and the differential signal misalignment of the command signal caused by the different crystal oscillator cycles can be reduced to a greater extent. Here, max_repairtimes=20 is selected because 20 sampling points only account for 3% of a single cycle of the command signal, and the command signal will not change significantly during this period of sampling points.

[0140] (3) At each sampling moment, the command signal currently received by the lower computer is input into the program. In fact, the input here is the generated analog signal. At the same time, the compute function is called to detect and repair the input command signal.

[0141] (4) The program automatically analyzes the motion state of the current command based on the lower computer command signal input at the current moment and the command signals saved at the previous moments. At the same time, using the crystal oscillator error cycle and crystal oscillator state obtained by the previous getT analysis, it starts to find the error point every T-3 sampling points and repairs it step by step according to max_repairtimes. The program finally outputs the repaired command signal.

[0142] (5) Repeat the above process until all command signals are input.

[0143] like Fig.15 , 16, 19, and 20 show the comparison results of the command signal before and after repair when the crystal oscillator is too fast and too slow, respectively. From the enlarged diagram, it can be seen that the method provided in the embodiment of the present application effectively repairs all the misaligned points of the command signal caused by the crystal oscillator error, and the repair is carried out in multiple steps. Fig.17 ,21 shows the single difference result of the signal before and after repair, that is, the corresponding speed signal. It has been verified that the jump of the speed signal after repair is reduced by about 94% compared with the jump of the speed signal before repair, which greatly weakens the influence of the misalignment caused by the different crystal oscillator cycles on the speed signal. If the maximum repair step number max_repairtimes is increased, the repair effect will be further enhanced.

[0144] In order to verify that the embodiment of the present application can avoid misjudgment of the normal instruction mutation value sandwiched in the misaligned signal, a mutation signal with a random position and an amplitude of 0.5 is added to the test signal. The repair result is as follows: Fig. 22 As shown, the black dotted line in the figure is the position where the instruction misalignment caused by the different crystal oscillator cycles occurs. It can be clearly seen that the program can automatically shield other mutation signals within the crystal oscillator cycle and do not repair them. In this way, the missed judgment rate can be greatly reduced under the premise of ensuring the missed judgment rate, and the normal instruction signal mutation value point and the misalignment point caused by the different crystal oscillator cycles are effectively distinguished. The method for detecting and repairing instruction signal misalignment proposed in the embodiment of the present application is shown to have many excellent performances, such as automatically solving the crystal oscillator error cycle and crystal oscillator state, low misjudgment rate, low missed judgment rate, shielding normal instruction mutation signals, step-by-step compensation, and greatly reducing the misalignment of the signal after differentiation.

[0145] Embodiment 4

[0146] The embodiment of the present application provides a detection device for command signal misalignment, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory is used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and the processor are connected via a bus. Specifically, the processor implements any step in the above-mentioned embodiment 1 by running the computer program stored in the memory.

[0147] The embodiment of the present application provides a repair device for command signal misalignment, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory is used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and the processor are connected via a bus. Specifically, the processor implements any step in the above-mentioned embodiment 2 by running the computer program stored in the memory.

[0148] In one application scenario, the above-mentioned detection device and / or repair device may be an independent device respectively set for the detection method and / or repair method, and can be used in conjunction with the above-mentioned flight simulation turntable to realize the detection and / or repair of the misalignment of the command signal. In other application scenarios, the above-mentioned detection device and / or repair device may also be embedded in the system of the flight simulation turntable, such as embedded in the lower computer. In this case, the lower computer can store the software program and module corresponding to the above-mentioned detection method and / or repair method, and run the software program and module through its processor, thereby executing various functional applications and data processing, and realizing the detection and / or repair of the misalignment of the command signal.

[0149] It should be understood that in the embodiments of the present application, the processor referred to may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0150] The memory may include a read-only memory, a flash memory, and a random access memory, and provides instructions and data to the processor. A part or all of the memory may also include a nonvolatile random access memory.

[0151] As can be seen from the above, the present application provides a detection device for command signal misalignment, which utilizes the idea of ​​autocorrelation function. Through a simple ramp signal, the period of signal misalignment caused by the asynchronous clocks of the upper and lower computers (different crystal oscillator periods) can be accurately detected. The detection method is simple, effective and accurate. It solves the problem of how to judge whether the command signal is misaligned from the algorithm level, and overcomes the cost increase caused by the traditional method of using hardware synchronization for command signals. On this basis, the present application also provides a repair device for command signal misalignment to repair the misaligned command signal. By performing real-time diagnosis and classification of the motion state of the flight simulation turntable, the repair of the differential jump of the command signal under different motion states is realized, and the missed judgment rate is low. By setting a step-by-step repair method, the signal misalignment problem occurring at a command signal sampling point is divided into multiple sampling points for compensation, which can greatly weaken the mutation phenomenon of the command differential signal, significantly improve the control performance of the turntable electromechanical servo system, and ensure the accuracy of the simulation.

[0152] It should be understood that the above-mentioned integrated module / unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0153] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0154] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0155] It should be noted that the methods and detailed examples provided in the above embodiments can be combined with the devices and equipment provided in the embodiments, and references can be made to each other, and no further details will be given.

[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0157] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / equipment embodiments described above are only schematic, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0158] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting misalignment of a command signal, applied to a flight simulation turntable, the flight simulation turntable comprising a lower computer and an upper computer for sending a command signal to the lower computer, characterized in that: The detection method comprises: Receive a ramp signal sent by a host computer, perform differential processing twice on the ramp signal and obtain a velocity signal and an acceleration signal respectively, wherein the ramp signal includes a plurality of sampling points; A target array is obtained according to the ramp signal, the speed signal and the acceleration signal, and an autocorrelation analysis is performed on the target array to obtain a period of signal misalignment and a crystal oscillator state of a lower computer, wherein the target array includes subscripts of a number of sampling points where signal misalignment occurs due to different crystal oscillator periods, and the crystal oscillator state of the lower computer includes a crystal oscillator that is too fast and a crystal oscillator that is too slow; Acquire the command signal at the current moment, and analyze the command signal at the current moment and the command signals at several moments in the past to obtain the motion state of the flight simulation turntable at the current moment; Detecting the command signal at the current moment according to the motion state, the crystal oscillator state and the cycle of the signal misalignment, and determining whether the command signal at the current moment is in a misaligned state; The step of obtaining a target array according to the ramp signal, the speed signal and the acceleration signal, and performing autocorrelation analysis on the target array comprises: Several dislocation points are obtained through the following conditional formula: Among them, r_test_diff2 is the acceleration signal, k is the rate of the ramp signal, α max is the maximum acceleration of the flight simulation turntable; The plurality of misalignment points are used as sampling points where signal misalignment occurs due to different crystal oscillator periods and stored in a posi array to obtain the target array; The target array is subjected to correlation analysis by the following autocorrelation function: 。 2. The detection method according to claim 1, characterized in that The performing two differential processes on the ramp signal comprises: The ramp signal is differentially processed by a differential formula to obtain the speed signal, and the differential formula is as follows: Among them, r_test_diff is the speed signal, r_in is the ramp signal, and i is the subscript of the sampling point. is the preset sampling period; The velocity signal is subjected to differential processing again using the differential formula to obtain the acceleration signal.

3. The detection method according to claim 2, characterized in that The motion state includes forward motion, reverse motion and near-stationary motion; The analysis of the command signal at the current moment and the command signals at several moments in the past to obtain the motion state of the flight simulation turntable at the current moment includes: According to the command signal at the current moment and the command signals at several moments in the past, a polynomial fitting based on the least squares method is performed in combination with the preset sampling period to obtain the polynomial coefficients, and the polynomial is: The polynomial coefficients are: Wherein, xi is the value of the sampling period corresponding to a number of command signals, Xv is the error sum of the command signals in matrix form, and Yr is a number of command signals in matrix form; The speed of the fitting point based on the polynomial coefficients is: Among them, result[1] is the coefficient of the first-order term, result[2] is the coefficient of the second-order term, the number of fittings in the program is set to 2, and 6 is the value of the sampling period corresponding to the command signal at the current moment; When the velocity v of the fitting point is greater than 0.01 When the velocity v of the fitting point is less than -0.01, the motion state is positive motion. When the speed v of the fitting point is between -0.01 and 0.01 When the motion state is between 0 and 1, the motion state is close to stillness.

4. The detection method according to claim 3, characterized in that The determining whether the command signal at the current moment is in a misaligned state comprises: The motion state and the crystal oscillator state are combined to obtain a plurality of combined states, and different repair modes are preset for different combined states; When the command signal at the current moment is within the preset cycle threshold, the command signal is detected to determine whether the command signal is in any of the several combination states. If so, the command signal at the current moment is determined to be in a misaligned state and needs to be repaired, wherein the preset cycle threshold is a cycle T±3; Otherwise, it is determined that the command signal at the current moment is in a non-misaligned state and does not need to be repaired, and the step of starting to detect the command signal when the command signal at the current moment is within the preset cycle threshold and determining whether the command signal is in any of the several combination states is repeated until a command signal in a misaligned state is detected.

5. A method for repairing command signal misalignment, applied to a flight simulation turntable, the flight simulation turntable comprising a lower computer and an upper computer for sending command signals to the lower computer, characterized in that: The repair method comprises: When the command signal at the current moment received by the lower computer is detected by the detection method described in any one of claims 1 to 4, and it is determined that the command signal at the current moment is in a misaligned state, the following steps are performed: According to the preset error value, repair mode and repair steps, the command signal at the current moment is repaired step by step using the following formula: Among them, r_corrected is the repaired command signal, r_real[0] is the command signal at the current moment, max_repairtimes is the number of repair steps, times is the count of the number of repair steps, delta_repair is the error value, and repair_mode is the repair mode.

6. A detection device for command signal misalignment, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

7. A repair device for command signal misalignment, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to claim 5 when executing the computer program.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 5 are implemented.

Citation Information

Patent Citations

  • Time-sloped capacitance measuring circuits and methods

    CN101910849A

  • Semi-physical simulation system and method of hypersonic flight vehicle navigation and control system

    CN109634139A

  • Simulation test method and system for processor cooperative chip and related components

    CN111639470A