ObjectiveAngelica sinensis is one of the commonly used Chinese herbal medicine in traditional Chinese medicine clinic, exhibits different pharmacological characteristics due to variations in the content of active ingredients in its head, body, and tail. Therefore, research on the identification methods of different medicinal parts of Angelica sinensis is of great practical significance. Terahertz Time-Domain Spectroscopy (THz-TDS) technology is widely used in the field of nondestructive testing because of its unique electromagnetic wave characteristics. This study explores the feasibility of combining THz-TDS with chemometrics to identify different medicinal parts of Angelica sinensis. MethodsBy comparing the spectral response characteristics of different parts of Angelica sinensis to various optical parameters, the absorption coefficient spectrum in the 0.6–3.0 THz range was selected, and three types of feature extraction algorithms, namely, joint Competitive Adaptive Reweighted Sampling (CARS), Uninformative Variable Elimination (UVE), and Successive Projections Algorithm (SPA), were used to establish the classification models of Extreme Learning Machine (ELM), Random Forest (RF), and Support Vector Machine (SVM) in turn, and optimize the models by using the crown porcupine algorithm (Crested Porcupine Optimizer (CPO) to optimize the model. ResultsThe research results indicate that the CPO optimizer significantly improved the classification accuracy of the models, with the accuracy of the ELM, RF, and SVM models increasing by 4.36%, 1.11%, and 12.22%, respectively. The SPA-CPO-SVM model exhibited the best overall performance, achieving accuracies of 96.11% and 97.96% on the prediction and training sets, respectively, while the number of input features was only 5% of the total feature set. ConclusionThe results show that the fully joint feature extraction strategy and optimization algorithm can play a powerful synergistic effect in model construction, confirming the feasibility of THz-TDS technology to correctly identify different medicinal parts of Angelica sinensis, and providing an important reference for the application of terahertz technology in the identification of Chinese herbal medicines.