4.1. RFPID Controller Description
There is unknown nonlinear friction torque in the Lidar pitching motion system, which is difficult to account for using the simple feedback compensation method. Neural networks are a significant branch of intelligent control, which have self-learning and adaptive capabilities. A neural network system can be used to approximate the friction torque to achieve adaptive neural network compensation. As shown in
Figure 7, the RBF neural network is used to approximate the unknown and nonlinear friction torque based on the FPID in the previous section. In this way, it can be utilized to compensate for the friction torque in the control law. Thus, the nonlinear influence caused by friction torque can be eliminated.
For the system mathematical model in (1),
Ff(
t) is a friction torque based on the Stribeck friction model, whose coefficients are unknown.
Ff(
t) cannot be calculated by the model, but it can be obtained by the RBF neural network through error training. The RBF neural network is designed to fit the unknown nonlinear part. The algorithm of the RBF neural network is
where
x is network inputs which are the error, the rate of error change and the integral of the error,
i is the number of network inputs,
j is the number of hidden layer nodes in the network,
c is the central value of the hidden node Gaussian function,
δ is a normalized constant of the hidden node,
h is the output of the Gaussian function and
W is the weight of the neural network.
The relationship between the network output and actual friction torque is
where
ε is the network approximation error.
The PID control law based on RBF compensation is designed as
By substituting (6) into (1), the closed-loop dynamic equation of the system can be obtained as
where
e is the error of system output,
kp,
ki and
kd are respectively the proportional coefficient, integral coefficient and derivative coefficient and
A and
b are the corresponding coefficient matrix.
The optimal weight parameter of the neural network is
where
Ω is the set of
W.
Thus, the minimum approximation error
ω is defined as
According to (7) and (8), the final closed-loop dynamic equation of the system is
Based on (10), the adaptive law of
W is determined to minimize the system error. The Lyapunov function of the closed-loop system is
where
γ is a constant coefficient and
P is the positive-determined matrix that satisfies the Lyapunov equation.
Q is defined as a matrix which satisfies the following equation:
where
Q is an arbitrary 3 × 3 positive-determined matrix.
By substituting (10) into (11), the derivation of Lyapunov is
The adaptive law of
W can be written as
The derivation of Lyapunov can be simplified to
In (15), the derivative of the Lyapunov equation is less than or equal to zero by choosing the appropriate Q and the minimum approximation error ω. According to Lyapunov’s second theorem of stability, the system is stable in the sense of Lyapunov.
Based on (15), the inequality is
where d is a positive constant.
The inequality can be rewritten as
The inequality can be simplified to
where
l(•) is the eigenvalue of the matrix, and
l(
Q) >
l(d
PbbTPT).
According to (18), when the derivative of the Lyapunov equation is less than or equal to zero, the convergence result is
It can be seen from (19) that the convergence error is related to the eigenvalues of
Q,
P and the approximation error
ω. The larger the eigenvalue of
Q is, the smaller the eigenvalue of
P is. Meanwhile, the smaller that |
ωmax| is, the smaller the convergence error will be. The control system does not have asymptotic stability in its equilibrium state x
e = 0. Hence, there will be a certain steady-state error between the output value and the target value. Finally, the
fR pseudocode is shown in Algorithm 1.
Algorithm 1.fR pseudocode. |
Input: c; δ; h; W; E; P; γ; b; ts. |
Output:fR |
1:forj = 1 to 5 do |
2: hj = exp(-(E-cj)2/(2*δ2)); |
3: end for |
4:S=-γ*ET*P*b*h; |
5:fori = 1 to 5 do |
6: Wi= Si*ts+Wi; |
7: end for |
8:fR = -WT*h; |
4.2. PRFPID Controller Description
Predictive control with good predictive ability should consider the influence of uncertainty and perform real-time optimization during the process operation. From the analysis in the previous section, the RFPID controller does not guarantee acceptable convergence error and the anti-interference ability is weak. Based on the RFPID controller, this section combines the algorithmic idea of predictive control to compensate for the system steady-state error and enhance its robustness.
As shown in
Figure 8, the predictive controller is added to modify the RFPID controller. The output of the prediction controller is calculated to compensate the output of the overall controller in real time. Ignoring the fitting error
ε of the RBF neural network, the discrete state space expression of the closed-loop control system is
where
u3(
k) is the output of predictive controller at time
k,
x is the state variable of the closed-loop system,
y is the output of the system,
e is the output error,
ts is the sampling time,
Ap is the system matrix,
bp is the control matrix and
cp is the output matrix.
According to (20), the predicted step number is set to
P and the control step number is set to
M. Thus, the model of the predictive controller is
where
Y is the predicted
P output vector expression,
Fy is the coefficient matrix of the state variable and
Gy is the input coefficient matrix.
According to the model of predictive control in (21), the
M control quantity in the future moments can be obtained by minimizing the error of the controlled object in
P times and suppressing the fluctuation of the control quantity. The optimized performance index equation is
where
N(
k) = [
n(
k + 1) …
n(
k +
P)] is the output target value vector and
L and
O are the weighted matrices of the output and control quantity respectively.
In predictive control algorithms,
N usually needs to specify a smooth curve that is close to the target value to improve the stability of the system. The curve is
where
µ is the flexibility coefficient, 0 <
µ < 1,
y(
k) is the actual output value of the system and
yr is the target value.
According to (22), the direction of the fastest gradient is selected, and the optimal output of predictive controller is
where
Z = [1 0 … 0]
1×M.
Finally, the U*3 pseudocode is shown in the Algorithm 2.
Algorithm 2.U*3 pseudocode. |
Input: E; P; M; Ap; bp; cp; L; O; Z. |
Output:U3*. |
1: fori = 1 to P do |
2: ifi<=Mthen |
3: m = i; |
4: else |
5: m = M; |
6: end if |
7: forj = 1 to m then |
8: ifj==Mthen |
9: fork = 1 to i - j + 1 do |
10: Gij = Gij + cpT*Apk-1*bp; |
11: end for |
12: else |
13: Gij=cpT*Api-j*bp; |
14: end if |
15: end for |
16: end for |
17: fori = 1 to P do |
18: forj = 1 to 3 do |
19: Fi= cpT*Api; |
20: end for |
21: end for |
22: U3*=Z*(GT*L*G+O)-1*GT*L*(N-F*E); |