In case of 3 phase system , there is no need to calculate triple harmonics. It will be eliminated from line - line voltage. Firstly determine, V1, V5, V7, V9, V11, V13,......up to V49, Using SHE equations after calculating switching angles. Then, use voltage THD equations to compute THD. My suggestion is that it would easier if you write MATLAB programming for voltage THD up to 49 th harmonics. In this case, for different values of modulation index, voltage THD can be easily computed.
If you have done the hardware development then you need to obtain the waveform of the input current through an oscilloscope then you can go through this video
From my humble perspective, the simple way is to use powergui FFT analysis tool available in MATLAB/Simulink. The FFT tool is very convenient and easy to use. Besides, it provides detailed information on each harmonic component where you can actually see which harmonic component contribute most to the THD.
If you are designing your multilevel inverter using simulink block then it will be very convenient because you just need to run the simulation and then check the THD of your multilevel inverter output using the FFT option in the powergui.
If you are not using MATLAB/SImulink, then you can save the output of your multilevel inverter in Microsoft Excel file and export the file to simulink by using "signalbuilder" block. The same method can be applied for your hardware development as well because signal captured using oscilloscope can also be saved in Excel format.