## 2 Theory  
MDI-QKD protocol in optical-fiber-based links model is shown in Figure 1a. The classical MDI-QKD with polarization state consists of [PERSON], [PERSON] and [PERSON]. [PERSON] and [PERSON] prepare polarization states and encode them. Then [PERSON] and [PERSON] send them to untrust [PERSON] for the Bell Measurement. [PERSON] and [PERSON] use the Decoy-IM to add decoy-state. Considering the above, we can get the key rate of MDI-QKD,  
\[R\geq P_{11}^{Z}Y_{11}^{Z}\left[1-H_{2}\left(e_{11}^{X}\right)\right]-Q_{\mu_{ 4}\mu_{6}}^{Z}f_{e}H_{2}\left(E_{\mu_{4}\mu_{6}}^{Z}\right), \tag{1}\]  
where \(X(Z)\) is the diagonal(rectilinear) basis; \(Q_{\mu_{4}\mu_{6}}^{Z}\) and \(E_{\mu_{4}\mu_{6}}^{Z}\) are the gain and quantum bit error rate; \(Y_{11}^{Z}\) and \(e_{11}^{X}\) are the single-photon yield in the \(Z\) basis and the single-photon error rate; \(\mu_{a}(\mu_{b})\) is [PERSON]([PERSON])'s signal intensity; \(P_{11}^{Z}\) is the probability that both [PERSON] and [PERSON] send single-photon; \(f_{e}\) is the error correction inefficiency function; \(H_{2}\) is the binary entropy function given by \(H(x)=-x\log_{2}(x)-(1-x)\log_{2}(1-x)\).  
We need practical parameters in Table 1 to get key rate. \(e_{d}\) is the total misalignment error, \(e_{0}\) is the error probability of vacuum pulses, \(P_{d}\) is the dark count of each detector, \(f_{e}\) is the error correction inefficiency, \(a\) is the loss of fibers, \(\eta_{det}\) is the detector efficiency.  
MDI-QKD protocol with satellite-based links model is shown in Figure 1b with main parameters on it. There are optical-fiber-based links between [PERSON] and [PERSON], which is on the ground, and satellite-based links between [PERSON] and [PERSON], which is in the air and space.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(e_{d}\) & \(e_{0}\) & \(P_{d}\) & \(f_{e}\) & \(a\) & \(\eta_{det}\) \\ \hline
1.5\% & 0.5 & \(3\times 10^{-6}\) & 1.16 & 0.2 & 14.5\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: List of practical parameters of MDI-QKD for numerical simulations [11].  
Figure 1: (**a**) Schematic of MDI–QKD. (**b**) Schematic of satellite-based MDI–QKD.  
For MDI-QKD protocol, we care about the transmittance of fibers. When applying it to Figure 1b, we should consider the same. In [PERSON] et al.'s work [28], the transmittance is affected by lot of factors but many of them have fixed distribution. Hence, we only get PDT. Here, we consider the operation of the satellite (the height and the angle from zenith) and weather, such as light intensity, turbulence, scattering particles and so on. Weather conditions' simulation relies on parameters of Table 2. \(C_{n}^{2}\) is the value of the refractive index structure constant, \(n_{0}\) is the density of scattering particles.  
After PDT is gotten from [10], the average key rate of MDI-QKD with satellite-based links can also be gotten:  
\[\overset{-}{R}=\int_{0}^{1}R(\eta)P(\eta)\mathrm{d}\eta=\sum_{i=1}^{N_{bins}}R (\eta_{i})P(\eta_{i}) \tag{2}\]  
where \(R(\eta)\) is the average key rate as a function of transmittance, which can be gotten by Equation (1); \(P(\eta)\) is the PDT; \(N_{bins}\) is the quantity of PDT sampling.