Abstract : From the beginning of the HIV/AIDS epidemic in Cuba a system for detection of persons living with HIV was put in place. A nonlinear model is developed for the detection system considering different types of searches, some random and others non-random, the model is based on another one studied before by some of the present authors. We study the dynamics of the system. Using the data from the Cuban HIV/AIDS epidemic, we fit the model to the data. For this, as not all types of searches were introduced at the same time, we consider the parameters of the system to be step functions. We obtain estimates for the size of the Cuban HIV epidemic, and for the mean time for detecting a person that is infected with HIV. Also the basic reproduction number is computed for each set of values of the parameters.