Abstract:At present, the identification of the origin of Zanthoxylum bungeanum is basically based on sensory evaluation, lack of objectivity, and it is difficult to quantify standardize when applying, and is difficult for non-professionals to make judgments. Therefore, in this paper, a smart device to quickly identify Zanthoxylum bungeanum was designed and developed. The device was based on the gas sensor array, including a control module, a temperature module, a data storage module, a fan module, and a display module, it could not only independently detect and identify the odor information of the Zanthoxylum bungeanum, but also distinguish the same kind of Zanthoxylum bungeanum from different places. The sensor array contained seven gas sensors, which could respond to irritating gases emitted by Zanthoxylum bungeanums such as benzene, alkanes, alcohols, and aldehydes. When the temperature was stable at about 26 degrees Celsius, it could effectively collect information on the odor emitted by Zanthoxylum bungeanum. Each group of Zanthoxylum bungeanum samples was collected 50 times, and the average value, the maximum value, and the minimum value were taken as sample recording parameters. In this paper, four kinds of Zanthoxylum bungeanums were selected as experimental subjects. Two kinds of green Zanthoxylum bungeanums were from Ludian in Yunnan and Hanyuan in Sichuan. At the same time, the two kinds of red Zanthoxylum bungeanums were from Hancheng in Shaanxi and Hanyuan in Sichuan. A total of 220 samples were collected as training sets, including 40 red Zanthoxylum bungeanums in Shaanxi and 60 samples in the remaining three samples. Another 80 samples were taken as the verification set, the number of samples for each Zanthoxylum bungeanum was 20 in the verification set as well. The detection data were processed using principal component analysis (PCA) and Wilks statistical analysis. Five principal components were extracted, and the cumulative contribution rate was 94.41%. The average accuracy rate of the training model corresponding to the Fisher discriminant model was only 88.6%, and the verification set was 90%. As a comparison, the Wilks statistical analysis finally eliminated 13 variables as well as selected 8 variables, and only TGS2611 sensor acquisition was not used. The average accuracy of the Fisher model training set was 91.82%, and the validation set was 95%. The results of the comparison of the two models indicate that the variables screened by Wilks are more effective in discriminating the Zanthoxylum bungeanum field. Among the four kinds of Zanthoxylum bungeanums, the recognition rate of Yunnan green Zanthoxylum bungeanum and Hanyuan red Zanthoxylum bungeanum was relatively lower than the others, and there was a phenomenon that the boundary data overlaps in the discrimination result graph. Then, to solve the problem, a Fisher discriminant model with cross-validation was established for the variables selected by Wilks statistic. In addition, the average accuracy rate reached 97.27%. Finally, the model was transplanted to the collection device to complete the identification device of intelligent Zanthoxylum bungeanum variety. It was a simple and efficient method for identifying Zanthoxylum bungeanum varieties and could provide a testing instrument and theoretical basis for further research on the origin and classification of Zanthoxylum bungeanum.