This paper addresses the problem of odor source localization in a dynamic environment, which means the odor distribution is changing over time. Modification Particle Swarm Optimization is a well-known algorithm, which can continuously track a changing optimum over time. PSO can be improved or adapted by incorporating the change detection and responding mechanisms for solving dynamic problems. Charge PSO, which is another extension of the PSO has also been applied to solve dynamic problem. Odor source localization is an interesting application in dynamic problem. We will adopt two types of PSO modification concepts to develop a new algorithm in order to control autonomous vehicles. Then we develop odor localization algorithm, and simulations to show that the new approach can solve such a kind of dynamic environment problem.