NATIONAL UNIVERSITY HOCHIMINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY ADVANCED PROGRAM IN INFORMATION SYSTEMS Le Do Van Bang -19521236, Tang Tri Duc -19521382 BACHELOR OF ENGINEERING IN INFORMATION SYSTEMS THESIS ADVISOR Assoc. Quan LE-TRUNG HO CHI MINH CITY, 2024 ASSESSMENT COMMITTEE The Assessment Committee is established under the Decision. by Rector of the University of Information Technology. - Member INSTRUCTOR APPROVAL This is the approval section of this thesis done by two students Le Do Van Bang and Tang Tri Duc from the Department of Information Systems under the advanced program guided by Assoc.
Quan LE-TRUNG. This thesis has been edited and changed at the request of the Assoc instructor. Quan LE-TRUNG and review lecturer Dr. Le Kim Hung.
Last updated on January 19, 2024. At the report of the information systems department office announced on January 8, 2024. Signing below will constitute the approval of the instructor regarding this thesis. Approved by the advisor Signature of advisor Assoc.
Quan LE-TRUNG ACKNOWLEDGMENTS We have put a lot of effort into this project. But this was not possible without the kind support and help of many people. I thank all of them sincerely. We are greatly indebted to my project supervisor Assoc.
Quan LE- TRUNG for his guidance and constant supervision as well as for providing valuable advice during the thesis writing process regarding the project titled — Development of an AI-based weather forecasting system, and mobile app. We also thank The Institute of Hydrometeorology and Climate Change Science for sharing a weather dataset that we can use to build a weather forecast model. Again, I owe my profound gratitude to my project guide, for not only helping me with the project but also developing a keen interest in the same during its progress il TABLE OF CONTENTS o3 Lixo ACKNOWLEDGMENTTS. HH eae HH TH TK TH Hi tt BE ii TABLE OF CONTIEINTS.
- «nọ Họ nh SH ngư Hi LIST OF FIGURES. eee tener nọ Họ HT nọ Hi Vv LIST OF TABLES.- - << HT nh vii ABSTRACT. - ---- Ăn KH Tà KH tt Bế viii Chapter1 :INTRODUCTION. 553181 1H HT TH HH TH TH HH 1 1.
2 Chapter 2 : LITERATURE REVIEW.- ẶQ HH HH HH HH, 3 VN VY (00)-0.1 Introduction the mobile applicafionn.2 Overview of mobile application programming on mobile devices " 2.3 Future technology trends in mobile pr0Øramming.4 Chapter 3 : THEORETICAL FRAMEWORK.- - GÀ SG SH HH như.4 Prediction Model Used.1 K-Nearest Neighbors Algorithm.2 Long Short-term /(o 0n. Án HH HH HH HH HA 18 4.1 API Web Service.2 Prediction Model Service. Web view S€TVIC€.3 Prediction Model and Evaluation Metrics Used.1 Dataset for buid Model. Long Short-term Memory.
Chapter 5 : SYSTEM IMPLEMENTATIO AND EVALUATION.1 API Key Sheet. we SL NI. --- 1 1 + 1 TT HH HH HH Họ Ho nàn 63 6. ------ SH HT kg hư 66 LIST OF FIGURES œ4EEl› Figure 3-1: KNN diagram nniỶỶỶŸ.,ÔỎ Figure 3-2: The LSTM network architecture.
Figure 4-1: Weather station data collection method.- - --- ¿25252 £+£+£+++t+t+exexexsrexexses 18 Figure 4-2: Weather Station as New .ccccecssesessseseesesesesesesesesceceeseeecaescacecaeeeeesseaeaeaeeeeeeeetenes 19 Figure 4-3: Wifi Sensor device .- th TT HH TH TH iệt 19 Figure 4-4: Two types of weather SfafIOIIS.--¿- 2c St St St E+E+E+121211111 1121111211111. 20 Figure 4-5: List of locations of weather stations installed by the Institute of Hydrometeorology and Climate Change Science Figure 4-6: The real time weather data collected from Station A.-----------+c+s++ 22 Figure 4-7: Database Structure.ccccccececcecesesesescseseseeseeseseseeeaeaeseeeseeceeseseeeaceeeeecaeacaeeeeeeeeeeataee 23 Figure 4-8: App ÏCOII.- 2c S123 9151151112 15111 111111111 111111 1111101 TH TT Hài 24 Figure 4-9: The screen displays a list of connected devices and detailed information of DIsl)0x9i1i ai. 25 Figure 4-10: Hostname customization SCCM. cesses 2 25% E9E*EEEE+EESEEEEkekEkkrkekrkkrkrrke 26 Figure 4-11: API receive data Figure 4-12: Operational diagram of the forecast Model L.
--- - + + «5s s+s+x+e£+s+es+x+ezex+ 28 Figure 4-13: Connect to the dataaSG. ¿c6 1t 122 12121 112111511 11111101111 111 Hit 29 Figure 4-14: Dataset COlleCf€d. 5c 22C: St St St S21 2121 21211111 111121111111111111111111111111 1 1. 30 Figure 4-15: : The values change markedly when it rains [ I9] .--- -- «++s+scsxscsxsxs++ 31 Figure 4-16: Train a rain forecast Mode].
ee eeeesseeeeeseseseeseseeeeseeceseeeeseseeceseeeseeeeseeeeeaeees 32 Figure 4-17: Graph comparing rainfall training results with test dafaset.--‹- 32 Figure 4-18: Train a wind gust forecast Model ,.-- ‹ + + +++++*x+txvxtEexetrexererrxerrererrre 34 Figure 4-19: Graph comparing windgust training results with test dataset at K value FrOM 1 tO Bo. eee ss esesescsescessnsestesessscscacansesessnsssseecscsessansusesseacseseatensceseusasacasanaceseseenseeneasacens 35 Figure 4-20: Graph comparing windgust training results with test dataset at K value "000 58:01. 37 Figure 4-21: Command to train the UV prediction model Figure 4-22: Implement UV forecast training model Figure 4-23: The model performance on temperature predICtIOI.-- - + 5s5s5ssss+2 40 Figure 4-24: Command to train the UV temperature prediction model. ----- --s- 41 Figure 4-25: The graph shows training values with testing vaÌues.-------scs << +2 42 Figure 4-26: The model performance on temperature predICtiOïI.-- ---+ «+ s + <+2 43 Figure 5-1: QR code downloads the application Figure 5-2: The screen interface displays real-time weather Íorecasf.
--------cc+c-+2 45 Figure 5-3: Weather history table for the day .cccceccesesssscseseeseseeseseeeseseeseseeseseeeeseesaeeeees 46 Figure 5-4: The screen displays the rain forecast .ccecessssssesseseseeseseeeesesceseseeseseeeeseeeeeseees 47 Figure 5-5: The screen displays the temperature ÍOr€CaSf. --- ¿55c +c+x+t+tsrtrerersrerrke 48 Figure 5-6: The screen displays the UV forecast. cccsesseeeeeeeeeseteessseeeseesseseseseeeeeseeanaees 49 Figure 5-7: The screen displays the wind gust forecast.ccccceeseeseeeeeseesecceeeseaeeeeseneeseaeees 50 Figure 5-8: Application introduction screen. Figure 5-9: Webview 81: 2á vn.
Figure 5-10: Graph comparing indoor and outdoor fenperafUT€S.---- ‹ 5s +55 ss<++s++2 55 Figure 5-11: The graph shows UV radiation during the day. 5 5+5 ssssssesssezes2 56 Figure 5-12: The graph shows rainfall for the day and yesferdayy.- - «+ c«ccssxs++ 57 Figure 5-13: The page displays historical weather forecast Information.-------‹- 58 Figure 5-14: The page displays forecasted ra1rifaÏÏ. ¿65s xxx Eexkeserexeersesersee 58 Figure 5-15: The page displays forecasted UV.- -- ¿+ +23 2111211111111 kErkrkrrrrkrre 59 Figure 5-16: The page displays forecasted Wind QUSt .- --- 5:52 S+‡+£+e+t+svrsrererererske 59 Figure 5-17: The page displays forecasted temperafUTC. ---- ¿+5 s+c+c+x+x+tstrrersrsreesks 60 Figure 5-18: AccuWeather mobile appÏICafIOH.
¿+55 22t £vEsEsEsvevetrererersrsrerrke 61 Figure 5-19: Thoitiet. - ¿- - - St 1332k ST 11T nghiệt 62 vi LIST OF TABLES œ4EEl› Table 4-1: Data in rainfall data_ train.- ¿+ 2v 2v rrêc 31 Table 4-2: Data in windgust_data_train. 34 Table 4-3: Data in uv_data_traim. cece ceeeesesesescseseseseeeeceececeeseseeceeeeeeeseseseeeeeeeeseseanes 38 Table 4-4: Data in temperature _data_train.--- -- 2 2c+t St ‡EESEsEseekrrrererserrke 41 Table 5-1: API key list.
54 vii ABSTRACT Accurate measurements of UV radiation, atmospheric, wind gusts, wind speed, temperature, humidity, and rainfall as well as the availability of the predictions of their evolution over time, are significant for various application domains, including agriculture, renewable energy, energy management, and ensuring thermal comfort in buildings. For this reason, we want to introduce, an intelligent, lightweight, self- powered, and portable weather station that will support this research, we also developed a mobile application that allows users to monitor the weather information and forecast weather in real time. This thesis also applies forecasting models using the K-nearest neighbors (KNN) algorithm as the rainfall and wind gust predictor mechanisms and, the Long Short-Term Memory (LSTM) neural network for warning UV radiation and temperature. The hardware and software design of the implemented prototype and the forecasting performance related to the eight atmospheric variables are described using three approaches.
Keywords: weather station; prediction model; LSTM ; KNN; mobile application; real time viii Chapter 1:INTRODUCTION 1.1 Background This research focuses on the development and implementation of an innovative AI- based weather forecasting system, seamlessly integrated with a user-friendly mobile application. Traditional weather prediction methods often face challenges in accurately forecasting in different areas of the city that has a large area. However, currently the number of weather forecasting systems in Ho Chi Minh City is very small, so providing accurate reports in each district is relatively difficult, especially now that climate change is increasingly extreme. The climate in HCMC is identified as the tropical monsoon regime with specificity of two distinguished seasons, rainy and dry.
In the dry season from November to April, the city obtains a low rainfall (approximately of 10-15% of the total annual rainfall), high evaporation, and high temperature (around 29-30 °C). On the other hand, the average rainfall during the rainy season from May to October generally accounts for approximately 85—90% of the total annual rainfall, which has approximately varied from 1000 to 1600 mm [1]. Realizing that problem, we conducted research and came up with a solution: installing a weather station system in every household throughout the city to collect fixed data in small areas. and get accurate forecasts sent instantly to our growing weather mobile app.
This system is optimized so that anyone can deploy it, creating an advanced IoT ecosystem for every household to be able to forecast the weather.2 Objective and Scope 1.1 Objective +Understand the implementation of weather data analysis and machine learning in providing results. +The mobile application demonstrates basic functions such as: Display real-time weather information, shows the 10 minutes forecast information for rain and wind gust. One-hour forecast information for temperature and UV radiation.2 Scope +Using the K-nearest neighbors (KNN) algorithm as the rainfall and wind gust predictor mechanisms and, the Long Short-Term Memory (LSTM) neural network for the predictor for temperature and UV radiation. +A demonstration mobile application is built to illustrate the results of the experiments and the performance of the used algorithms.
tA simple web view to display weather information that is collected by a personal weather station in real-time. Chapter 2: LITERATURE REVIEW Because our topic focuses on two areas: Building mobile applications and building prediction models, so literature review section will be divided into two separate topics.1 Introduction the mobile application Today, with the strong development of mobile phone companies, smartphones are becoming more and more popular, accounting for a large market share in the market for handheld communication devices. The need to use smartphones a lot also requires the appearance of applications that serve daily life, so the mobile programming industry was born and has been growing to this day.Now I will generalize about mobile programming.2 Overview of mobile application programming on mobile devices - Mobile device programming, or in short Mobie programming, is an application programming industry specifically for mobile devices. - Application programmers for mobile devices must always keep in mind the principle of "maximizing the resources” of the device, using every means to optimize computational complexity as well as the amount of memory needed to.
- But over time, along with the rapid development of hardware, modern mobile devices often have very good configurations, with powerful processors and large RAM memory, making programming for mobile devices difficult. Movement becomes easier than ever. The development kits of today's mobile operating system manufacturers often clarify most tasks related to memory management, process management. It is these characteristics that attract programmers to apply.
Mobile applications also have to be concerned: when an application depends on the Internet, you must pay attention to the fact that the network connection becomes unstable and difficult to control because smartphones are highly "mobile". - Furthermore, modern mobile devices are equipped with many additional features that make interacting with users more convenient (multi-touch screen, voice interaction, gestures, etc.) Diverse connections (NFC, GPS, 3G, 4G, Bluetooth, IR,.) rich sensors for diverse experiences (light sensor, proximity sensor, compass, motion sensor, acceleration next,. Therefore, programmers can rely on specific applications to set up and use these special features to give users the best experience on their mobile devices. - In addition, phone companies that use operating systems from mobile operating system developers all create development kits (SDKs) and integrated development environments (IDEs) that are very convenient for writing source code.
, compile, debug, test as well as when preparing to launch a software. - In today's market, there are three operating systems developed for mobile devices today: Android (Google), iOS (Apple) and Windows Phone (Microsoft).