(WSN) consist of numerous nodes that responsible for sensing, processing, and monitoring of physical environment data and have been widely used nowadays. In WSN, there are limitations such as huge amounts of data and limited power source, therefore using some methods to reduce amounts of data and power consumption is very important. also , data may be lost in WSN and not be received by the receiver for different reasons. In this thesis, two methods of compressive sensing and matrix completion are proposed to reduce the amount of data. Distributed compressive sensing is used to benefit spatial correlation in addition to temporal correlation of data. The accuracy of reconstruction of these methods is compared with the same compression percentage. Then, a flood detection has done with level and flow water of rivers data from 2013 Canada flooding. In this simulation fuzzy logic has been used as a determinant of the conditions, that is safe, prone and danger. Then, it is assumed that the data may be missed by probability of 10 percent. In this regard, a real-time method compressive sensing based for estimating this data is presented. The estimation is performed with two single-sensor and multi-sensor approaches that use temporal and spatial correlation for estimation. These methods have been evaluated and compared with those that do not use the past of signal for estimation. In addition, flood detection without probability of missing data is also compared with flood detection with probability of missing data based on estimated data. A laboratory system has been implemented for flood detection, which is a wireless sensor network with the Zigbee protocol and star topology. The implemented system consist of five nodes located where we intend to monitor there, and send level and flow of water data to a central node with a specified data structure. These five nodes included level and flow of water sensors, battery, Arduino and transceiver module. The central node receives the data and transfers it to the computer. This data is stored on the computer in Excel and displayed visually with the Processing software. The data is also transmitted to Simulink and flood detection is performed on there. Sleep mode of Arduino and transceiver module are used to optimize power consumption.