Elderly or sick people, who have just been discharged from the hospital and live alone in their homes, need a variety of help. As they may forget to do something, albeit partially, that could lead to a serious safety threat. In this regard, a home surveillance system based on wireless sensor networks can take care of these people at their homes and if there are any emergencies, the system can send a message to caregivers or surrounding hospitals using a radio modem to take precautionary measures. Accurate localization in indoor environments with ultra-wideband (UWB) technology has long been attracted much attention. However, due to the presence of multipath components or non-line of sight (NLOS) propagation of radio signals, indoor UWB localization has been converted to a critical challenge. Using several anchors in the indoor environment is one of the existing solutions. But large indoor areas require a large number of anchor nodes. On the other hand in the case of unexpected events that lead to the destruction of existing infrastructures, the fixed anchors cannot be used. In this thesis, a novel localization framework based on the transmitting signal from a moving UWB-capable drone outside of the building and its received signal regarding the modified SV channel model is presented. After preprocessing of the received signals, three new methods for reducing the indoor localization error are proposed. To improve the performance of the indoor localization system, in the first method, two machine learning algorithms including support vector machine (SVM) and multi-layer perceptron (MLP) using extracted features of the received signals are implemented. Also, in the second method, two deep learning algorithms including MLP and convolutional neural networks (C) using raw received signals are implemented. The simulation results show that the architecture designed for the convolutional neural network based on the hybrid dataset (the combination of the database related to the time and power of the received signal) provides a mean absolute error (MAE) of about 3 cm. Therefore, this type of architecture offers better performance compared to the previous methods. Also, in the third proposed method, by using the reinforcement learning, the drone is learned to fly to suitable anchor points which the amount of power loss is less and as a result, the accuracy of localization is increased by using these points. Key Words: UWB Technology, Multipath Components, Indoor Localization, Machine Learning, Reinforcement Learning