TW201812686A - Embedded system for automatic recognition and instant control of mental state enabling to trigger a vibration motor to generate vibrations for performing a cardiopulmonary synchronization control - Google Patents

Embedded system for automatic recognition and instant control of mental state enabling to trigger a vibration motor to generate vibrations for performing a cardiopulmonary synchronization control Download PDF

Info

Publication number
TW201812686A
TW201812686A TW105101203A TW105101203A TW201812686A TW 201812686 A TW201812686 A TW 201812686A TW 105101203 A TW105101203 A TW 105101203A TW 105101203 A TW105101203 A TW 105101203A TW 201812686 A TW201812686 A TW 201812686A
Authority
TW
Taiwan
Prior art keywords
judgment
decision tree
value
embedded system
average
Prior art date
Application number
TW105101203A
Other languages
Chinese (zh)
Other versions
TWI556188B (en
Inventor
練光祐
陳建中
張世錡
邱春節
陳延霖
Original Assignee
國立臺北科技大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 國立臺北科技大學 filed Critical 國立臺北科技大學
Priority to TW105101203A priority Critical patent/TWI556188B/en
Application granted granted Critical
Publication of TWI556188B publication Critical patent/TWI556188B/en
Publication of TW201812686A publication Critical patent/TW201812686A/en

Links

Abstract

The present invention relates to an embedded system for automatic recognition and instant control of mental state. The aforementioned system further includes a wearable device. A physiological sensor of the wearable device is used for measuring an user to generate a plurality of physiological information; a myoelectric sensor is used for sensing changes in myoelectricity of the user to generate myoelectric sensing information; and a controller is used to analyze physiological information by using switchable decision tree to generate mental state judgment information and to switch operating modes according to the myoelectric sensing information, as well as to determine according to the mental state judgment information whether the vibration motor is to be triggered to generate vibration for performing a cardiopulmonary synchronization control.

Description

精神狀況自動辨識與即時調控嵌入式系統    Embedded system for automatic mental status identification and real-time regulation   

本發明係一種嵌入式系統,尤指一種可識別使用者之精神狀況,並即時調控精神之嵌入式系統。 The present invention relates to an embedded system, in particular to an embedded system that can identify the mental state of a user and adjust the spirit in real time.

在有關疲勞的研究與產品中,習知技術較常利用辨識臉部表情與眼睛的閉合時間與頻率等來判斷疲勞。然而在真實情況中,影像判別相當容易受到背景或是使用者不經意的動作影響,而導致較大的誤差。 In the research and products related to fatigue, the conventional technology often uses the recognition of facial expressions and the closing time and frequency of eyes to judge fatigue. However, in the real situation, the image discrimination is quite easily affected by the background or the user's inadvertent movement, which causes a large error.

另外,在使用影像進行判別時,需運行較複雜的演算法因而花費較多的作業時間。使得現行之疲勞檢測方案並無法達到即時分析之。 In addition, when the image is used for discrimination, a more complicated algorithm needs to be run and thus more work time is required. As a result, the current fatigue testing scheme cannot achieve instant analysis.

為解決上述技術之困境,另有利用腦波圖來判斷使用者之疲勞檢測方案。由於在量測腦電波時須在使用者之頭皮表面黏貼許多電極貼片進行訊號量測,而造成相當程度之不便,此外該方案不易放置於可攜式或穿戴式裝置內,進而降低了使用者之意願。 In order to solve the dilemma of the above technology, an electroencephalogram is used to judge the fatigue detection scheme of the user. Because many electrode patches must be pasted on the surface of the user's scalp for signal measurement when measuring brainwaves, it causes considerable inconvenience. In addition, this solution is not easy to place in a portable or wearable device, which reduces the use. The will of the person.

綜上所述,如何提供一種可即時分析並調控使用者精神狀況之技術手段乃本領域亟需解決之技術問題。 In summary, how to provide a technical means that can analyze and adjust the user's mental state in real time is a technical problem that needs to be solved in this field.

為解決前揭之問題,本發明之目的係提供一種可辨識精神狀況並即時調控之嵌入式系統。 In order to solve the problem of the previous disclosure, an object of the present invention is to provide an embedded system that can identify mental conditions and adjust in real time.

為達上述目的,本發明提出一種精神狀況自動辨識與即時調 控嵌入式系統。於嵌入式系統內之穿戴式裝置進一步具有無線通訊電路、複數個生理感測器、肌電感測器、震動馬達、以及控制器。前述之生理感測器用以量測外部之使用者以提供複數個生理資訊。肌電感測器用於感測使用者之肌電變化以提供使用者之肌電感測資訊。控制器係連接無線通訊電路、生理感測器、肌電感測器以及震動馬達;控制器使用切換式決策樹分析生理資訊以提供精神狀況判斷資訊,並更依據肌電感測資訊以切換工作模式,此外,控制器更得依據精神狀況判斷資訊以判斷是否觸發震動馬達產生震動,以對使用者進行心肺同步調控。 To achieve the above object, the present invention proposes an embedded system for automatic identification and real-time adjustment of mental conditions. The wearable device in the embedded system further includes a wireless communication circuit, a plurality of physiological sensors, a muscle inductor, a vibration motor, and a controller. The aforementioned physiological sensor is used to measure an external user to provide a plurality of physiological information. The myoelectric sensor is used to sense the myoelectric changes of the user to provide the user's myoelectric measurement information. The controller is connected to a wireless communication circuit, a physiological sensor, a muscle induction sensor, and a vibration motor; the controller uses a switched decision tree to analyze physiological information to provide mental state judgment information, and to switch working modes based on the muscle inductance measurement information. In addition, the controller has to judge information based on the mental state to determine whether the vibration motor is triggered to generate vibration, so as to perform cardiopulmonary synchronization control on the user.

綜上所述,本發明之精神狀況自動辨識與即時調控嵌入式系統透過切換式決策樹分析生理資訊,讓系統可以依此產生之精神狀況來控制震動馬達之運作,而能即時的對使用者進行心肺同步調整。 To sum up, the mental state automatic identification and real-time regulation of the present invention analyzes physiological information through a switched decision tree, so that the system can control the operation of the vibration motor according to the generated mental state, and can real-time control the user. Perform cardiopulmonary synchronization adjustments.

S101~S107‧‧‧步驟 S101 ~ S107‧‧‧step

S200~s227‧‧‧步驟 S200 ~ s227‧‧‧step

1‧‧‧穿戴式裝置 1‧‧‧ Wearable

11‧‧‧無線通訊電路 11‧‧‧Wireless communication circuit

12‧‧‧生理感測器 12‧‧‧ physiological sensor

13‧‧‧肌電感測器 13‧‧‧ muscle inductance sensor

14‧‧‧震動馬達 14‧‧‧Vibration motor

15‧‧‧控制器 15‧‧‧controller

2‧‧‧擴香裝置 2‧‧‧ Diffuser

21‧‧‧擴香控制器 21‧‧‧ Diffuser Controller

22‧‧‧繼電器 22‧‧‧ Relay

23‧‧‧擴散器 23‧‧‧ diffuser

3‧‧‧電子裝置 3‧‧‧ electronic device

圖1係為本發明實施例之精神狀況自動辨識與即時調控之嵌入式系統之系統方塊示意圖。 FIG. 1 is a system block diagram of an embedded system for automatic identification and real-time adjustment of mental conditions according to an embodiment of the present invention.

圖2係為本發明之決策樹的建構流程圖。 FIG. 2 is a flowchart of constructing a decision tree according to the present invention.

圖3係為本發明之決策樹之根節點示意圖。 FIG. 3 is a schematic diagram of a root node of a decision tree of the present invention.

圖4係為本發明之嗜睡判斷決策樹之結構圖。 FIG. 4 is a structural diagram of a drowsiness judgment decision tree of the present invention.

圖5係為本發明之清醒判斷決策樹之結構圖。 FIG. 5 is a structural diagram of a sober judgment decision tree of the present invention.

圖6係為本發明之切換式決策樹之效能示意圖。 FIG. 6 is a performance diagram of a switched decision tree according to the present invention.

圖7係為本發明之精神狀況調控流程圖。 FIG. 7 is a flow chart for regulating the mental state of the present invention.

圖8係為本發明之擴香裝置內部方塊圖。 FIG. 8 is a block diagram of the interior of the fragrance spreading device of the present invention.

以下將描述具體之實施例以說明本發明之實施態樣,惟其並非用以限制本發明所欲保護之範疇。 The following describes specific embodiments to illustrate the implementation of the present invention, but it is not intended to limit the scope of the present invention.

請參閱圖1,其為本發明一實施例之精神狀況自動辨識與即時調控之嵌入式系統之系統方塊示意圖。前述之嵌入式系統包含穿戴式裝置1以及擴香裝置2。穿戴式裝置1包含無線通訊電路11、複數個生理感測器12、肌電感測器13、震動馬達14以及控制器15。前述之生理感測器12用以量測外部之使用者以提供複數個生理資訊。前述之肌電感測器13用於量測並提供使用者之肌電感測資訊。控制器15連接前述之無線通訊電路11、生理感測器12、肌電感測器13以及震動馬達14;其中控制器15使用決策樹分析生理資訊以提供精神狀況判斷資訊,並依據肌電感測資訊以切換工作模式。控制器15係依據精神狀況判斷資訊以判斷是否經由無線通訊電路11傳送一指令至擴香裝置2,以觸發擴香裝置2釋放精油;或判斷是否觸發震動馬達14產生震動。此外,穿戴式裝置1可將運行之狀態資訊經由無線通訊電路11傳送至電子裝置3,以讓電子裝置3於顯示介面上顯示穿戴式裝置1或擴香裝置2之運作資訊。前述之切換式決策樹係依生理資訊所處之狀態區間以切換執行嗜睡判斷決策樹以及清醒判斷決策樹。 Please refer to FIG. 1, which is a system block diagram of an embedded system for automatic identification and real-time adjustment of mental conditions according to an embodiment of the present invention. The aforementioned embedded system includes a wearable device 1 and a diffuser device 2. The wearable device 1 includes a wireless communication circuit 11, a plurality of physiological sensors 12, a muscle inductance sensor 13, a vibration motor 14, and a controller 15. The aforementioned physiological sensor 12 is used for measuring external users to provide a plurality of physiological information. The aforementioned muscle inductance sensor 13 is used for measuring and providing a user's muscle inductance measurement information. The controller 15 is connected to the aforementioned wireless communication circuit 11, the physiological sensor 12, the muscle inductance sensor 13, and the vibration motor 14. Among them, the controller 15 analyzes physiological information using a decision tree to provide mental state judgment information, and according to the muscle inductance measurement information To switch working modes. The controller 15 judges information according to the mental state to determine whether a command is transmitted to the diffuser device 2 via the wireless communication circuit 11 to trigger the diffuser device 2 to release essential oil; or to determine whether the vibration motor 14 is triggered to generate vibration. In addition, the wearable device 1 can transmit the running status information to the electronic device 3 through the wireless communication circuit 11 so that the electronic device 3 can display the operation information of the wearable device 1 or the diffuser device 2 on the display interface. The aforementioned switching decision tree is used to switch between the execution of the drowsiness judgment decision tree and the sober judgment decision tree according to the state interval in which the physiological information is located.

前述之控制器15可選用各式的控制晶片,例如:Arduino系統之控制晶片、8051控制晶片、mega328p控制晶片等,惟控制晶片之類型不在此限。前述之生理感測器12係包含採用編號為DCM03之血氧以及心跳感測器、採用編號為PT100之溫度感測器、肌電感測器13。於一實施例中,前述之肌電感測器13所量測之肌肉群為指淺屈肌(flexor digitorum superficiallys)。 The aforementioned controller 15 can use various control chips, for example, Arduino system control chip, 8051 control chip, mega328p control chip, etc., but the type of control chip is not limited to this. The aforementioned physiological sensor 12 includes a blood oxygen and heartbeat sensor numbered DCM03, a temperature sensor numbered PT100, and a muscle inductance sensor 13. In one embodiment, the muscle groups measured by the aforementioned muscle inductance sensor 13 are flexor digitorum superficiallys.

前述之生理資訊選擇的包含血氧濃度值、心跳值、皮膚溫度值、或心間期值之平均值或標準差,各個生理資訊之代號如表1所示: The aforementioned physiological information selection includes the average or standard deviation of blood oxygen concentration value, heartbeat value, skin temperature value, or intercardiac value. The code of each physiological information is shown in Table 1:     

由於每個人的生理訊號是不斷地在變動,因此需要即時的訊號處理與運算。本案之平均值採用移動平均值(Moving Average),其計算公式如Eq(1)所示: 為不斷更新量測值。在Eq(1)中,μ t0N筆資料初始的平均值,x N+1為第N+1筆資料,x 1為第1筆資料。移動平均值可以使資料一直處於最新的狀態,能避免激烈的跳動,並且透過其所計算出來的標準差,誤差也會比較小。 Since everyone's physiological signals are constantly changing, real-time signal processing and calculations are required. The average value in this case is the Moving Average. The calculation formula is shown in Eq (1): To continuously update the measured value. In Eq (1), μ t 0 is the initial average of N records, x N +1 is the N +1 record, and x 1 is the first record. The moving average can keep the data up-to-date, avoid fierce jitter, and the standard deviation calculated by it can make the error smaller.

前述生理訊號的標準差(S.D.),定義Eq(2)所示: 其中,μN筆資料的平均值,x i 為第i筆資料。本案選其作為辨識精神狀況的指標,是由於每個人生理訊號的基礎條件不同,但對於嗜睡反應的變化程度卻沒有太大的差異。也就是說標準差數值的大小,可以一致性地反映出每個人生理訊號的改變程度。當處於嗜睡狀態時,生理訊號的浮動值會下降,進而導致標準差跟著下降。故本案可將生理訊號的標準差(S.D.)視 為辨識精神狀況的良好指標。 The standard deviation (SD) of the aforementioned physiological signal is defined by Eq (2): Among them, μ is the average value of N pieces of data, and x i is the i-th piece of data. This case was selected as an indicator for identifying mental status because each person's physiological signal has different basic conditions, but there is not much difference in the degree of change in the drowsiness response. In other words, the size of the standard deviation value can consistently reflect the degree of change in each person's physiological signal. When in a drowsiness state, the floating value of the physiological signal will decrease, which will cause the standard deviation to decrease. Therefore, in this case, the standard deviation (SD) of physiological signals can be regarded as a good indicator for identifying mental conditions.

本案將切換式決策樹定義為兩種狀態。第一種狀態是在使用者目前精神狀況良好的時候,必須要判斷其是否進入嗜睡的狀態,並定義此狀態為嗜睡判斷決策樹;第二種狀態則是在使用者目前精神狀況處於嗜睡的時候,必須要判斷其是否回復至清醒的狀態,並定義此狀態為判斷清醒判斷決策樹。 This case defines a switched decision tree as two states. The first state is that when the user is currently in a good mental state, it is necessary to determine whether the user has entered a state of lethargy, and this state is defined as a decision tree for lethargy; the second state is when the user is currently in a state of lethargy At this time, it is necessary to determine whether it returns to the awake state, and define this state as a decision awake judgment decision tree.

舉例來說,當受測者精神狀態良好時,會處在判斷是否嗜睡決策樹。此時會不斷偵測使用者的生理訊號,並判斷其所處的狀態區間,直到判斷出使用者的精神狀態處於嗜睡時,才會進入判斷是否清醒決策樹。切換式決策樹的判斷方式有兩個優點,其一為當使用者精神狀況被判斷為不佳時,為符合真實的實際情形。此決策樹需要讓生理訊號有一定幅度的回升後,才會再判斷回使用者精神狀況處於良好;其二為切換式決策樹中的兩個門檻值間,有一段生理訊號區間相互重疊,此重疊區域能讓切換式決策樹判別出來的結果,不受因生理訊號在門檻值附近徘迴而造成來回跳動之誤差的影響。 For example, when the subject is in a good mental state, they will be in a decision tree to determine whether they are sleepy. At this time, the user's physiological signals are continuously detected and the state interval is determined. Only when it is determined that the user's mental state is drowsiness, a decision tree for judging whether or not is entered will be entered. The judgment method of the switched decision tree has two advantages. One is that when the mental state of the user is judged to be poor, it is consistent with the actual situation. This decision tree needs a certain degree of physiological signal pick-up before it can be judged that the user's mental state is good. The second is that between the two thresholds in the switched decision tree, there is a section of physiological signal overlapping each other. The overlapping area allows the results determined by the switched decision tree to be unaffected by the error caused by the back and forth bounce caused by the physiological signal wandering around the threshold.

決策樹的建構流程如圖2所示。其步驟說明如下: The construction process of the decision tree is shown in Figure 2. The steps are explained as follows:

S101:透過生理感測器12量測的生理特徵點。 S101: a physiological characteristic point measured by the physiological sensor 12.

S102:決定出相對應之門檻值。 S102: Determine the corresponding threshold.

S103:利用所選定之不同門檻值,分別將各個特徵點二值化。 S103: Binarize each feature point by using different selected threshold values.

S104:計算每個二值化後的生理特徵點之資料增益。 S104: Calculate the data gain of each binarized physiological feature point.

S105:根據增益結果決定決策樹的根節點。 S105: Determine the root node of the decision tree according to the gain result.

S106:屏除根結點的屬性後,重新計算剩餘特徵點的資料增益,找到其餘 的中間節點,若未完成分類則執行S104;若已完成分類則至S107。 S106: After removing the attributes of the root node, recalculate the data gain of the remaining feature points to find the remaining intermediate nodes. If the classification is not completed, go to S104; if the classification is completed, go to S107.

S107:完成決策樹分類。 S107: Complete decision tree classification.

本案之決策樹係於一實施例中,係以表2之生理特徵點作為建置依據。表2內共有32筆資料,包括清醒狀態與嗜睡狀態各16筆,每筆資料中各有八個特徵點。包括血氧平均值(SpO2_average)、血氧濃度標準差(SpO2_S.D.)、心跳平均值(HR_average)、心跳標準差(HR_S.D.)、心跳間期平均值(RRi_average)、心跳間期標準差(RRi_S.D.)、溫度平均值(Temp_average)和溫度標準差(Temp_average)。 The decision tree in this case is based on the physiological characteristic points of Table 2 in an embodiment. There are a total of 32 records in Table 2, including 16 records each in the awake state and the drowsiness state, each of which has eight characteristic points. Including blood oxygen average (SpO2_average), blood oxygen concentration standard deviation (SpO2_S.D.), Heartbeat average (HR_average), heartbeat standard deviation (HR_S.D.), Heartbeat average (RRi_average), heartbeat interval Standard deviation (RRi_S.D.), Temperature average (Temp_average), and temperature standard deviation (Temp_average).

接著,透過門檻值讓所有樣本資料做二值化的分類。利用門檻值將所有的樣本資料分為True與False兩大類,以便進行資料增益的計算,其結果如表3以及表4所示。若資料大於所設定的門檻值時則歸類至True,小於所設定的門檻值時則歸類至False。本案所使用的切換式決策樹需建構出兩種決策樹,分別是判斷是否清醒決策樹與判斷是否嗜睡決策樹所。兩者所存在的目的不同,故需要選定的門檻值亦不同,而透過不同門檻值所建構出的決策樹也會有所差異。 Then, all the sample data are binarized by threshold. Use the threshold value to divide all the sample data into two categories, True and False, in order to calculate the data gain. The results are shown in Table 3 and Table 4. If the data is greater than the set threshold value, it is classified as True, and when it is less than the set threshold value, it is classified as False. The switched decision tree used in this case needs to construct two kinds of decision trees, which are the decision tree for judging whether it is awake and the decision tree for drowsiness. The two have different purposes, so the thresholds to be selected are also different, and the decision trees constructed through different thresholds will also be different.

判斷是否嗜睡決策樹在選定門檻值時,主要判斷使用者何時從清醒狀態進入嗜睡狀態。因此判斷是否嗜睡決策樹的門檻值,可選擇下列兩種方式:第一種為特徵點標準差的門檻值選定方式,其表格中各欄位特徵值相加後取平均,以此做為標準差之門檻值;第二種是特徵點平均值的門檻值選定方式,此種特徵值選定方式為避免隨著不同人或不同時間而有改變。因此利用每次測量的基準值乘上一定比例來做為平均值的門檻值。而基準值為每次戴上手環後,測量之第五十筆到三百五十筆資料的平 均。在判斷是否清醒決策樹在選定門檻值時,其旨在判斷使用者何時脫離嗜睡之狀態,故在門檻值的選定方式與判斷是否是睡決策樹相同也有兩種。包括將表格中各欄位特徵值相加後取平均與基準值乘上一定比例做為門檻值。 When determining whether the drowsiness decision tree selects a threshold value, it mainly determines when the user enters the drowsiness state from the awake state. Therefore, the following two methods can be used to determine the threshold value of the drowsiness decision tree: The first method is the threshold value selection method of the standard deviation of the feature points. The feature values of the columns in the table are added and averaged as the standard. The threshold value of the difference; the second is the threshold value selection method of the average value of the feature points, this feature value selection method is to avoid changes with different people or different times. Therefore, the reference value of each measurement is multiplied by a certain ratio as the threshold value of the average value. The reference value is the average of the 50th to 350th data measured each time the bracelet is worn. When determining whether the sober decision tree is at the threshold value, it aims to determine when the user is out of drowsiness. Therefore, there are two ways to select the threshold value and determine whether it is a sleeping decision tree. Including adding the characteristic values of each field in the table and taking the average and the reference value multiplied by a certain ratio as the threshold value.

若全部資料集合S,總共有15筆醒著、15筆想睡,其資訊增益計算公式Eq(3)所示: If all the data sets S, there are 15 pens awake and 15 pens wanting to sleep, the information gain calculation formula Eq (3) is as follows:

以下計算各個生理特徵值的資訊增益,目標選擇資訊增益最大的生理特徵值,作為決策樹的分類屬性: The following calculates the information gain of each physiological characteristic value, and the target selects the physiological characteristic value with the largest information gain as the classification attribute of the decision tree:

以SpO2_Average做分類屬性: Use SpO2_Average as the classification attribute:

(1)大於等於基準值的98%為True的有16筆資料,其中有13筆醒著、3筆想睡,則資訊增益為: (1) There are 16 records with 98% or more of the reference value being True, of which 13 records are awake and 3 records want to sleep.

Entropy(SpO2_Average>=base_98%)=0.6962 Entropy (SpO2_Average> = base_98%) = 0.6962

(2)小於基準值得98%為False的有14筆資料,其中有2筆醒著、12筆想睡: (2) There are 14 records that are less than 98% worth False, of which 2 records are awake and 12 records want to sleep:

Entropy(SpO2_Average<base_98%)=0.5917 Entropy (SpO2_Average <base_98%) = 0.5917

(3)SpO2_Average之資訊獲利為:Gain(S,SpO2_Average)=1-(16/30)*(0.6962)-(14/30)*(0.5917)=0.3526 (3) The information profit of SpO2_Average is: Gain (S, SpO2_Average) = 1- (16/30) * (0.6962)-(14/30) * (0.5917) = 0.3526

以SpO2_S.D.做分類屬性: Use SpO2_S.D. As the classification attribute:

(1)大於等於0.58為True的有12筆資料,其中有9筆醒著、3筆想睡: (1) There are 12 records with a value of 0.58 or more being True, of which 9 records are awake and 3 records want to sleep:

Entropy(SpO2_S.D.>=0.58)=0.8113 Entropy (SpO 2 _S.D.> = 0.58) = 0.8113

(2)小於0.58為False的有18筆資料,其中有6筆醒著、12筆想睡: (2) There are 18 records less than 0.58 being False, of which 6 records are awake and 12 records want to sleep:

Entropy(SpO2_S.D.<0.58)=0.9183 Entropy (SpO 2 _S.D. <0.58) = 0.9183

(3)SpO2_S.D.之資訊獲利為: Gain(S,SpO2_S.D.)=1-(12/30)*(0.8113)-(18/30)*(0.9183)=0.1245 (3) The profit of SpO2_S.D. Is: Gain (S, SpO 2 _S.D.) = 1- (12/30) * (0.8113)-(18/30) * (0.9183) = 0.1245

以HR_Average做分類屬性: Use HR_Average as the classification attribute:

(1)大於等於基準值的90%為True的有17筆資料,其中有13筆醒著、4筆想睡: (1) There are 17 records where 90% or more of the reference value is True, of which 13 records are awake and 4 records want to sleep:

Entropy(HR_Average>=base_90%)=0.7871 Entropy (HR_Average> = base_90%) = 0.7871

(2)小於基準值的90%為False的有13筆資料,其中有2筆醒著、11筆想睡: (2) There are 13 records that are less than 90% of the reference value, and 2 records are awake and 11 records want to sleep:

Entropy(HR_Average<base_90%)=0.6194 Entropy (HR_Average <base_90%) = 0.6194

(3)HR_Average之資訊獲利為:Gain(S,HR_Average)=1-(17/30)*(0.7871)-(13/30)*(0.6194)=0.2856 (3) The information profit of HR_Average is: Gain (S, HR_Average) = 1- (17/30) * (0.7871)-(13/30) * (0.6194) = 0.2856

以HR_S.D.做分類屬性: Use HR_S.D. As the classification attribute:

(1)大於等於4.50為True的有15筆資料,其中有11筆醒著、4筆想睡: (1) There are 15 records with a value of 4.50 or higher, of which 11 records are awake and 4 records want to sleep:

Entropy(HR_S.D.>=4.50)=0.8366 Entropy (HR_S.D.> = 4.50) = 0.8366

(2)小於4.50為False的有15筆資料,其中有4筆醒著、11筆想睡: (2) There are 15 records less than 4.50 being False, of which 4 records are awake and 11 records want to sleep:

Entropy(HR_S.D.<4.50)=0.8366 Entropy (HR_S.D. <4.50) = 0.8366

(3)HR_S.D.之資訊獲利為: Gain(S,HR_S.D.)=-(15/30)*(0.8366)-(15/30)*(0.8366)=0.1634 (3) The profit of HR_S.D. Information is: Gain (S, HR_S.D.) =-(15/30) * (0.8366)-(15/30) * (0.8366) = 0.1634

以Temp_Average做分類屬性: Use Temp_Average as the classification attribute:

(1)大於等於36.0為True的有16筆資料,其中有8筆醒著、8筆想睡: (1) There are 16 records with a value of 36.0 or higher, and 8 records are awake and 8 records want to sleep:

Entropy(Temp_Average>36.0)=1 Entropy (Temp_Average> 36.0) = 1

(2)小於36.0為False的有14筆資料,其中有7筆醒著、7筆想睡: (2) There are 14 records less than 36.0 being False, of which 7 records are awake and 7 records want to sleep:

Entropy(Temp_Average<36.0)=1 Entropy (Temp_Average <36.0) = 1

(3)Temp_Average之資訊獲利為:Gain(S,Temp_Average)=1-(16/30)*(1)-(14/30)*(1)=0.00 (3) The information gain of Temp_Average is: Gain (S, Temp_Average) = 1- (16/30) * (1)-(14/30) * (1) = 0.00

以Temp_S.D.做分類屬性: Use Temp_S.D. As the classification attribute:

(1)大於等於0.43為True的有10筆資料,其中有7筆醒著、3筆想睡: (1) There are 10 records that are equal to or greater than 0.43, and 7 records are awake and 3 records want to sleep:

Entropy(Temp_S.D.>=0.43)=0.8813 Entropy (Temp_S.D.> = 0.43) = 0.8813

(2)小於0.43為False的有20筆資料,其中有8筆醒著、12筆想睡: (2) There are 20 records less than 0.43 being False, of which 8 records are awake and 12 records want to sleep:

Entropy(Temp_S.D.<0.43)=0.9710 Entropy (Temp_S.D. <0.43) = 0.9710

(3)Temp_Average之資訊獲利為:Gain(S,Temp_Average)=1-(10/30)*(0.8813)-(20/30)*(0.9710)=0.0589 (3) The information gain of Temp_Average is: Gain (S, Temp_Average) = 1- (10/30) * (0.8813)-(20/30) * (0.9710) = 0.0589

以RRi_Average做分類屬性: Use RDi_Average as the classification attribute:

(1)大於等於108%為True的有12筆資料,其中有3筆醒著、9筆想睡: (1) There are 12 records with 108% or higher being True, of which 3 records are awake and 9 records want to sleep:

Entropy(RRi_Average>108%)=0.8113 Entropy (RRi_Average> 108%) = 0.8113

(2)小於108%為False的有18筆資料,其中有12筆醒著、6筆想睡: (2) Less than 108% of the 18 records are false, of which 12 records are awake and 6 records want to sleep:

Entropy(RRi_Average<108%)=0.9183 Entropy (RRi_Average <108%) = 0.9183

(3)RRi_Average之資訊獲利為:Gain(S,RRi_Average)=1-(12/30)*(0.8113)-(18/30)*(0.9183)=0.1245 (3) The profit of RRi_Average is: Gain (S, RRi_Average) = 1- (12/30) * (0.8113)-(18/30) * (0.9183) = 0.1245

以RRi_S.D.做分類屬性: Use RDi_S.D. As the classification attribute:

(1)大於等於5.11為True的有12筆資料,其中有7筆醒著、5筆想睡: (1) There are 12 records that are 5.11 or higher for True, of which 7 records are awake and 5 records want to sleep:

Entropy(RRi_S.D.>=5.11)=0.9798 Entropy (RRi_S.D.> = 5.11) = 0.9798

(2)小於5.11為False的有18筆資料,其中有8筆醒著、10筆想睡: (2) There are 18 records less than 5.11 being False, of which 8 records are awake and 10 records want to sleep:

Entropy(RRi_S.D.<5.11)=0.9911 Entropy (RRi_S.D. <5.11) = 0.9911

(3)RRi_S.D.之資訊獲利為:Gain(S,RRi_S.D.)=1-(12/30)*(0.9798)-(18/30)*(0.9911)=0.0022 (3) The profit of the information of RRi_S.D. Is: Gain (S, RRi_S.D.) = 1- (12/30) * (0.9798)-(18/30) * (0.9911) = 0.0022

從上述八個生理特徵點所算出的資訊增益可得知,SpO2_Average最適合做為分類屬性,因此本案選擇SpO2_Average做為判斷是否嗜睡決策樹之根節點,其根節點示意圖如圖3所示。 From the information gain calculated from the above eight physiological characteristic points, it can be known that SpO2_Average is most suitable as a classification attribute. Therefore, SpO2_Average is selected as the root node of the decision tree in this case.

在建立出根節點後,跟著同時建立出兩條分支,根結點為血氧濃度平均值。其中血氧濃度平均值大於等於基準值98%的資料共有16筆,血氧濃度平均值小於基準值98%的資料共有14筆。分別對兩分支的資料做資訊增益的計算,尋找出兩分支的其餘中間節點。此時屏除血氧濃度平均值後剩餘的七個生理特徵點,繼續計算資訊增益。重複上述動作,持續分類至所有分支下無法在做任何分類時,便能完成嗜睡判斷決策樹之建構。嗜睡判斷決策樹之結構圖如圖4所示,第一層子節點之判斷依據包含了心跳值之平均值或標準差,第二層子節點之判斷依據包含了皮膚溫度之平均值或心間期值之平均值。 After the root node is established, two branches are simultaneously established, and the root node is the average blood oxygen concentration. Among them, there were 16 records with average blood oxygen concentration greater than or equal to 98% of the reference value, and 14 records with average blood oxygen concentration less than 98% of the reference value. The information gain calculation is performed on the data of the two branches to find the remaining intermediate nodes of the two branches. At this time, the seven physiological characteristic points remaining after the average blood oxygen concentration are screened out, and the information gain is continued to be calculated. Repeat the above actions, and continue to classify to all branches. When no classification can be done, the construction of the drowsiness decision tree can be completed. The structure of the drowsiness judgment decision tree is shown in Figure 4. The judgment basis of the first layer of child nodes includes the average value or standard deviation of the heartbeat value, and the judgment basis of the second layer of child nodes includes the average value of the skin temperature or the heart The average of the period values.

判斷是否清醒決策樹與上述建構的方式相同,不同的地方為 將資料二值化時所設的門檻值。特徵點標準差的門檻值是利用各欄位特徵值的加權平均值選定出來,其加權比例為嗜睡:清醒=3:1。而特徵點平均值的門檻值則是依據經驗法則來歸納出基準值所需要乘上的比例。並利用後續測試出來的結果再加以調整比例。清醒判斷決策樹之結構圖如圖5所示,清醒判斷第一層子節點,判斷依據為該心跳值之平均值;而清醒判斷第二層子節點,判斷依據為該心間期值之平均值。 The method of judging whether a sober decision tree is the same as the above construction, except that the threshold is set when the data is binarized. The threshold value of the standard deviation of the feature points is selected by using the weighted average of the feature values of each field, and its weighting ratio is drowsiness: awake = 3: 1. The threshold of the average value of the feature points is based on the rule of thumb to sum up the ratio needed to multiply the reference value. And use the results of subsequent tests to adjust the proportion. The structure of the sober judgment decision tree is shown in Figure 5. The sober judgment of the first-level child nodes is based on the average value of the heartbeat value; the sober judgment of the second-level child nodes is based on the average of the heart interval value. value.

本案在驗證切換式決策樹的辨識率時選用leave-one-out error rate。此方法能有效的驗證小量資料的分類準確度。首先從30筆分類樣本中取出第1筆樣本,利用剩下的29筆樣本建立出切換式決策樹,並利用第1筆資料對所建立出的切換式決策樹進行測試,並記錄其測試結果。重覆上步驟,每次皆拿出1筆分類樣本,利用剩下29筆資料建構出切換式決策樹,並記錄其測試結果,如表3.5、表3.6所示。利用leave-one-out error rate測試結果可以發現,在判斷是否嗜睡決策樹中會發現有2筆資料分類錯誤,其辨識率為97.67%,而其中2筆分類錯誤的資料,為嗜睡樣本資料誤判為清醒的結果;在判斷是否清醒決策樹中有1筆資料分類錯誤,其辨識率為98.33%,其中判斷錯誤的有1筆資料,為清醒樣本資料誤判為嗜睡的結果。 In this case, the leave-one-out error rate is used when verifying the recognition rate of the switched decision tree. This method can effectively verify the classification accuracy of a small amount of data. First, take the first sample from the 30 classification samples, use the remaining 29 samples to establish a switched decision tree, and use the first data to test the established switched decision tree and record the test results. . Repeat the above steps, take out one classification sample each time, use the remaining 29 data to construct a switched decision tree, and record the test results, as shown in Table 3.5 and Table 3.6. Using the leave-one-out error rate test results, it can be found that there are two data classification errors in the decision tree for drowsiness, the recognition rate is 97.67%, and two of the misclassified data are misjudged for drowsiness sample data. It is the result of sobriety; there is 1 data classification error in judging whether the sober decision tree has a recognition rate of 98.33%. Among them, 1 data is incorrect, which is the result of misjudgment of sober sample data as drowsiness.

比較切換式決策樹與單一使用判斷是否嗜睡決策樹,在判斷同一筆資料的結果(圖6),發現判斷是否嗜睡決策樹在判別資料結果時,倘若生理訊號在決策樹門檻值附近徘徊,會造成結果不斷來回震盪的誤差。而使用切換式決策樹判別同一筆生理訊號時,發現當結果判斷出精神狀態處於嗜睡時,生理訊號會經過一定程度的回升後才會再被判斷回精神狀態處於良好。因此,本案在使用切換式決策樹可以有效地降低結果的誤判率,並更符合真實情形發生時的狀態。 Comparing the switchable decision tree and the single-use decision whether it is a drowsiness decision tree. When judging the results of the same data (Figure 6), it is found that when determining whether the drowsiness decision tree is discriminating the results of the data, if the physiological signal hovers near the threshold of the decision tree, The error that caused the results to oscillate back and forth. When using a switched decision tree to determine the same physiological signal, it was found that when the result determined that the mental state was drowsiness, the physiological signal would be judged to return to a good mental state after a certain degree of pick-up. Therefore, the use of a switched decision tree in this case can effectively reduce the false positive rate of the results, and is more in line with the state of the real situation.

為提供使用者切換穿戴式裝置1之工作模式,本案選擇肌電感測器13作為手勢判斷之用。肌電感測器13的原理是透過可用手勢改變時手部的肌肉會收縮與舒張,此會造成兩點肌肉間的電位的變化。表面電極貼片可用來擷取肌肉細胞電訊號,經過當處理後即可識別出不同的手勢動作。 In order to provide the user with the option to switch the working mode of the wearable device 1, the muscle sensor 13 is selected for gesture determination in this case. The principle of the myocardial sensor 13 is that the muscles of the hand will contract and relax when the gesture can be changed, which will cause the potential change between the two muscles. Surface electrode patches can be used to capture the electrical signals of muscle cells. After processing, different gestures can be recognized.

本案利用不同的閥值區間,定義出兩種不同的動作的門檻。由於肌電訊號的起始電位,會因為手部放置位置、皮膚表面乾濕度、電力訊號等外部因素,而造成電位標準不同。因此,本案利用移動平均法的方 式來解決起始電位跳動的問題。取當下資料的前100筆做平均,利用計算出來的移動平均值當作門檻值。令當下的訊號為N,前100筆移動平均值為M,當N>M則開始辨識動作;當N<M時則結束動作辨識。每次判斷動作區間的資料需要大於20筆資料才會列入計算,防止一些肌電雜訊干擾到動作辨識的結果。 This case uses different threshold intervals to define the thresholds for two different actions. Due to the initial potential of the myoelectric signal, the potential standards are different due to external factors such as hand placement, skin surface dryness and humidity, and power signals. Therefore, this case uses the method of moving average method to solve the problem of initial potential jump. Take the first 100 records of the current data as the average, and use the calculated moving average as the threshold. Let the current signal be N and the first 100 moving averages be M. When N> M, the recognition action starts; when N <M, the action recognition ends. Each time the data for judging the motion interval needs to be greater than 20 pieces of data, it will be included in the calculation to prevent some EMG noise from interfering with the result of motion recognition.

當人處在心肺相位同步的狀態下,便可以有效的提升血氧濃度,因此使用者感到嗜睡想要休息時,可藉由本案利用心肺相位同步的技術來達到此目的。心肺相位同步是一種心血管系統與呼吸系統之間的互相調控配合出來的結果。藉由文獻與大量的實驗後發現,若將心跳訊號放大到能讓人的感覺器官感受到,則可讓呼吸系統慢慢的配合上心血管系統。為不讓放大的心跳訊號令使用者感到不適,故本案選用微型震動馬達14振動出與脈搏相同頻率的訊號,讓人的感受器官可以明顯感受到脈搏跳動的頻率,經由演算法取出其峰值的時間,並在相同的時間點上打出震動訊號,使身體明顯感受到脈搏的震動頻率,進而促使其漸漸地達到心肺相位同步。 When the person is in the state of cardiopulmonary phase synchronization, the blood oxygen concentration can be effectively increased, so when the user feels drowsiness and wants to rest, this case can be achieved by using the technology of cardiopulmonary phase synchronization. Cardiopulmonary phase synchronization is a result of mutual regulation and coordination between the cardiovascular system and the respiratory system. Through the literature and a large number of experiments, it has been found that if the heartbeat signal is amplified so that it can be felt by the sense organs, the respiratory system can slowly cooperate with the cardiovascular system. In order to prevent the enlarged heartbeat signal from making the user feel uncomfortable, the micro vibration motor 14 is selected to vibrate at the same frequency as the pulse, so that the sensory organ can obviously feel the frequency of the pulse beat, and the peak Time, and at the same time point, a vibration signal is emitted, so that the body can obviously feel the pulse frequency of the pulse, and then promote it to gradually achieve the cardiopulmonary phase synchronization.

一般文獻將睡眠定義成兩個階段:非快速眼動睡眠期與快速眼動睡眠期。而國際睡眠醫學又將其中的非快速眼動睡眠期再細分為四個階段,因此加上快速眼動期睡眠期總共五個階段:入睡期、淺睡期、熟睡期、深睡期、快速動眼睡眠期。 General literature defines sleep as two phases: non-REM sleep and REM sleep. International sleep medicine has further divided the non-rapid eye movement sleep period into four stages, so in addition to the rapid eye movement sleep period, there are five stages: falling asleep, light sleep, deep sleep, deep sleep, rapid Eye movement during sleep.

而本案將非快速眼動期中的入睡期至深睡期統一命名為睡眠期,因此加上清醒的狀態總共有三個區間,分別是:清醒、睡眠期與快速眼動睡眠期。若希望在睡眠時能讓身心得到有效的休息,則必需進入至深層睡眠期才能得到顯著的效果。而其中深層睡眠期所指的為非快速眼動 睡眠期中的熟睡期與深睡期。因此本案在偵測睡眠期時,主要是利用熟睡期與深睡期的生理特徵做為參考標準。而在喚醒使用者時,倘若在深層睡眠或快速眼動期時被喚醒,腦部會沒辦法得到充分的休息而感到非常的疲憊。因此本案會先判斷使用者是否進入睡眠狀態,並從睡眠期進入至快速眼動睡眠期後,完成一個完整的睡眠周期,才會驅動手環的微振動馬達喚醒使用者。 In this case, the sleep period to the deep sleep period in the non-rapid eye movement period are collectively named as the sleep period, so there are three intervals in total, including the awake, sleep period, and rapid eye movement sleep period. If you want to effectively rest your mind and body during sleep, you must enter deep sleep to get significant results. The deep sleep period refers to the period of deep sleep and deep sleep during non-rapid eye movement sleep. Therefore, in the detection of the sleep period, the physiological characteristics of the deep sleep period and the deep sleep period were mainly used as the reference standard. When awakening the user, if he is awakened during deep sleep or rapid eye movement, the brain will not be able to get enough rest and feel very tired. Therefore, this case will first determine whether the user enters the sleep state, and after entering the rapid eye movement sleep period from sleep to complete a complete sleep cycle, the micro-vibration motor of the bracelet will be driven to wake the user.

請參閱圖7,其為本案之精神狀況調控流程圖。該調控流程說明如下: Please refer to FIG. 7, which is a flowchart of the mental state control of the case. The regulation process is explained as follows:

S200:使用者透過肌電感測器13選擇調控模式。 S200: The user selects a control mode through the muscle sensor 13.

S210:進入心肺相位同步模式。 S210: Enter the cardiopulmonary phase synchronization mode.

S211:命令微震動馬達14產生與心跳相同或大致相同之震動訊號。 S211: The micro-vibration motor 14 is instructed to generate a vibration signal that is the same as or substantially the same as the heartbeat.

S212:由嗜睡決策樹判斷使用者是否清醒?若是,則執行S213;若否,則執行S211。 S212: Determine whether the user is awake from the drowsiness decision tree? If yes, execute S213; if not, execute S211.

S220:進入睡區間自動偵測及喚醒模式。 S220: Enter the sleep zone automatic detection and wake-up mode.

S221:分析清醒期間之生理訊號。 S221: Analyze physiological signals during sobriety.

S222:判斷生理訊號是否符合睡眠期門檻值?若是,則執行S223;若否,則執行S221。 S222: Determine whether the physiological signal meets the threshold during the sleep period? If yes, execute S223; if not, execute S221.

S223:分析睡眠期間之生理訊號。 S223: Analyze physiological signals during sleep.

S224:判斷生理訊號是否符合眼動期門檻值?若是,則執行S225;若否,則執行S223。 S224: Determine whether the physiological signal meets the threshold of the eye movement period? If yes, execute S225; if not, execute S223.

S225:分析快速眼動期間之生理訊號。 S225: Analyze physiological signals during rapid eye movement.

S226:判斷生理訊號是否符合快速眼動期門檻值?若是,則執行S227;若 否,則執行S225。 S226: Determine whether the physiological signal meets the threshold of the rapid eye movement period? If yes, execute S227; if not, execute S225.

S227:命令微震動馬達14產生與心跳相同或大致相同之震動訊號。 S227: The micro-vibration motor 14 is instructed to generate a vibration signal with the same or approximately the same heartbeat.

承上,當利用肌電感測器13選擇睡眠區間自動偵測與喚醒模式後,會先定義出受測者目前處於清醒狀態。利用建構切換式決策樹時的心跳基準值作為清醒區間的判斷標準。人的完整睡眠流程故定依序為:清醒期→睡眠期→快速眼動期。 In conclusion, when the inductive sensor 13 is used to select the sleep zone automatic detection and wake-up mode, it will first define that the subject is currently awake. The reference value of the heartbeat when constructing a switched decision tree is used as the criterion for awake interval. The complete sleep process of a person is therefore set in order: awake period → sleep period → rapid eye movement period.

從清醒期進入睡眠期時,心跳平均值必須比基準值低15%以上且心跳標準差必須小於2.0,資料必須連續超過門檻值100筆,才會判斷進入睡眠期;從睡眠期進入快速眼動睡眠期時,心跳標準差必須要大於3且心跳平均值需高於心跳基準值的15%,並且資料需要連續超過門檻值50筆。從肌電訊號中可以輔助判斷出,在睡眠期與快速眼動期時,肌電訊號平均值與標準差並無明顯差異。進入快速眼動睡眠期後會控制器15會開始計時20分鐘,20分鐘後會驅動手環中的微型震動馬達14喚醒使用者。由於第一次完整睡眠周期中,快速眼動睡眠期的出現時間約為5~15分鐘,故本案選擇在進入快速眼動睡眠期後的20分鐘喚醒受測者。讓受測者處在入睡期或淺睡期時被喚醒,精神狀況會比在深層睡眠或快速眼動睡眠期被喚醒時良好。 From waking period to sleep period, the average heartbeat must be more than 15% lower than the reference value and the standard deviation of the heartbeat must be less than 2.0, and the data must continuously exceed the threshold value of 100 strokes before it is judged to enter the sleep period; from sleep period to rapid eye movement During sleep, the standard deviation of the heartbeat must be greater than 3, the average heartbeat must be higher than 15% of the baseline value, and the data must continuously exceed the threshold value of 50 pens. From the EMG signals, it can be judged that there is no significant difference between the average and standard deviation of EMG signals during sleep and rapid eye movement. After entering the rapid eye movement sleep period, the controller 15 will start counting for 20 minutes, and after 20 minutes, it will drive the miniature vibration motor 14 in the bracelet to wake up the user. Since the appearance of the REM sleep period in the first complete sleep cycle is about 5-15 minutes, this case chose to wake the subject 20 minutes after entering the REM sleep period. When the subject is awakened during the period of falling asleep or light sleep, the mental condition will be better than that when aroused during deep sleep or rapid eye movement sleep.

本案在判斷睡眠區間時,主要使用心跳感測器以及肌電感測器13所擷取出來的生理訊號做判斷,以下將介紹本案所整理出來的三個狀態區間的生理特徵:清醒期之生理訊號如附件1所示。此時心跳的平均值較高,但比決策樹的基準值低大約5-10%。可以發現在此階段的心跳標準差跳動幅度大,大約在3-5之間,肌電訊號波動也較大,標準差偏高。在此階段中會 定義出清醒期至睡眠期的門檻值,將門檻值定為:心跳平均值低於基準值的15%以及心跳標準差低於2連續100筆資料。資料連續超過門檻值100筆後,便會判斷從清醒期進入睡眠期。 In this case, the physiological signals extracted by the heartbeat sensor and the muscle inductance sensor 13 are mainly used to judge the sleep interval. The physiological characteristics of the three state intervals organized by this case are described below: physiological signals of the awake period As shown in Annex 1. At this time, the average heartbeat is high, but it is about 5-10% lower than the benchmark value of the decision tree. It can be found that the standard deviation of the heartbeat at this stage is large, about 3-5, and the myoelectric signal fluctuation is also large, and the standard deviation is high. At this stage, the threshold value from waking period to sleep period is defined. The threshold value is set as follows: the average value of heartbeat is lower than 15% of the reference value and the standard deviation of heartbeat is less than 2 consecutive 100 records. After the data continuously exceeds the threshold value of 100 pens, it will be judged from waking period to sleep period.

睡眠期之生理訊號如附件2所示,本案將整個非快速眼動睡眠期統稱為睡眠期,在此區間內可以觀察出心跳平均值相較於清醒期時明顯下降許多。睡眠期時心跳平均值大約比心跳基準值低15~20%,同時也能發現到心跳的標準差也明顯下降。進入睡眠期後可發現,此時肌電訊號的變動量越來越少,代表動作越來越少。因此肌電訊號並無太大的起伏。 The physiological signals of the sleep period are shown in Annex 2. In this case, the entire non-rapid eye movement sleep period is collectively referred to as the sleep period. In this interval, it can be observed that the average heartbeat is significantly reduced compared to the awake period. The average heartbeat during sleep is approximately 15-20% lower than the baseline heartbeat value. At the same time, the standard deviation of the heartbeat is also significantly reduced. After entering the sleep period, it can be found that the amount of changes in the myoelectric signal at this time is less and less, which means that the movement is less and less. Therefore, the EMG signal does not have much fluctuation.

快速眼動睡眠期之生理訊號如附件3所示,在快速眼動睡眠期間可以發現,此時的心率反映與清醒時極為相似。心跳的平均值與標準差明顯上升,甚至有時會出現不規律的情況。因此將睡眠期至快速眼動期的門檻定義為:心跳平均值高於基準值的15%與心跳標準差大於3,連續50筆資料。在此階段中肌肉還是處在休眠狀態,因此肌電圖所顯示的波型與睡眠期極為類似,沒有較大的起伏變化。 The physiological signals during REM sleep are shown in Annex 3. It can be found during REM sleep that the heart rate response at this time is very similar to when awake. The average and standard deviation of heartbeats have risen significantly, and even irregularities sometimes occur. Therefore, the threshold from sleep to rapid eye movement is defined as: the average heartbeat is 15% higher than the reference value and the standard deviation of the heartbeat is greater than 3, 50 consecutive data. At this stage, the muscles are still in a dormant state, so the wave pattern displayed by the electromyogram is very similar to that during sleep, without major fluctuations.

本案將前述之穿戴式手環裝置之生理感測器12、無線藍芽傳輸器、控制器15微小化並且模組化。並用FFC軟排線作為各模組間之溝通橋樑。前述之穿戴式手環裝置之外殼係配置成複數個串接形成之殼體,並將各內部元件分佈於殼體內。 This case miniaturizes and modularizes the physiological sensor 12, wireless Bluetooth transmitter, and controller 15 of the aforementioned wearable bracelet device. And use FFC flexible cable as a communication bridge between modules. The casing of the aforementioned wearable bracelet device is configured as a plurality of casings formed in series, and each internal component is distributed in the casing.

進一步說明之,因此在電路製作時為考慮符合人體手腕的弧度。因此是將電路切割為七塊模組(數量不在此限),以便生理感測電能緊貼於手腕。避免生活中因手環的體積而造成負擔,所以特別做電路微小化的改良,將每塊模組限制在長寬約1.8cm*3cm的殼體大小內(附件4),再透過 FFC軟排線串接(附件5)。其實際成品圖如附件6所示。 To further explain, therefore, the arc of the human wrist is considered when the circuit is manufactured. Therefore, the circuit is cut into seven modules (the number is not limited) so that the physiological sensing energy is closely attached to the wrist. To avoid the burden caused by the volume of the bracelet in life, we have made special improvements to miniaturize the circuit, limiting each module to a case size of about 1.8cm * 3cm (accessory 4), and then through the FFC soft row Line connection (Annex 5). The actual finished product is shown in Annex 6.

請接著參閱圖8,其為擴香裝置2內部方塊圖。擴香裝置2進一步包含擴香控制器21、繼電器22以及擴散器23。前述之擴香控制器21具有無線通訊電路11之控制晶片(例如:RFduino)。擴香控制器21係透過繼電器22連接至擴散器23。當穿戴式裝置1判斷使用者之精神狀況處於嗜睡時,可選擇啟動心肺同步模式,或是透過無線通訊方式來驅動擴香裝置2之運作,讓擴散器23釋放出精油,以達到調控使用者精神之目的。 Please refer to FIG. 8, which is a block diagram of the interior of the diffuser device 2. The diffuser device 2 further includes a diffuser controller 21, a relay 22, and a diffuser 23. The aforementioned diffuser controller 21 has a control chip (for example, RFduino) of the wireless communication circuit 11. The diffuser controller 21 is connected to the diffuser 23 through a relay 22. When the wearable device 1 determines that the user's mental state is drowsiness, he can choose to activate the cardiopulmonary synchronization mode, or drive the operation of the diffuser device 2 through wireless communication, so that the diffuser 23 releases the essential oil to regulate the user Spiritual purpose.

請參閱附件7,其為前述之電子裝置3所提供之顯示介面,在介面中顯示三個生理數據,分別為血氧濃度、心跳率及體溫。且能透過圖示了解目前所處的精神狀態與調控模式,使用者可藉由此介面清楚得知自己的生理資訊。當精神狀況處於良好時,介面會顯示Awake(清醒)。當處於嗜睡時,介面下方會顯示Drowsy(嗜睡)。當處於心肺相位同步調控模式時,介面下方會顯示CRPS。而當處於精神狀況自動偵測與調控模式時,介面下方會顯示目前睡眠狀況所屬的區間(附件8),。 Please refer to Annex 7, which is a display interface provided by the aforementioned electronic device 3, and displays three physiological data in the interface, which are blood oxygen concentration, heart rate, and body temperature. And can understand the current mental state and regulation mode through the icon, users can clearly know their own physiological information through this interface. When mentally in good shape, the interface will show Awake. When in drowsiness, Drowsy is displayed below the interface. When in the cardiopulmonary phase synchronization mode, CRPS is displayed below the interface. When in the automatic detection and regulation mode of mental condition, the interval to which the current sleep condition belongs is displayed below the interface (Annex 8).

上列詳細說明係針對本發明之一可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The above detailed description is a specific description of a feasible embodiment of the present invention, but this embodiment is not intended to limit the patent scope of the present invention. Any equivalent implementation or change that does not depart from the technical spirit of the present invention should be included in Within the scope of the patent in this case.

Claims (10)

一種精神狀況自動辨識與即時調控之嵌入式系統,包含:穿戴式裝置,包含:無線通訊電路;複數個生理感測器,用以量測外部之使用者以提供複數個生理資訊;肌電感測器,用於感測該使用者之肌電變化以提供該使用者之肌電感測資訊;震動馬達;控制器,連接該無線通訊電路、該等生理感測器、該肌電感測器以及該震動馬達;其中該控制器使用切換式決策樹分析該等生理資訊,以提供精神狀況判斷資訊,其中該控制器更依據該肌電感測資訊以切換工作模式;其中,該控制器係依據該精神狀況判斷資訊以判斷是否觸發該震動馬達產生震動;其中該切換式決策樹係依該等生理資訊所處之狀態區間切換執行嗜睡判斷決策樹以及清醒判斷決策樹。     An embedded system for automatic identification and real-time adjustment of mental conditions, including: a wearable device including: a wireless communication circuit; a plurality of physiological sensors for measuring external users to provide a plurality of physiological information; a muscle inductance measurement Device for sensing changes in the myoelectricity of the user to provide the user's muscle inductance measurement information; a vibration motor; a controller connected to the wireless communication circuit, the physiological sensors, the muscle inductance sensor, and the A vibration motor; wherein the controller analyzes the physiological information using a switching decision tree to provide mental state judgment information, wherein the controller switches working modes based on the muscle inductance information; wherein the controller is based on the spirit The condition judgment information is used to determine whether the vibration motor is triggered to generate a vibration. The switchable decision tree switches between the execution of the sleepiness judgment decision tree and the sober judgment decision tree according to the state interval of the physiological information.     如請求項1所述之嵌入式系統,其中該等生理資訊選擇的包含血氧濃度值、心跳值、皮膚溫度值、或心間期值。     The embedded system according to claim 1, wherein the physiological information includes a blood oxygen concentration value, a heartbeat value, a skin temperature value, or an intercardiac value.     如請求項2所述之嵌入式系統,其中該等生理資訊包含平均值或標準差。     The embedded system according to claim 2, wherein the physiological information includes an average value or a standard deviation.     如請求項3所述之嵌入式系統,其中該切換式決策樹其根節點之判斷依據為該血氧濃度值之標準差。     The embedded system according to claim 3, wherein the root node of the switched decision tree is determined based on the standard deviation of the blood oxygen concentration value.     如請求項4所述之嵌入式系統,其中: 該嗜睡判斷決策樹,進一步包含:嗜睡判斷第一層子節點,判斷依據為該心跳值之標準差或平均值;嗜睡判斷第二層子節點,判斷依據為該皮膚溫度之平均值或該心間期值之平均值;該清醒判斷決策樹,進一步包含:清醒判斷第一層子節點,判斷依據為該心跳值之平均值;以及清醒判斷第二層子節點,判斷依據為該心間期值之平均值。     The embedded system according to claim 4, wherein: the drowsiness judgment decision tree further comprises: a drowsiness judgment first-level child node, and the judgment basis is the standard deviation or average value of the heartbeat value; the drowsiness judgment second-level child node , The judgment basis is the average of the skin temperature or the average value of the intercardiac value; the sober judgment decision tree further includes: the sober judgment of the first layer of child nodes, the judgment basis is the average of the heartbeat value; and the sober judgment The child nodes of the second layer are judged based on the average value of the intercardiac value.     如請求項1所述之嵌入式系統,其中該工作模式選擇的包含喚醒模式、睡區間自動偵測模式、或心肺同步模式。     The embedded system according to claim 1, wherein the working mode selection includes a wake-up mode, a sleeping interval automatic detection mode, or a cardiopulmonary synchronization mode.     如請求項6所述之嵌入式系統,其中該心肺同步模式為該控制器觸發該震動馬達產生與該使用者之心跳頻率相同或大致相同之震動。     The embedded system according to claim 6, wherein the cardiopulmonary synchronization mode is that the controller triggers the vibration motor to generate a vibration with the same or approximately the same heartbeat frequency as the user.     如請求項6所述之嵌入式系統,其中該睡區間自動偵測模式係分析該等生理資訊以判斷該使用者之睡眠期,該喚醒模式係於該控制器判斷該睡眠期符合快速眼動睡眠期則觸發該震動馬達產生與該使用者之心跳頻率相同或大致相同之震動。     The embedded system according to claim 6, wherein the sleep interval automatic detection mode analyzes the physiological information to determine the sleep period of the user, and the wakeup mode is determined by the controller that the sleep period meets rapid eye movement During the sleep period, the vibration motor is triggered to generate a vibration with the same or approximately the same heartbeat frequency as the user.     如請求項1所述之嵌入式系統,其中該穿戴式裝置係為穿戴式手環,且該穿戴式裝置之外殼係配置成複數個串接形成之殼體,並將該穿戴式裝置之內部元件分佈於該等殼體內。     The embedded system according to claim 1, wherein the wearable device is a wearable bracelet, and the shell of the wearable device is configured into a plurality of shells formed in series, and the interior of the wearable device is The components are distributed in these cases.     如請求項1至9任一項所述之嵌入式系統,更包含通訊連結該穿戴式裝置之擴香裝置,其該控制器係依據該精神狀況判斷資訊以判斷是否觸發該擴香裝置釋放精油。     The embedded system according to any one of claims 1 to 9, further comprising a diffuser device communicatively connected to the wearable device, and the controller is based on the mental state judgment information to determine whether to trigger the diffuser device to release essential oil. .    
TW105101203A 2016-01-15 2016-01-15 Automatic identification of state of mind and real - time control of embedded systems TWI556188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105101203A TWI556188B (en) 2016-01-15 2016-01-15 Automatic identification of state of mind and real - time control of embedded systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105101203A TWI556188B (en) 2016-01-15 2016-01-15 Automatic identification of state of mind and real - time control of embedded systems

Publications (2)

Publication Number Publication Date
TWI556188B TWI556188B (en) 2016-11-01
TW201812686A true TW201812686A (en) 2018-04-01

Family

ID=57851451

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105101203A TWI556188B (en) 2016-01-15 2016-01-15 Automatic identification of state of mind and real - time control of embedded systems

Country Status (1)

Country Link
TW (1) TWI556188B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI765452B (en) * 2020-12-08 2022-05-21 日商Jfe鋼鐵股份有限公司 Trigger condition determination method for time-series signal, abnormality diagnosis method for monitored equipment, and trigger condition determination device for time-series signal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004040531A1 (en) * 2002-10-28 2004-05-13 Morris Steffin Method and apparatus for detection of drownsiness and for monitoring biological processes
TW200608938A (en) * 2004-09-10 2006-03-16 Jang-Min Yang Cloth system for automatic inspection and analysis feedback of body health condition to provide healthcare guidance and applying method thereof
TWM455469U (en) * 2012-09-19 2013-06-21 Acomo Technology Co Ltd Physiological status determining system for monitoring physiological status of athletes
TWM515178U (en) * 2014-06-30 2016-01-01 Univ Tajen Driving physiological detection system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI765452B (en) * 2020-12-08 2022-05-21 日商Jfe鋼鐵股份有限公司 Trigger condition determination method for time-series signal, abnormality diagnosis method for monitored equipment, and trigger condition determination device for time-series signal

Also Published As

Publication number Publication date
TWI556188B (en) 2016-11-01

Similar Documents

Publication Publication Date Title
JP4023429B2 (en) Portable biological information monitor device
CN102056535B (en) Method of obtaining a desired state in a subject
Khan et al. Biometric systems utilising health data from wearable devices: applications and future challenges in computer security
KR102313552B1 (en) Apparatus and method for sleep monitoring
EP3102094B1 (en) System and method for determining timing of sensory stimulation delivered to a subject during a sleep session
TWI650737B (en) Wearable device and method for evaluating possible occurrence of cardiac arrest
JP7191159B2 (en) Computer program and method of providing subject&#39;s emotional state
US10548513B2 (en) Activity recognition
CN104720748B (en) A kind of sleep stage determines method and system
CN112005311B (en) Systems and methods for delivering sensory stimuli to a user based on a sleep architecture model
CN110049714A (en) System and method for promoting awakening
JP6079824B2 (en) Sleep evaluation apparatus and program
US10172530B2 (en) Biological information processing system and method of controlling biological information processing system
WO2017067010A1 (en) Sleep evaluation display method and apparatus, and evaluation device
WO2020140913A1 (en) Data processing method and apparatus, electronic device and storage medium
JP2012055464A (en) Sleep evaluating device, sleep evaluating system, and program
CN111657855B (en) Sleep evaluation and sleep awakening method and device and electronic equipment
JP2015150034A (en) Sleep state determination device, sleep state determination method, and sleep state determination system
Wang et al. Emotionsense: An adaptive emotion recognition system based on wearable smart devices
CN105854147A (en) Intelligent home environment regulation system and method
TW201812686A (en) Embedded system for automatic recognition and instant control of mental state enabling to trigger a vibration motor to generate vibrations for performing a cardiopulmonary synchronization control
Whang et al. Preparing computers for affective communication: A psychophysiological concept and preliminary results
WO2022181168A1 (en) Stimulus presentation system, stimulus presentation method, program, and model generation system
US20230376114A1 (en) Methods and systems for computer-human interactions
US20240090807A1 (en) Wearable device and method for stress detection, emotion recognition and emotion management

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees