Introduction Recently, it is focused on storage batteries materials for reduce of greenhouse gases. In particular, the development of large equipment like as electric vehicles is driving demand for storage battery materials. Although lithium-ion batteries are currently used as storage battery devices, Li metal is a rare metal and expensive, and the development of higher capacity battery materials is needed. Our research group is focusing on magnesium secondary battery cathode materials. In previous report, spinel MgCo2-xMnxO4 (x=0~0.5) (space group Fd-3m) has synthesized and evaluated its battery characteristics, showing an initial discharge capacity of more than 200mAh/g when the Mn substitution amount is x=0.5.1) Since the inclusion of substituted species improves battery properties, we synthesized Al substituted spinel MgCo2-zNi0.5MnAlzO4. In this study, we reported that Mg/Co cation mixing, which was particularly problematic at z=0.3 was reduced compared to MgCo2-xMnxO4 resulting in improved cycle properties.2) The purpose of this study is to clarify the stable local structure of pristine and discharge process of spinel type MgCo2-zNi0.5MnAlzO4 (z=0, 0.3) and to determine the contribution of Al substitution to the electronic structure by performing electron density calculation. Calculation The structural relaxation calculation was performed by generalized gradient approximation (GGA) exchange-correlation potential used with a plane-wave cutoff energy of 550 eV, and 1×2×2 k-point mesh was applied, corresponding to the inverses of the lattice constants on Vienna Ab-initio Simulation Package (VASP) code. The convergence criterion for structural optimization was that the energy difference per iteration be less than or equal to 0.02 eV/Å. 2×1×1 supercell was created and structural relaxation calculation was performed on various initial structural models to determine the energetically optimal structure. Initial structure models were constructed to ensure reproduction of the occupancies determined by an average structure analysis from Rietveld analysis using synchrotron X-ray diffraction. Result and discussion In this study, we performed structural relaxation calculations for spinel-type MgCo2-zNi0.5MnAlzO4 (z=0, 0.3) to obtain the stable structure before and during charge-discharge. The initial model before charging and discharging was created based on the occupancy of each site obtained by crystal structure analysis using neutron diffraction measurements.2) The initial model at discharge was obtained by inserting Mg into the 16c vacancy site in the stable structure before charging and discharging. Figure 1 shows the stable structure after structural relaxation calculations before for a-1) z=0 and b-1) z=0.3 and after discharge (y=0.375) for a-2) z=0 and b-2) z=0.3, respectively. The solid circled Mg is the inserted one, and the dotted circle is the 8a site that became vacant after the structural relaxation calculation in Fig. 1. The crystal structure in pristine was spinel structure, however, it is found that the 4-coordinated 8a site became a vacancy and Mg occupied the 16c site, changing the crystal structure to a rocksalt structure after discharge. Since the 8a and 16c site are close to each other, the insertion of Mg into the 16c site causes a structural change due to the repulsion between atoms and cations on the 8a site, which leads to a chain transfer to other vacancy 16c sites. In particular, models with large structural changes tended to have stable structures. It is also found that Mg remained at the 8a site in z=0.3 shown in b-2) than in z=0 shown in a-2), and that Co at the 8a site could not move to the vacancy in z=0, and that the amount of change in the entire structure is less than that in z=0.3. As a result of partial density of states (PDOS) calculation, it is confirmed that Co and Mn had 2.6 ~ 2 valence and Mn is considerably close to 3 valence during discharge. It is also found that the PDOS of Ni did not almost change before and after discharging, and that no valence change occurred. These results are consistent with those of previously reported XANES measurements.2) Therefore, the model in Fig. 1 determined in this study is considered to be valid. Acknowledgement This research was financially supported by JST, ALCA-SPRING Grant Number JPMJAC1301, Japan. This work was also supported in part by JSPS KAKENHI Grant Number 20K15382, Japan. Dr. Koji Ohara of JASRI (Japan Synchrotron Radiation Research Institute for assistance with synchrotron X-ray total scattering measurements (BL04B2, SPring-8, Proposal Nos. 2019B1249).1) Y. Idemoto, M. Ichiyama et al., J. Power Sources, 482 , 228920 1-9 (2021)2) Y. Hirata, Y. Idemoto et al., ECS Meeting s, MA2020-02 , 3451 (2020) Figure 1