A method for detecting replay attacks on unmanned vessels based on watermark signals

By introducing the extended Kalman filter and Gaussian distributed watermark signal into the unmanned ship system to construct encoding and decoding signals, the deficiencies in replay attack detection in the unmanned ship detection method are solved and accurate detection of replay attacks is achieved. and control performance protection.

CN117891172BActive Publication Date: 2024-08-27SHAANXI YANCHUANG ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410068384.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-17
Publication Date
2024-08-27
Estimated Expiration
2044-01-17

AI Technical Summary

Technical Problem

Existing unmanned ship detection methods fail to effectively consider the detection of replay attacks, especially in terms of control performance impact, making it difficult to accurately and efficiently detect replay attacks when malicious network attacks occur.

Method used

The detection method based on the watermark signal is adopted, and the optimal unbiased state estimate of the unmanned ship system is derived by introducing the extended Kalman filter, and the Gaussian distributed watermark signal is added to the control signal to construct the encoding and decoding signals to Counteract the impact of watermark signals on measurements and system state estimates to detect replay attacks.

Benefits of technology

It achieves accurate detection when the unmanned ship is subject to a replay attack without negatively affecting the system control signal, significantly improving the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891172B
    Figure CN117891172B
Patent Text Reader

Abstract

The purpose of the present invention is to provide a detection method for replay attacks on unmanned ships based on watermark signals, which belongs to the field of ship control technology. The method first introduces an extended Kalman filter into the unmanned ship system, derives the optimal unbiased state estimation value of the unmanned ship system, and then adds a watermark signal that conforms to the Gaussian distribution to the control signal; in addition, a coding signal and a decoding signal are constructed according to the watermark signal to offset the influence of the watermark signal on the measurement value and the system state estimation, and expand the value of the detection function, thereby completing the detection of the attack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of ship control, and in particular relates to a method for detecting a replay attack on an unmanned ship based on a watermark signal. Background Art

[0002] Unmanned ships are highly automated equipment with the advantages of intelligence, low cost and high efficiency. Compared with traditional ships, its advantage is that it can replace humans to perform repetitive, tedious and dangerous tasks in complex, harsh and changeable seas. In the era of Internet communication information transmission, the development and application of unmanned ships are advancing rapidly; at the same time, the network information security issues faced by unmanned ships are gradually emerging. In an open network environment, the data transmitted by unmanned ships may encounter various forms of network attacks, which has become one of the main problems restricting the progress of the industry; especially replay attacks, attackers do not need to understand the specific operation mode and purpose of the unmanned ship, nor do they need to crack the system monitoring equipment of the unmanned ship, they can change the transmission information to launch an attack and disrupt the normal operation of the unmanned ship.

[0003] From the existing research results, the relevant detection technology solutions for replay attacks are mainly concentrated in power systems and industrial control systems. [1][2] However, the existing detection methods related to unmanned ships, especially the detection research on replay attacks in unmanned ships, do not consider the impact on control performance. [3] Under the trend of high informatization and cyber-physical collaboration, accurate and efficient detection of replay attacks occurring during the normal operation of unmanned ships is of practical significance.

[0004] Therefore, as unmanned ships are widely used but often accompanied by malicious network attacks, it is very necessary to propose an effective method to detect replay attacks in unmanned ships.

[0005] [1] Meng Wenchao, Yan Jinzhou, Zhu Jianxin, Chu Zhuyu, Lin Wei, Chen Xuechao, He Shibo, Yang Qinmin, Yuan Linsong, Gu Chaojie. A lightweight model automatic search method for power grid false data injection attack detection[P]. Zhejiang Province: CN116886397A, 2023-10-13.

[0006] [2] Sun Limin, Chen Xin, Fu Jiale, Lu Xiao, Lü Shichao, Li Zhi. PLC runtime attack detection method and system for industrial control systems[P]. Beijing: CN116880343A, 2023-10-13.

[0007] [3] Long Yue, Liu Qidong, Li Tieshan, et al. A fault detection method for networked unmanned ships under replay attacks[P]. Sichuan Province: CN 115328142B, 2023-09-15. Summary of the invention

[0008] In view of the problems existing in the background technology, the purpose of the present invention is to provide a detection method for replay attacks on unmanned ships based on watermark signals. The method first introduces an extended Kalman filter into the unmanned ship system, derives the optimal unbiased state estimate of the unmanned ship system, and then adds a watermark signal that conforms to the Gaussian distribution to the control signal; in addition, a coding signal and a decoding signal are constructed according to the watermark signal to offset the influence of the watermark signal on the measurement value and the system state estimate, and expand the value of the detection function, thereby completing the detection of the attack.

[0009] To achieve the above object, the technical solution of the present invention is as follows:

[0010] A method for detecting a replay attack on an unmanned ship based on a watermark signal comprises the following steps:

[0011] Step 1: Combined with the actual operation of the unmanned ship, simplify the dynamic model of the unmanned ship, including the kinematic equation and the dynamic equation, where:

[0012] The kinematic equation is:

[0013] The kinetic equation is:

[0014] is the position information of the unmanned ship in the earth coordinate system, φ(t) is the heading angle information, v(t) is the ship's own information, and the matrices M, N, and G represent the ship's inertia matrix, damping matrix, and mooring force matrix, respectively; η(t) represents the control input of the ship, and w(t) represents the disturbance caused by waves when the ship is running; represents the differential of the parameter; J(·) represents the nonlinear transfer matrix;

[0015] Step 2: Convert the simplified unmanned ship dynamics model in step 1 into a state space model, and then introduce a zero-order holder to discretize the unmanned ship to obtain the state equation and measurement equation of the discrete TS fuzzy system with unknown membership function;

[0016] Step 3: Based on the extended Kalman filter, according to the minimum mean square deviation criterion, the optimal unbiased state estimate of the system in step 2 is obtained Specifically:

[0017]

[0018] in, is the state prediction equation, L(k) is the Kalman filter gain matrix update equation, L(k) = (Φ(k)P(k|k-1)C(k)T +R v )(C(k)P(k|k-1)C T (k)+R v ) -1 ; P(k|k-1) is the state prediction error covariance matrix update equation, P(k|k-1)=Φ(k)P(k-1|k-1)Φ T (k)+R w ;

[0019] and

[0020] represents the estimation, η(k) is the control input of the ship, R v =E(v(k)v T (k)), R w =E(w(k)w T (k)), R wv =E(w(k)v T (k)), E(·) is the expectation, B di and A di They are the system matrix and control matrix of the discrete unmanned ship system respectively;

[0021] Step 4: Construct the residual r(k) according to the state equation in step 2 and the extended Kalman filter state prediction equation in step 3. The specific process is:

[0022]

[0023] Step 5: Add a known Gaussian noise signal that satisfies a certain distribution as a watermark signal Δη(k) to the control signal. The unmanned ship system with the watermark signal added is:

[0024]

[0025] in,(·) * represents the system parameters after adding the watermark signal, a(k) is the coded signal, ν(k) is the measurement noise, and w di (k) is process noise;

[0026] Step 6: According to the watermark signal in step 5, construct the encoding and decoding signals, and inject them into the sensor output and state estimator input respectively. The specific process is as follows:

[0027] Encoded signal x a (k) is:

[0028]

[0029] a(k)=Cxa (k)

[0030] Decoded signal x d (k) is:

[0031]

[0032] d(k)=-2Cx d (k)

[0033] = -2a(k)

[0034] Injected into the sensor output and the state estimator input respectively;

[0035] At this time, the residual value r when the system is attacked rea (k) is expressed as,

[0036]

[0037] Among them, r q (k) is the residual value when the system is operating normally, is the state prediction equation for normal ship operation, d(k) is the value of the decoded signal when a replay attack occurs, and d q (k) the value of the decoded signal when the system is operating normally;

[0038] Step 7: According to the system state function after adding the watermark signal in step 5 and the residual value in step 6, the residual detection function value g after the system is attacked by replay is obtained. rea (k) specifically,

[0039]

[0040] Among them, g q (k) is the value of the residual detection function when the unmanned ship system is not attacked, Δη(ki-1) is the value of the watermark signal when the replay attack occurs, Δη q (ki-1) is the value of the watermark signal when no replay attack occurs, is the covariance of the system residual when the unmanned ship system is attacked, represents the two-norm;

[0041] Step 8: According to actual needs, based on the residual detection function value g after the replay attack in step 7 rea (k), formulate thresholds and alarm strategies. When the residual detection function value g(k) obtained by real-time detection is greater than the preset residual detection function threshold, an alarm is triggered; otherwise, no alarm is triggered, thereby completing the attack detection. The specific process is as follows:

[0042]

[0043] Among them, g th Represents the preset residual detection function threshold; when event H1 is met, that is, when the detection function value exceeds the specified threshold, an abnormal alarm will be triggered, indicating that the system is under attack; otherwise, it means that the system is running normally, that is, event H0 conditions are met.

[0044] Furthermore, in step 1, the actual operation of the unmanned ship is as follows: the influence of the control input η(t) on the system is completely known, and the heading angle ψ(t) varies between -π / 6 and π / 6.

[0045] Furthermore, in step 1, the location information of the unmanned ship Contains coordinate information x(t), y(t), and heading angle information ψ(t). The ship’s own information v(t) includes the unmanned ship’s sway velocity ρ(t), sway velocity θ(t) and bow pitch velocity r(t), v(t) = [ρ(t) θ(t) r(t)] T , T represents transpose.

[0046] Furthermore, the specific process of step 2 is:

[0047] Step 2.1. Let A = -M -1 G,B=-M -1 W,D=M -1 , taking the origin as the reference coordinate point, then ζ(t)=v(t)-v ref , v ref is the reference coordinate, v ref =0; Assume the ocean depth The fuzzy set is Then the TS fuzzy unmanned ship system is:

[0048]

[0049]

[0050] y(t)=Cζ(t)

[0051] Among them, i is the i-th fuzzy subsystem, is the number of fuzzy subsystems, preferably 4, ω(t)=[ω1(t)ω2(t)ω3(t)] T The matrix A includes the multi-source interference of wind, waves, and ocean currents on unmanned ships and the impact of mooring force in the working environment. i ,D i , C are all known coefficient matrices; y(t) is the measurement equation of the system; v ref is the ship's own information in the reference coordinate system; () -1 Indicates inversion; It is expressed as the corresponding membership function under different fuzzy rules, represents the premise variable, represents a fuzzy set;

[0052] Step 2.2. Introduce the zero-order holder into the TS fuzzy unmanned ship system and obtain the discrete fuzzy system as follows:

[0053]

[0054] Step 2.3. Solve the state equation and measurement equation of the TS fuzzy system with unknown membership function, where:

[0055] The state equation is,

[0056] The measurement equation is, y(t) = Cζ(t);

[0057] is the membership function corresponding to different fuzzy rules.

[0058] Furthermore, in step 2, Right now Membership function The sum of is 1, and

[0059] Furthermore, in step 4, r(k) has a mean of 0 and a covariance of Ψ η The standard normal distribution of η =CPC T .

[0060] Furthermore, in step 5, the distribution of the physical watermark Δη(k) is: Δη(k)~N(0,Ψ η ), N(0,Ψ η ) means that the mean is 0 and the covariance is Ψ η The standard normal distribution of .

[0061] Furthermore, in step 6, x a (0) = 0, x d (0)=0.

[0062] Furthermore, in step 8, the preset residual detection function threshold g th According to the given false alarm rate α * Design, the design rules are:

[0063] Prob((r(k)) T ∑ r -1 r(k)|H0)<α * ;

[0064] r(k) is the residual value of the system, ∑ r -1 is the inverse of the covariance of the residual, and event H0 is recorded as the normal operation of the system.

[0065] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0066] In the aspect of replay attack detection in an unmanned marine vehicle system (UMV), the present invention uses the TS fuzzy method to process the nonlinearity in the UMV; in order to identify the replay attack occurring in the UMV, an extended Kalman filter is used to obtain the optimal estimate, and a watermark signal that conforms to a certain Gaussian noise is added to the control input of the system, and a coding signal and a decoding signal are constructed according to the watermark signal, and are added to the input of the sensor output and the state estimation respectively, thereby obtaining a more obvious residual change without negatively affecting the system control signal, and effectively detecting the replay attack. The method of the present invention can accurately detect the occurrence of the attack when the unmanned marine vehicle is subjected to a replay attack. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 This is a schematic diagram of the principle of detecting replay attacks based on watermark signals according to the present invention.

[0068] Figure 2 The value of the function g(x) is detected when the unmanned ship is operating normally.

[0069] Figure 3 To set the watermark signal variance to 0.3125, the attacker records the data and replays it within a period of 50s to 150s.

[0070] Figure 4 To set the watermark signal variance to 0.3125, the attacker records the data and replays it from 80s to 200s.

[0071] Figure 5 To set the watermark signal variance to 0.3125, the attacker records the data and replays it from 40s to 90s and from 140s to 190s.

[0072] Figure 6 To set the watermark signal variance to 0.3125, the attacker records the data and replays it during the period from 20s to 40s, 60s to 80s, 100s to 120s, 140s to 160s, and 180s to 200s.

[0073] Figure 7When the variance of the watermark signal is set to 0.2514, the attacker records the data and replays it from 80s to 200s.

[0074] Figure 8 To set the watermark signal variance to 0.2514, the attacker records the data and replays it during the period from 20s to 40s, 60s to 80s, 100s to 120s, 140s to 160s, and 180s to 200s.

[0075] Fig. 9 The figure is a comparison diagram of the impact of the invention and the prior art on the system control performance when the unmanned ship is attacked by replay. DETAILED DESCRIPTION

[0076] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the implementation modes and the accompanying drawings.

[0077] A method for detecting a replay attack on an unmanned ship based on a watermark signal comprises the following steps:

[0078] Step 1: Combined with the actual operation of the unmanned ship, simplify the dynamic model of the unmanned ship, including the kinematic equation and the dynamic equation, where:

[0079] The kinematic equation is:

[0080] The kinetic equation is:

[0081] is the position information of the unmanned ship in the earth coordinate system, φ(t) is the heading angle information, v(t) is the ship's own information, and the matrices M, N, and G represent the ship's inertia matrix, damping matrix, and mooring force matrix, respectively; η(t) represents the control input of the ship, and w(t) represents the disturbance caused by waves when the ship is running; represents the differential of the parameter; J(·) represents the nonlinear transfer matrix;

[0082] Step 2: Convert the simplified unmanned ship dynamics model in step 1 into a state space model, and then introduce a zero-order holder to discretize the unmanned ship to obtain the state equation and measurement equation of the discrete TS fuzzy system with unknown membership function;

[0083] Step 3: Based on the extended Kalman filter, according to the minimum mean square deviation criterion, the optimal unbiased state estimate of the system in step 2 is obtained Specifically:

[0084]

[0085] in, is the state prediction equation, L(k) is the Kalman filter gain matrix update equation, L(k) = (Φ(k)P(k|k-1)C(k) T +R v )(C(k)P(k|k-1)C T (k)+R v ) -1 ; P(k|k-1) is the state prediction error covariance matrix update equation, P(k|k-1)=Φ(k)P(k-1|k-1)Φ T (k)+R w ;

[0086] and

[0087] represents the estimation, η(k) is the control input of the ship, R v =E(v(k)v T (k)), R w =E(w(k)w T (k)), R wv =E(w(k)v T (k)), E(·) is the expectation, B di and A di They are the system matrix and control matrix of the discrete unmanned ship system respectively;

[0088] Step 4: Construct the residual r(k) according to the state equation in step 2 and the extended Kalman filter state prediction equation in step 3. The specific process is:

[0089]

[0090] Step 5: Add a known Gaussian noise signal that satisfies a certain distribution as a watermark signal Δη(k) to the control signal. The unmanned ship system with the watermark signal added is:

[0091]

[0092] in,(·) * represents the system parameters after adding the watermark signal, a(k) is the coded signal, ν(k) is the measurement noise, and w di (k) is process noise;

[0093] Step 6: According to the watermark signal in step 5, construct the encoding and decoding signals, and inject them into the sensor output and state estimator input respectively. The specific process is as follows:

[0094] Encoded signal xa (k) is:

[0095]

[0096] a(k)=Cx a (k)

[0097] Decoded signal x d (k) is:

[0098]

[0099] d(k)=-2Cx d (k)

[0100] = -2a(k)

[0101] Injected into the sensor output and the state estimator input respectively;

[0102] At this time, the residual value r when the system is attacked rea (k) is expressed as,

[0103]

[0104] Among them, r q (k) is the residual value when the system is operating normally, is the state prediction equation for normal ship operation, d(k) is the value of the decoded signal when a replay attack occurs, and d q (k) the value of the decoded signal when the system is operating normally;

[0105] Step 7: According to the system state function after adding the watermark signal in step 5 and the residual value in step 6, the residual detection function value g after the system is attacked by replay is obtained. rea (k) specifically,

[0106]

[0107] Among them, g q (k) is the value of the residual detection function when the unmanned ship system is not attacked, Δη(ki-1) is the value of the watermark signal when the replay attack occurs, Δη q (ki-1) is the value of the watermark signal when no replay attack occurs, is the covariance of the system residual when the unmanned ship system is attacked, represents the two-norm;

[0108] Step 8: According to actual needs, based on the residual detection function value g after the replay attack in step 7 rea(k), formulate thresholds and alarm strategies. When the residual detection function value g(k) obtained by real-time detection is greater than the preset residual detection function threshold, an alarm is triggered; otherwise, no alarm is triggered, thereby completing the attack detection. The specific process is as follows:

[0109]

[0110] Among them, g th Represents the preset residual detection function threshold; when event H1 is met, that is, when the detection function value exceeds the specified threshold, an abnormal alarm will be triggered, indicating that the system is under attack; otherwise, it means that the system is running normally, that is, event H0 conditions are met.

[0111] The principle diagram of detecting replay attacks based on watermark signals is as follows: Figure 1 As shown, the watermark signal Δη(k) is injected into the control signal, and the encoded signal a(k) generated according to the watermark signal is injected into the output end of the sensor, and then the decoded signal d(k) is added to the receiving end of the Kalman filter, and finally the residual detector is used to detect the replay attack on the system.

[0112] Example 1

[0113] In the simulation process, it is assumed that the interference signal is in the form of ω1(k)=0.27F1(s)N1(k)N2(k), ω2(k)=-0.6cos(1.6k)e -0.12k ,ω3(k)=0.58F2(k)N3(k)N4(k), where The wave strength is designed to be K w1 ,K w2 , respectively 0.2 and 0.8; damping coefficients are h1, h2, respectively 0.2 and 1.7; where N1(t), N3(t) are white noises with energies of 2.69 and 1.56, is the frequency of the ocean wave, Represents the meaning of definition,

[0114] The variance of the watermark signal is set to 0.3125. The attacker records the measurement data in the time period from 1s to 50s and replays it in different time periods. The detection results of the detection method of the present invention are as follows: Figures 3 to 6 shown.

[0115] The value of the detection function g(x) when the unmanned ship is operating normally is as follows Figure 2 As shown in the figure, it can be seen that when the unmanned ship is operating normally, the value of the detection function is within the threshold and no alarm is triggered.

[0116] Example 2

[0117] According to the method of the embodiment, the detection is performed, only the value of the watermark signal variance is adjusted to 0.2514, and the playback time period is adjusted from 80s to 200s, and from 20s to 40s, 60s to 80s, 100s to 120s, 140s to 160s, and 180s to 200s; other things remain unchanged, and the detection results are as follows: Figure 7 and Figure 8 shown.

[0118] Figure 3 In the case where the variance of the watermark signal is set to 0.3125, the attacker records the measurement data from 1s to 50s, and replays it from 50s to 150s. It can be seen that the continuous replay attack during the operation of the unmanned ship can be effectively detected, and after the attack, the value of the error detection function is within the threshold again.

[0119] Figure 4 When the variance of the watermark signal is set to 0.3125, the attacker records the measurement data from 1s to 50s and replays it from 80s to 200s. It can be seen that effective detection can be achieved when continuous replay attacks occur during the operation of the unmanned ship until the unmanned ship ends its operation.

[0120] Figure 5 In order to set the variance of the watermark signal to 0.3125, the attacker recorded the measurement data from 1s to 50s, and replayed it from 40s to 90s and 140s to 190s. When the unmanned ship is subjected to multiple long-term replay attacks during operation, a better detection effect can be obtained.

[0121] Figure 6 In order to set the variance of the watermark signal to 0.3125, the attacker recorded the measurement data from 1s to 50s, and replayed it from 20s to 40s, 60s to 80s, 100s to 120s, 140s to 160s, and 180s to 200s. When the unmanned ship is attacked by multiple short-term replay attacks during operation, a better detection effect can be obtained.

[0122] Figure 7 In the case where the watermark signal variance is set to 0.2514, the attacker records the measurement data from 1s to 50s, and replays it from 80s to 200s. Compared with the case where the watermark signal variance is 0.3125, although the replay attack can be detected, there will be more missed detections.

[0123] Figure 8In order to set the watermark signal variance value to 0.2514, the attacker recorded the measurement data from 1s to 50s, and replayed it from 20s to 40s, 60s to 80s, 100s to 120s, 140s to 160s, and 180s to 200s. Compared with the case where the watermark signal variance value is 0.3125, although the replay attack can also be detected, there will be more missed detections.

[0124] Fig. 9 This is a comparison chart of the impact of the present invention and the prior art (Han-xiao Liu, Yi-lin Mo, Ji-qi Xie, Karl HJohansson. An Online Approach to Physical Watermark Design. 65(9): 3895-3902, 2020.) on the system control performance when the unmanned ship is attacked by replay. It can be seen from the figure that under the same watermark and attack mode, as the detection rate increases, the performance loss of the present invention and the prior art will increase, but the control performance loss of this solution is smaller.

[0125] The above description is only a specific implementation mode of the present invention. Any feature disclosed in this specification, unless otherwise stated, can be replaced by other alternative features that are equivalent or have similar purposes; all the disclosed features, or all the steps in the methods or processes, except for mutually exclusive features and / or steps, can be combined in any way.

Claims

1. A detection method for replay attacks on unmanned ships based on watermark signals. It is characterized in that The following steps are involved: Step 1: Combined with the actual operation of the unmanned ship, simplify the dynamic model of the unmanned ship, including the kinematic equation and the dynamic equation, where: The kinematic equation is: The kinetic equation is: is the position information of the unmanned ship in the earth coordinate system, φ(t) is the heading angle information, v(t) is the ship's own information, and the matrices M, N, and G represent the ship's inertia matrix, damping matrix, and mooring force matrix, respectively; η(t) represents the control input of the ship, and w(t) represents the disturbance caused by waves when the ship is running; represents the differential of the parameter; J(·) represents the nonlinear transfer matrix; Step 2: Convert the simplified unmanned ship dynamics model in step 1 into a state space model, and then introduce a zero-order holder to discretize the unmanned ship to obtain the state equation and measurement equation of the discrete TS fuzzy system with unknown membership function; Step 3: Based on the extended Kalman filter, according to the minimum mean square deviation criterion, the optimal unbiased state estimate of the system in step 2 is obtained Specifically: in, is the state prediction equation, L(k) is the Kalman filter gain matrix update equation, L(k) = (Φ(k)P(k|k-1)C(k) T +R v )(C(k)P(k|k-1)C T (k)+R v ) -1 ; P(k|k-1) is the state prediction error covariance matrix update equation, P(k|k-1)=Φ(k)P(k-1|k-1)Φ T (k)+R w ;and C(k)=C, C is a known coefficient matrix; represents the estimation, η(k) is the control input of the ship, R v =E(v(k)v T (k)), R w =E(w(k)w T (k)), R wv =E(w(k)v T (k)), E(·) is the expectation, B di and A di They are the system matrix and control matrix of the discrete unmanned ship system respectively; Step 4: Construct the residual r(k) according to the state equation in step 2 and the extended Kalman filter state prediction equation in step 3. The specific process is: Step 5: Add a known Gaussian noise signal that satisfies a certain distribution as a watermark signal Δη(k) to the control signal. The unmanned ship system with the watermark signal added is: in,(·) * represents the system parameters after adding the watermark signal, a(k) is the coded signal, ν(k) is the measurement noise, and w di (k) is process noise; Step 6: According to the watermark signal in step 5, construct the encoding and decoding signals, and inject them into the sensor output and state estimator input respectively. The specific process is as follows: Encoded signal x a (k) is: Decoded signal x d (k) is: Injected into the sensor output and the state estimator input respectively; At this time, the residual value r when the system is attacked rea (k) is expressed as, Among them, r q (k) is the residual value when the system is operating normally, is the state prediction equation for normal ship operation, d(k) is the value of the decoded signal when a replay attack occurs, and d q (k) the value of the decoded signal when the system is operating normally; Step 7: According to the system state function after adding the watermark signal in step 5 and the residual value in step 6, the residual detection function value g after the system is attacked by replay is obtained. rea (k) specifically, Among them, g q (k) is the value of the residual detection function when the unmanned ship system is not attacked, Δη(ki-1) is the value of the watermark signal when the replay attack occurs, Δη q (ki-1) is the value of the watermark signal when no replay attack occurs, is the covariance of the system residual when the unmanned ship system is attacked, represents the two-norm; Step 8: According to actual needs, based on the residual detection function value g after the replay attack in step 7 rea (k), formulate thresholds and alarm strategies. When the residual detection function value g(k) obtained by real-time detection is greater than the preset residual detection function threshold, an alarm is triggered; otherwise, no alarm is triggered, thereby completing the attack detection. The specific process is as follows: Among them, g th Represents the preset residual detection function threshold; when the event H is met 1 When the detection function value exceeds the specified threshold, an abnormal alarm will be triggered, indicating that the system is under attack; otherwise, it means that the system is operating normally, that is, event H 0 The conditions are established.

2. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that In step 1, the actual operation of the unmanned ship is as follows: the influence of the control input η(t) on the system is completely known, and the heading angle ψ(t) varies between -π / 6 and π / 6.

3. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 2, It is characterized in that In step 1, the location information of the unmanned ship Contains coordinate information x(t), y(t), and heading angle information ψ(t). The ship's own information v(t) includes the unmanned ship's longitudinal velocity ρ(t), transverse velocity θ(t) and bow pitch velocity r(t), v(t) = [ρ(t)θ(t)r(t)] T , T represents transpose.

4. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that The specific process of step 2 is: Step 2.

1. Let A = -M -1 G,B=-M -1 W,D=M -1 , taking the origin as the reference coordinate point, then ζ(t)=v(t)-v ref , v ref is the reference coordinate, v ref =0; Assume the ocean depth The fuzzy set is {H 1 ,H 2 ,…,H l }, then the TS fuzzy unmanned ship system is, Where i = 1, 2...l, i is the i-th fuzzy subsystem, l is the number of fuzzy subsystems, preferably 4, ω(t) = [ω 1 (t)ω 2 (t)ω 3 (t)] T The matrix A includes the multi-source interference of wind, waves, and ocean currents on unmanned ships and the impact of mooring force in the working environment. i ,D i , C are all known coefficient matrices; y(t) is the measurement equation of the system; v ref is the ship's own information in the reference coordinate system; () -1 Indicates inversion; H l It is expressed as the corresponding membership function under different fuzzy rules, represents the premise variable, represents a fuzzy set; Step 2.

2. Introduce the zero-order holder into the TS fuzzy unmanned ship system and obtain the discrete fuzzy system as follows: Step 2.

3. Solve the state equation and measurement equation of the TS fuzzy system with unknown membership function, where: The state equation is, The measurement equation is, y(t) = Cζ(t).

5. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 4, It is characterized in that In step 2, Right now Membership function The sum of is 1, and Q i (ω(t)) is the membership function corresponding to different fuzzy rules.

6. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that In step 4, r(k) has a mean of 0 and a covariance of Ψ η The standard normal distribution of η =CPC T .

7. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that In step 5, the distribution of the physical watermark Δη(k) is: Δη(k)~N(0,Ψ η ), N(0,Ψ η ) means that the mean is 0 and the covariance is Ψ η The standard normal distribution of .

8. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that In step 6, x a (0) = 0, x d (0)=0.

9. The method for detecting a replay attack on an unmanned ship based on a watermark signal as claimed in claim 1, It is characterized in that In step 8, the pre-set residual detection function threshold g th According to the given false alarm rate α * Design, the design rules are: Prob((r(k)) T S r -1 r(k)|H 0 )<a * ; r(k) is the residual value of the system, Σ r -1 is the inverse of the covariance of the residual, denoted by event H 0 For normal operation of the system.