## 3 Methods
### MVSPC Strategy Design
#### 3.2.2 Control Module  
The MVSPC method is the core of the control module and consists of four parts. Firstly, based on the online state of multiple segments, the segment information for the next moment is predicted simultaneously. Secondly, the desired speed and density of each segment are calculated, taking into account the reduced capacity caused by lane drops. Thirdly, segment control values are determined using a controller based on the state-compensation model. Finally, the calculated control values are applied to vehicles in each segment. The detailed explanation is as follows:  
First, based on the MetaNet model, we predict the speed and density of each segment after time \(T_{m}\). \(V(t)\) represents the speed set, including each segment at time \(t\). \(K(t)\) represents the density set, including each segment at time \(t\):  
\[V(t)=\{v_{1}(t),v_{2}(t),\cdots,v_{i}(t),\cdots\} \tag{27}\]  
\[K(t)=\{k_{1}(t),k_{2}(t),\cdots,k_{i}(t),\cdots\} \tag{28}\]  
The prediction speed and density \(V^{p}(t+T_{m})\), \(k^{p}(t+T_{m})\) after time \(T_{m}\) can be calculated based on Formulas (9) and (14). \(V^{p}(t+T_{m})\) represents the prediction speed set of each segment at time \(t+T_{m}\). \(K^{p}(t+T_{m})\) represents the prediction density set of each segment at time \(t+T_{m}\):  
\[V^{p}(t+T_{m})= \{v^{p}_{1}(t+T_{m}),v^{p}_{2}(t+T_{m}),\cdots,v^{p}_{i}(t+T_{m} ),\cdots\} \tag{29}\]  
\[K^{p}(t+T_{m})= \{k^{p}_{1}(t+T_{m}),k^{p}_{2}(t+T_{m}),\cdots,k^{p}_{i}(t+T_{m} ),\cdots\} \tag{30}\]  
Next, the desired speed of the \(N\) segment can be calculated according to the system state at the predicted time \(T_{m}\), as shown in Formula (31). The desired speed set of each segment can be calculated by Formula (32):  
\[v^{d}_{N}(t)=\mathrm{C}\cdot q_{\max}\cdot k^{p}_{N}(t+T_{m}) \tag{31}\]  
\[v^{d}_{i}(t)=v^{d}_{N}(t)+(i-N)\Delta v_{c} \tag{32}\]  
Then, segment control values can be calculated using the controller, which is designed based on the state-compensation model. We denote the predictive horizon by \(N_{p}\in N_{+}\), and define four types of state and control input trajectories within the predictive time horizon \([t,t+N_{p}]\): The main aim of the algorithm is to find the best control values, \(U_{k}\), so that the state vector in the prediction time domain is as close to the reference value as possible, which is an open-loop optimal control problem:  
\[\delta X_{k}=\Psi\cdot\delta x_{k}+\Theta U_{k} \tag{33}\]  
where  
\[U_{k}=[\mathcal{K}_{i}(t),\mathcal{V}_{i}(t)] \tag{34}\]  
\[\Psi=\left[ \begin{array}{cc}1&0\\ \frac{\mathrm{T}\cdot\mathrm{T}}{\tau}&1-\frac{\mathrm{T}}{\tau}\end{array} \right] \tag{35}\]  
\[\Theta=\left[ \begin{array}{cc}1&0\\ 0&1\end{array} \right] \tag{36}\]  
The purpose of the control strategy in this paper is to indirectly regulate the density of traffic flow to stabilize it near the desired value. This means that the difference between the current traffic flow density and speed, and the desired density and speed, will decrease and ideally approach zero with the application of the control action. Therefore, assuming a certain time \(t\), the sum of the two-norms of the cumulative error between the predicted output of the traffic flow speed in the t segment and the expected output at the future \(N_{p}\) time is taken as the performance optimization objective function, and the following \(J(t)\) is the cost function. \[J(t)=\sum_{i=1}^{N}\sum_{p=0}^{p}[\|k_{i}(t+N_{p}+1)-k^{d}(t)\|^{2}+\|v_{i}(t+N_{p }+1)-v^{d}(t))\|^{2}] \tag{37}\]  
The control action is not expected to be too large, so the optimization objective function adds another constraint on the control amount, as follows:  
\[J(U_{k})=(X_{k}-R_{K})^{T}Q(X_{k}-R_{K})+U_{k}^{T}WU_{k} \tag{38}\]  
\[ \begin{array}{l}\text{s.t. }|U(k+i\mid k)|\leq u_{\max}\\ i=0,1,2,3,\cdots,p-1\end{array}  \tag{39}\]  
Finally, control values of controller outputting are applied to vehicles in each segment.