Adan Reyes Reyes

André Nasr

Delphine Sinoquet

Sami Hlioui

Adan Reyes Reyes

Adán Reyes Reyes

Méthodologie de dimensionnement par optimisation bayésienne d

Keywords: Machines synchrones, moteurs à aimant permanent, optimisation bayésienne, processus gaussiens, méthode des éléments finis

come

INTRODUCTION

L'optimisation est devenue de nos jours une étape primordiale dans le processus de dimensionnement des machines électriques. Cette étape consiste à trouver le bon compromis entre l'ensemble des objectifs visés, tout en respectant les différentes contraintes qui peuvent s'imposer. Dans les applications de mobilité électrique, on cherche souvent à maximiser le rendement du moteur électrique tout en minimisant le poids et le coût. Le dimensionnement par optimisation se présente alors comme une stratégie efficace et un outil de prise de décision.

Un problème d'optimisation de machines électriques est un problème complexe. D'une part, et à cause du comportement non-linéaire des matériaux magnétiques, le modèle électromagnétique utilisé pour simuler les performances de ces machines est aussi non linéaire. Cela conduit, par exemple, à l'utilisation de la méthode des Eléments Finis (EF) surtout que cette méthode présente aussi d'autres avantages comme sa précision et sa généricité (applicable sur n'importe quel dessin). D'autre part, les variables de conception impliquées dans cette optimisation sont nombreuses. Les concepteurs ont souvent recours à des algorithmes d'optimisation stochastiques tels que des algorithmes génétiques et l'optimisation par essaims particulaires [START_REF] Ma | Multiobjective Optimization of Switched Reluctance Motors Based on Design of Experiments and Particle Swarm Optimization[END_REF][2] pour explorer l'espace de conception afin d'échapper aux optima locaux. Cependant, ces méthodes nécessitent un grand nombre de simulations EF, ce qui engendre un coût de calcul important.

Les approches classiquement utilisées pour réduire le temps d'une optimisation reposent sur des modèles de substitution des sorties d'intérêt du simulateur. Dans [START_REF] Reyes | Robust design optimization taking into account manufacturing uncertainties of a permanent magnet assisted synchronous reluctance motor[END_REF], des modèles de substitution fixes ont été construits à partir d'un échantillon limité de simulations EF et utilisés dans un algorithme d'optimisation multi-objectifs convergeant rapidement vers une approximation du front de Pareto « réel ». Cependant, des différences ont été constatées entre les résultats prédits par les modèles de substitution et ceux prédits par le simulateur EF. Afin d'améliorer la précision d'une telle optimisation, les modèles de substitution doivent être mis à jour à partir de nouvelles simulations pendant le processus d'optimisation, par exemple en utilisant une approche adaptative comme l'Optimisation Bayésienne (BO) [START_REF] Zhang | An Efficient Multi-Objective Bayesian Optimization Approach for the Automated Analytical Design of Switched Reluctance Machines[END_REF] [START_REF] Lei | A Review of Design Optimization Methods for Electrical Machines[END_REF].

Dans ce travail, nous avons appliqué trois méthodologies d'optimisation au problème de dimensionnement d'une machine électrique synchro-réluctante assistée d'aimants (PMaSynRel) : une première optimisation utilisant une approche basée sur des modèles de substitution fixes (Optim1), et deux approches d'optimisation bayésienne (Optim2 et Optim3). Les résultats issus de ces optimisations sont par la suite comparés et analysés. Dans la section suivante, nous introduirons la topologie de la machine ainsi que les paramètres de conception. Ensuite, nous allons décrire les processus d'optimisation et comparer les résultats obtenus.

GEOMETRIE DE LA MACHINE ETUDIEE ET VARIABLES D'OPTIMISATION

La machine étudiée dans cet article est illustrée à la Fig. 1. Il s'agit d'une machine triphasée synchro-réluctante assistée d'aimants à 8 pôles, 48 encoches et 3 aimants permanents par pôle. Le Tableau 1 présente les variables utilisées dans les optimisations. On peut noter que ces variables sont normalisées entre 0 et 1. Pour calculer la valeur réelle d'une variable, nous appliquons la formule suivante : Pour cette optimisation il existe trois bornes fixes : Beta_L1_min = 10°, Beta_L2_min = 10° et Beta_L3_min = 10°. A préciser que les paramètres géométriques du stator ont été fixés et seul le rotor a été optimisé.

𝑋 𝑟é𝑒𝑙 = 𝑋 𝑟é𝑒𝑙-𝑚𝑖𝑛 + (𝑋 𝑟é𝑒𝑙-𝑚𝑎𝑥 -𝑋 𝑟é𝑒𝑙-𝑚𝑖𝑛 ) * 𝑋 𝑛𝑜𝑟𝑚 (1)

OPTIMISATION D'UNE MACHINE PMASYNREL

Les trois optimisations seront utilisées pour maximiser le couple moyen de la machine ainsi que son rapport de puissance qui est défini comme le rapport entre la puissance à la vitesse maximale et la puissance maximale. Ce dernier objectif vise à obtenir des machines qui présentent une faible chute de puissance entre la vitesse de base et la vitesse maximale. Une seule contrainte limitant la FEM à vitesse maximale sera utilisée. Le problème d'optimisation multiobjectifs sous contraintes à résoudre s'écrit comme suit :

min x∈D x {f 1 (x),f 2 (x)} tel que g(x) ≤0 (2)
où f 1 et f 2 sont les opposés du couple moyen et du rapport de puissance (afin de les maximiser), et g la valeur maximale de la FEM (peak) à la vitesse maximale (8000 RPM) moins un seuil de 650 V pp . D x est l'espace des variables d'optimisation présenté dans le Tableau 1. Le Tableau 2 résume les objectifs et contraintes utilisés. Dans cette étude, la fonction de covariance utilisée pour le couple moyen ainsi que la FEM est la fonction Matérn 5/2. Pour le ratio des puissances et vu que c'est irrégulier, on a utilisé la fonction exponentielle. Le plan d'expériences initial est un Hypercube Latin optimisé avec un critère « Maximin » car il présente de bonnes propriétés de projection (sur chacun des axes d'entrée) et est optimisé pour couvrir au mieux l'espace de recherche [START_REF] Pronzato | Design of computer experiments: space filling and beyond[END_REF].

Méthodologies d'optimisation

Pour l'optimisation basée sur des modèles de substitution fixes (Optim1), nous avons utilisé l'algorithme génétique NSGA II [START_REF] Deb | A Fast and Elitist Multiobjective Genetic Algorithm: A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II[END_REF] Dans cette étude, nous avons utilisé deux critères d'enrichissement : Pour Optim2, on a utilisé q-batch Pareto Efficient Global Optimization (qParEGO) [START_REF] Daulton | Differentiable Expected Hypervolume Improvement for Parallel Multi-Objective Bayesian Optimization[END_REF]. Pour Optim3, c'était q-batch Expected Hypervolume Improvement (qEHVI) [START_REF] Daulton | Differentiable Expected Hypervolume Improvement for Parallel Multi-Objective Bayesian Optimization[END_REF]. Nous décrivons brièvement ces méthodes dans les sections suivantes.

q-batch Pareto Efficient Global Optimization

L'algorithme Pareto Efficient Global Optimization (ParEGO) [START_REF] Knowles | Parego: a hybrid algorithm with on-line landscape approximation for expensive multiobjective optimization problems[END_REF] et sa version à q points (qParEGO) est une généralisation directe de l'algorithme bien connu Efficient Global Optimization (EGO) [START_REF] Jones | Efficient global optimization of expensive black-box functions[END_REF] aux problèmes d'optimisation multi-objectifs. L'algorithme EGO vise à résoudre le problème suivant :

min x∈D x f(x) (3)
L'algorithme EGO est illustré par la Fig. 3. La fonction à minimiser, 𝑓, en pointillés noirs n'est connue que par un nombre limité de simulations représentées par les points rouges. A partir de ces points, un processus gaussien f ̂ est construit : sur la figure, sa moyenne est représentée par la courbe bleue et un intervalle de confiance de ce métamodèle (en gris) est déduit de l'écart type du GP (±1,96√(C(x, x)). La ligne pointillée rouge représente la valeur minimale/optimale trouvée avec les simulations (points rouges). Nous définissons ensuite un point 𝑥 en bleu, candidat pour une nouvelle simulation. En ce point, nous pouvons prédire, grâce au GP f ̂, une amélioration par rapport au point minimum actuel (Predicted improvement for the candidate for a new simulation using current kriging model). Mathématiquement, cette fonction est définie comme suit : Nous ne connaissons pas la valeur réelle de l'amélioration obtenue avec 𝑥 puisque nous n'avons pas évalué f au point 𝑥 à ce stade, mais nous pouvons estimer une moyenne de l'amélioration prédite par le GP à partir de la densité de probabilité associée au GP au point 𝑥, qui est la zone verte sous la courbe gaussienne autour de 𝑥. Nous définissons donc l'amélioration espérée (EI : Expected Improvement) comme l'espérance d'améliorer la meilleure valeur simulée courante : où 𝔼 f ̂ est l'espérance par rapport à la densité de probabilité déduite du GP associée à f ̂ évaluée en x, et dℙ f ̂ est la mesure de cette densité. Cette expression peut être calculée analytiquement [START_REF] Jones | Efficient global optimization of expensive black-box functions[END_REF].

I(x) = (min(𝑓(𝑥 𝑖 )) i∈1,2,…n -f ̂(x)) + (
EI(x) = 𝔼 f ̂[I(x)|D n ] = ∫ I(x) ∞ -∞ dℙ f ̂ (5)
Dans notre étude, nous traitons un problème multiobjectifs. La première approche pour résoudre un problème multi-objectifs consiste à résoudre plusieurs problèmes monoobjectifs, par exemple, définis avec une nouvelle fonction objectif F(x) représentant une combinaison (généralement une somme pondérée) des fonctions objectives originales. Plus précisément, ParEGO utilise la fonction suivante :

F(x) = α(wf 1 (x) + (1 -w)f 2 (x)) + max(wf 1 (x), (1 -w)f 2 (x)) (6)
avec 𝛼 généralement égal à 0,05 [START_REF] Knowles | Parego: a hybrid algorithm with on-line landscape approximation for expensive multiobjective optimization problems[END_REF]. Grâce au terme nonlinéaire max(wf 1 (x), (1 -w)f 2 (x)), nous pouvons obtenir des solutions dans les zones non convexes du front Pareto de f 1 et f 2 [START_REF] Knowles | Parego: a hybrid algorithm with on-line landscape approximation for expensive multiobjective optimization problems[END_REF]. Ces zones ne seraient pas accessibles avec une optimisation uniquement de α(wf

3.4.

q-step Expected Hypervolume Improvement Une autre approche d'optimisation Bayésienne dédiée à l'optimisation multi-objectifs est basée sur l'amélioration espérée de l'hypervolume (EHVI : Expected HyperVolume Improvement). Par analogie avec le critère EI, un critère d'amélioration en espérance est maximisé afin de choisir le point 𝑥 pour la prochaine simulation. Pour la méthode EHVI, la "qualité" de la solution actuelle (donnée par l'ensemble de Pareto actuel défini par les points noirs sur la Fig. 4, noté Par({x i } i=1 n )) est mesurée par l'hypervolume dominé (surface en bleu sur la Fig. 4, notée HV(Par({x i } i=1 n )) ) par rapport à un point de référence f HV (point rouge sur la Fig. 4). Plus l'hypervolume dominé est grand, meilleure est la solution. L'amélioration est alors obtenue en calculant l'hypervolume "gagné" (surface en vert dans la Fig. 4) lors de l'ajout d'un nouveau point (point vert dans la Fig. 4). Nous définissons l'amélioration de l'hypervolume comme étant : Comme suggéré précédemment, le critère de remplissage EHVI peut être converti en un critère multipoint grâce à une stratégie greedy.

HVI(x) = HV (Par({x i } i=1 n ) ∪ f ̂J(x)) -HV(Par({x i } i=1 n )) (7

Gestion des contraintes

La manière la plus connue de traiter les contraintes g(x) ≤ 0 en optimisation Bayésienne est d'utiliser l'amélioration faisable (FI : feasibility improvement) :

FI(x) = I(x)1 [g(x) ≤0] (9)
Fig. 4. Représentation de l'EHVI pour un problème de minimisation biobjectifs. Figure adaptée de [START_REF] Palar | On the Impact of Covariance Functions in Multi-Objective Bayesian Optimization for Engineering Design[END_REF].

où 1 [g(x) ≤0] est la fonction indicatrice sur g(x) ≤ 0. Elle est égale à 1 si g(x) ≤ 0 et à 0 sinon. Ce faisant, le critère d'EI devient l'amélioration faisable en espérance (EFI) :

EFI(x) = 𝔼[I(x)1 [g(x) ≤0] ]= EI(x) ℙ g ̂(g(x) ≤0) (10)
où P 𝑔 ̂(g(x) ≤0) est la probabilité de satisfaire les contraintes, obtenue à partir du GP g ̂ associé à g. Des expressions similaires peuvent être facilement obtenues avec EHVI. Les critères qParEGO et qEHVI utilisés dans ce travail sont calculés avec Botorch, un paquet codé en Python [START_REF] Balandat | BoTorch: A Framework for Efficient Monte-Carlo Bayesian Optimization[END_REF]. Dans Botorch, la fonction indicatrice est remplacée par une fonction sigmoïde pour régulariser [START_REF] Daulton | Differentiable Expected Hypervolume Improvement for Parallel Multi-Objective Bayesian Optimization[END_REF].

Processus d'optimisation

Les méta-modèles fixes pour Optim1 ont été construits en utilisant un plan d'expériences LHS maximin de 450 points. Pour les 2 optimisations Optim2 et Optim3, nous avons utilisé la même approche LHS maximin mais avec 250 points. Une fois le DOE initial de 250 points obtenu, nous avons effectué 50 itérations de BO ; à chaque itération, nous avons optimisé les deux critères BO en ajoutant 4 points, ce qui a permis d'ajouter un total de 200 points pour chaque BO. D'un point de vue temps de calcul, les 3 approches font le même nombre d'appels (450) du simulateur EF ce qui permet une comparaison équitable.

RESULTATS DES OPTIMISATIONS

La Fig. 5 montre les points ajoutés x new tout au long des itérations pour les optimisations bayésiennes qParEGO et qEHVI. Le rapport de puissance de la machine c) est égal à 0,95. Pour augmenter ce rapport, un couple plus faible est à accepter ce qui montre que les deux objectifs choisis sont contradictoires.

La puissance maximale de 182,7 kW est atteinte pour la machine b). Cette machine possède aussi la quantité d'aimants la plus élevée avec 1,84 kg.

CONCLUSIONS

Nous avons présenté dans cet article une comparaison entre une optimisation par métamodèles fixes et deux approches bayésiennes appliqués au cas du dimensionnement du rotor d'une machine synchro-réluctante assistée par aimants permanents. Pour la première approche, nous avons remarqué des différences entre les performances des solutions prédites et simulées. Les approches bayésiennes basées sur des simulations éléments finis à chaque itération évitent cet écueil.

Grâce à la mise à jour adaptative des modèles de substitution, les approches bayésiennes permettent de trouver des solutions avec de meilleures performances, tout en utilisant un nombre limité de simulations éléments finis. Ce type d'approches peut être utile lorsqu'on est face à un problème d'optimisation nécessitant un nombre important de simulations ou bien utilisant un simulateur gourmant en temps de calcul comme dans des problèmes 3D, des problèmes multiphysiques ou bien des problèmes tenant compte des incertitudes.

REMERCIEMENTS

Nous voudrions remercier le CONAHCYT (Consejo Nacional de Humanidades Ciencias y Tecnologías) pour son support.

Fig. 1 .

 1 Fig. 1. Géométrie de la PMaSynRel.

Tableau 2 :

 2 Objectifs et contrainte de l''optimisation Fonction Objective 1 𝑓 1 Maximiser le couple moyen Fonction Objective 1 𝑓 2 Minimiser les ondulations couple Contrainte 𝑔 FEM à vitesse maximal ≤ 650 𝑉 𝑝𝑝 3.1. Construction des méta-modèles Pour construire le métamodèle d'une fonction f, nous supposons que f est une réalisation d'un processus Gaussien entièrement défini par sa fonction moyenne, μ(x) et sa fonction de covariance C(x, x ′ ) qui mesure la corrélation entre les valeurs de la fonction f entre deux points différents x et x ′ . Si x = x ′ , C(x, x) est égale à la variance de densité de probabilité Gaussienne en x qui estime l'erreur de prédiction du métamodèle en ce point. Partant d'un plan d'expériences initial D n = {x i , f(x i )} i=1 n , le modèle de substitution f ̂|D n (noté f ̂ pour simplicité) est la moyenne μ n (x) du GP conditionné aux données observées D n , et sa variance donne une estimation des erreurs de prédiction. Plus de détails sur la construction des métamodèles du type GP pourront être trouvés dans [6].

Fig. 2 .

 2 Fig. 2. Approche d'optimisation bayésienne.

  [START_REF] Zhang | An Efficient Multi-Objective Bayesian Optimization Approach for the Automated Analytical Design of Switched Reluctance Machines[END_REF] avec (𝑥) + = max(𝑥, 0). Ainsi, si la prédiction d'un point quelconque n'améliore pas le minimum actuel (f ̂(x) ≥ min(𝑓(𝑥 𝑖 )) i∈1,2,…n ), alors son amélioration est égale à zéro.

Fig. 3 .

 3 Fig. 3. Illustration de la méthode EGO pour un problème de minimisation.Figure adaptée de [12].

  ) où nous notons f ̂J le modèle GP joint pour les 2 objectifs. Comme dans le cas de l'EI, nous ne connaissons pas la valeur réelle de l'hypervolume vert au point candidat x car nous n'avons pas calculé f 1 and f 2 à ce point. Nous pouvons néanmoins estimer l'espérance de cette amélioration de l'hypervolume grâce aux GPs f ̂1 et f ̂2 associés à f 1 et f 2 : EHVI(x) = 𝔼 f ̂J[HVI(x)]= ∫ HV

Fig. 5 . 6 :

 56 Fig. 5. Points de simulation ajoutés au fil des itérations (l'itération zéro correspond au plan d'expériences initial). Le graphique supérieur correspond à l'algorithme qEHVI et le graphique inférieur à l'algorithme qParEGO.

Fig. 6 .

 6 Fig. 6. Comparaison des résultats obtenus par les 3 méthodologies d'optimisation : avec modèles de substitution fixes : points bleus et cyans (points orange correspondent aux vérification EF des points cyans) et points non-dominées des stratégies bayésiennes qParEGO et qEHVI : points noirs et rouges respectivement.

Fig. 7 .

 7 Fig. 7. Résultats des optimisations : Optim1 (points bleus), et le DOE initial associé (points rouges).

Fig. 8 .

 8 Fig. 8. Designs des machines pour des solutions sélectionnées dans la Fig. 6 : a) Optm1, b) Optim2, et c) Optim3.

  qui a été couplé aux métamodèles créés.

	Pour Optim2 et Optim3, une approche BO a été adoptée.
	Cette approche est souvent dédiée à l'optimisation des
	fonctions boîte noire dont les évaluations sont coûteuses en
	termes de calcul. Elle s'appuie sur des GPs construits à partir
	n . Comme décrit de données simulées D n = {x i , f(x i )} i=1 précédemment, ces GPs sont notés f ̂1, f ̂2, et g ̂. Ensuite, de
	nouveaux points de simulation x new = {x new j	} j=1 q sont choisis
	en fonction d'un critère de remplissage (infill criterion) basé
	sur les modèles GP courants, plus précisément sur leurs
	moyennes et leurs variances. L'objectif de ce critère est
	double : explorer le domaine de conception pour rendre le
	modèle GP plus prédictif dans les zones inexplorées (objectif
	d'exploration) et également dans les zones présentant un
	grand potentiel par rapport aux objectifs d'optimisation
	(exploitation). Ainsi, l'optimisation de ce critère de
	remplissage fournit à chaque itération des points à simuler.
	Les nouvelles simulations Y new sont ainsi utilisées pour
	mettre à jour les modèles GP. Cette procédure est répétée
	jusqu'à ce qu'un critère d'arrêt soit satisfait. Le critère d'arrêt
	est souvent défini comme un budget maximal de simulations.
	Cette approche est schématisée à la Fig. 2.

Tableau 3 :

 3 Résultats des optimisation : Variables de conception et quantités d'intêret.

			Machine a) Machine b) Machine c)
	Variables	Rad_PM_L1	0,86	0,89	0,89
	de conception	Rad_PM_L3 Rad_PM_L3	0,82 0,64	0,66 0,6	0,66 0,8
		Rad_Brid_L1	0,2	0,1	0,24
		Rad_Brid_L2	0,17	0,23	0,1
		Rad_Brid_L3	0,43	0,51	0,38
		Beta_L1	0,87	0,83	0,67
		Beta_L2	0,41	0,72	0,29
		Beta_L3	0,53	0,7	0,5
		PM_Len_L1	0,78	0,9	0,86
		PM_Len_L2	0,84	0,9	0,85
		PM_Len_L3	0,77	0,7	0,9
	Quantités	Couple	326,2 N.m	335,7 N.m	345,8 N.m
	d'intêret	Rapport de	0,98	0,99	0,95
		puissance
		Puissance	180,2 kW	182,7 kW	177,4 kW
		maximale
		FEM à 8000	624,6 Vpp	629,9 Vpp	649,6 Vpp
		rpm
		Poids aimants	1,69 kg	1,84 kg	1,79 kg


Alexandre Houzé
email: alexandre.houze@u-bourgogne.fr

Stéphane Binczak

On the feasibility of movement detection from portable, cost effective, dry EEG headset

Keywords: biosensors, signal processing, EEG, wearable headset, dry EEG, BCI, movements, machine learning

With the democratization of EEG devices, the possibility of on-the-fly EEG analysis has grown, although some of the major locks are the prices of this equipment and the reliability of signal classification. In this study, we propose to use cost-effective materials to develop reliable hardware and to train machine learning algorithm to prove that it is possible to classify EEG signals on open environments. It was decided early in the process to classify EEG signals corresponding to actions as it can be used to help people with medical difficulties better interact with their environment. In addition, long-term monitoring of the subject's actions through their EEG signals could be useful to keep an accurate record of their movements.

Introduction

This work aims to discuss the feasibility of on-thefly human motion prediction, to improve users' autonomy and environment control, using dry electroencephalography on a wearable headset. Electroencephalography (EEG) is a method to record bioelectrical activity in the brain [START_REF] Teplan | Fundamental of EEG Measurement[END_REF] that can be linked to different actions or behaviors depending on the characteristics of the signal as well as the area of the brain generating the signal [START_REF] Binder | The Wernicke area: Modern evidence and a reinterpretation[END_REF][START_REF] Flinker | Redefining the role of Broca's area in speech[END_REF] and the frequencies within the signal or its waveform [START_REF] Nayak | EEG Normal Waveforms[END_REF]. These signals are generated by the simultaneous activation of neurons and can be captured by an indirect measurement of the corresponding electric field. By placing electrodes on a subject's scalp, these signals can be recorded. Usually wet electrodes are used but to reduce stress on the subject we have decided to use dry electrodes, although these dry electrodes provide poorer signal quality from many subjects [START_REF] Ball | Signal quality of simultaneously recorded invasive and noninvasive EEG[END_REF]. EEG has long been reserved for medical fields as a diagnostic tool [START_REF] Saletu | EEG topography and tomography in diagnosis and treatment of mental disorders: Evidence for a keylock principle[END_REF], but the development of electronics and science in general has made EEG more accessible, and the development of devices acquisition to be more versatile. Several EEG helmets are available for purchase, but since prices are a drawback for some research projects, we have dep. [START_REF] Teplan | Fundamental of EEG Measurement[END_REF] Colloque JETSAN 2023 cided to work with cost-effective equipment [START_REF] Frey | Comparison of an open-hardware electroencephalography amplifier with medical grade device in brain-computer interface applications[END_REF]. In the context of actual and active Human movement prediction research [START_REF] Zhang | Classification of Hand Movements from EEG using a Deep Attention-based LSTM Network[END_REF][START_REF] Kim | Classification of Movement Intention Using Independent Components of Premovement EEG[END_REF], the aim of this study is to prove that non-invasive methods can be used to detect precise articulation activation. By being able to classify on the fly EEG signals responsible for specific movements, we could improve brain computer interfaces [START_REF] Bulárka | Brain-Computer Interface review[END_REF] performances and enable direct control of specific actuators through EEG [START_REF] Krapic | Integrating Blink Click interaction into a head tracking system: Implementation and usability issues[END_REF].

Hardware

EEG studies are usually primarily performed in clinical or at least highly controlled environments.

In order to be able to record data on a less constrained environment, it has been decided to developp a custom wearable EEG headset based on the openBCI [START_REF]openBCI open-sources documentation[END_REF] project while using dry electrodes in order to simplify experimental protocol and therefore be able to obtain a sufficient amount of data relatively quickly. The headset is composed of 16 dry electrodes placed as shown in Figure 1.

Figure 1: Homemade portable EEG headset with dry electrodes seen from back and front.

The acquisition frequency is 125 Hz, just above the Nyquist condition for useful EEG signals wich is from 1Hz to 60Hz in our case. The helmet is adjustable to fit all head shapes and is completely wireless so the subject can move freely while wearing it while following standard 10-20 electrode placement [START_REF] Chatrian | Ten Percent Electrode System for Topographic Studies of Spontaneous and Evoked EEG Activities[END_REF] as presented in Figure 2. A1 and A2 are in contact with earlobes and serves as groundings because of their good vascularization and poor innervation. As mentioned before, we have already developed methods to detect eye blinks using EEG signals [START_REF] Houzé | Blinking characterization for each eye from EEG analysis using wavelets[END_REF], the ground truth of which was obtained by the use of a camera [START_REF] Pavani | Haar-like features with optimally weighted rectangles for rapid object detection[END_REF][START_REF] Johnston | A review of image-based automatic facial landmark identification techniques[END_REF] , and automatic detection by image processing. For this work, we reused the same method using image computation to detect eye blinks. To record the images, we use a simple webcam which provides 30 images in 720p definition per second. We wanted to include the detection of eye blinks to prove that it is possible to detect different types of human actions through their EEG signals while building on already proven results. The second piece of hardware that has been developed is a homemade glove that covers the hand and elbow which is able to measure the mechanical movements of these joints. This glove consists of 3 main parts, the hand part where we measure fingers flexion, the elbow part from which is measured the elbow flexion, and the supply part that we fixed on the forearm so that it does not hamper subject movements. As can be observed in Figure 3 For each joint measured, we used flexible resistors that we attached to cotton fabric so that the component was not in direct contact with the skin. We used 100% cotton fabric to avoid allergic reactions. The fabric is adjustable to fit all body types and provide more accurate results, unlike loose fabric that could create wrinkles that can reduce measurement accuracy. When the subject moves, for instance its elbow or its fingers, the value of the flexible resistance will vary, the higher the value, the higher the angle formed by the articulation, as illustrated in Figure 4 where the subject fully closes its fist then open it. Flexion measurement is based on a simple concept of resistance measure and mapping. The more the articulation is flexed, the more the resistance will go up. Then by measuring the angle formed by the articulation, we can perform a correspondence between the angle and the resistance value.

Database

As this paper deals with machine learning, the database part is one of the most important. For this work, we have developed our own database for which an experimental protocol has been defined. We decided to work on our own data because at the time we started this research, we could not find any pre-existing database corresponding to our needs. The experimental protocol is as follows: -The subject is placed so that its face is within the camera range.

-The subject is asked to choose form a variety of demanding task including but not limited to, reading and summarazing texts, playing video or board games, watching video and summarizing its content, writing an essay on specific questions, exercising... -The subject is asked to perform this task as long as he feels comfortable and willing to do so.

-At the end of the session the subject is debriefed. This experimental protocol is developed and tested to allow the subject to pass through a wide variety of cognitive states and to "forget" about the ongoing experiment [START_REF] Sanders | The motivating effects of distraction on task performance[END_REF][START_REF] Proctor | Effects of distractor-stimulus modality in the Brown-Peterson distractor task[END_REF][START_REF] King | Use of a Distracting Task to Obtain Defensive Head Movements to Looming Visual Stimuli by Human Adults in a Laboratory Setting[END_REF][START_REF] Hale | Distraction effects in tasks of varying difficulty: Methodological issues in measuring development of distractibility[END_REF] and to reduce cognitive bias [START_REF] Blanco | Cognitive Bias[END_REF][START_REF] Caverni | Cognitive Biases[END_REF][START_REF] Haselton | The Evolution of Cognitive Bias[END_REF]. This should allow us to retrieve a wide variety of signals and among them those that should approximate "real life signals". Some subjects underwent this protocol for as long as two hours, those extreme cases were treated with caution but showed little to no differences in retrieved signals from shorter experiments. This experimental protocol was applied 56 times on 30 different subjects, mostly between 18 and 25 years old. Around 1/3 of the participants declared themselves as females, the others as males. Later we observed that some subjects were very static during those experiments leading to a non equalized repartition of events observed. We took this disparity into account for the following data processing.

p.3 Colloque JETSAN 2023

With the database generated we decided to work on six different events, for each event we extract and pre-process the EEG signal [START_REF] Martinek | Advanced Bioelectrical Signal Processing Methods: Past, Present and Future Approach-Part II: Brain Signals[END_REF] corresponding to its time stamp and then flag it with the detected event. The events are presented belows alongside with signal examples that are chosen from specific channels to provide visual cue for the reader to better understand the kind of events classified.

-Event0: "something else" because there is no time when there is no brain activity, so an action is occurring but not one that we are able to record. Those events are randomly picked when no other event are detected. An illustration of such cases is shown in Figure 5. -Event1: "blink"; the ground truth of these events is determined when eyelid closure goes under then over an automatically calculated trigger. An exemple of this event in presented in Figure 6. We used eye blinks detection because we already worked on them with other methods [START_REF] Houzé | Blinking characterization for each eye from EEG analysis using wavelets[END_REF][START_REF] Klein | A reliable statistical method to detect eyeblink-artefacts from electroencephalogram data only[END_REF] and it should provide great comparison points. -Event2: "arm flexion"; an arm flexion event is detected when the subject flexes its elbow by more than 10% of its maximal movement amplitude on a short time range, such as presented in Figure 7. -Event3: "arm extension"; those events are the opposite of arm flexion ones. It is detected when the subject extends its arm by more than 10% of its maximum movement range. An illustration of this event is presented in Figure 8. -Event4: "fingers flexion"; it corresponds to all fingers closing by more than 10% of their maximal movement range (see Figure 9 for illustration).

p.4

Colloque JETSAN 2023 -Event5: "fingers extension"; it corresponds to all fingers opening, following the same reasoning (see Figure 10 for illustration). The groundtruth for flexions and extensions is provided by the glove we introduced earlier. At some point we observed that subjects would frequently perform multiple actions at the same time such as moving their arm and fingers. We decided to reduce the number of data and only keep the four first kinds. Reducing the number of events leads to improve class differentiation and thus classification results, while we continue and try to improve hand movement classification. As a side note, hand movement signals were difficult to interpret even from human expertise.

Machine learning

Once all the events are detected, timestamped and that the EEG signals corresponding to those time stamps are extracted we can "feed" them to machine learning algorithms. The database is splitted in three to cross validate the results. We used the deep learning architecture presented in Figure 12 where each step represent a layer. The architecture is an adaptation of the model presented in paper [START_REF] Wang | Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline[END_REF] that is specialized in classifying time series [START_REF] Wichard | Classification of Ford Motor Data[END_REF]. We splitted the database, two third for the train/test process and one for the validation, no training data should be present on the validation set. The set was composed of around 1.5k class 0 events, 1k class 1, 0.3k for class 2 and 0.3k for class 3. After training the model the proposed algorithm reached an average score of 87% accuracy on validation set. The confusion matrix presented in Figure 11 shows very good results. The results can be summarized in Table 1, with which in association with the confusion matrix we can deduce that the classification process is effective to differentiate arm flexion from arm extension p. [START_REF] Ball | Signal quality of simultaneously recorded invasive and noninvasive EEG[END_REF] Colloque JETSAN 2023 and eye blinks, most of the classifications errors are between class 0 and others. Adding hand movements would reduce classification performances to an average of 60%, with virtually random classification between class 0 and hand movements, but little misclassification between classes 1,2,3 and 4,5 meaning that those signals are different but our detection method is not reliable enough between class 0 and 4,5. We can propose some explanations about those classifications errors, the first and most obvious one would be that in some cases the signals were quite similar, another explanation would be that some event were not appropriately detected by our ground truth hardware.

Figure 12: Machine learning model.

Results and discussion

In this project, all data are transmitted via Bluetooth Low Energy (BLE) to a computing terminal near the headset, we tested different computing terminals such as laptop or smartphone, the acquired EEG signal is transmitted in real time, given that the classification algorithm works with 90 samples from each channels and that the acquisition rate is 125Hz, it means that the decision process needs at least 0.75s to gather enough information. When we tested the classification process on our hardware (using CPU), it lasted between 0.12s and 0.26s on average, hence we can assume a total decision time under a second from the very begining of the event, or around 0.5s from the peak/middle of the event. This computation time could be optimized. One of the main issue we faced was the simultaneity of some events, for instance moving the arm and closing the hand. Such overlapping of event triggered errors on the classification process. A possibility we did not have time and resources to try would be to create "double events". We are also quite aware that by using more performant hardware would improve our results but we decided to work with cost effective methods to prove that it is possible to obtain results with cost effective hardware. The proposed method can be improved, especially for hand action detection.

Conclusion

This method allows an average of 86% good classification under a second from the start of the event using only EEG signal form portable EEG headset. Machine learning algorithms are efficient to classify time series but when it comes to EEG signals one of the main difficulty is the quality of the signal. Dry electroencephalography provides signals of lesser quality but greatly improves repeatability of experiments. With reliable ground truth the p. [START_REF] Saletu | EEG topography and tomography in diagnosis and treatment of mental disorders: Evidence for a keylock principle[END_REF] Colloque JETSAN 2023 correspondence between EEG signals and actions can be made using machine learning algorithm. Although the classified movement were quite simple this method shows great potential for more complex actions. This method could be used to predict or accompany human movement in BCI applications. The proposed method shows that it is possible to use on the fly EEG analysis to classify certain actions, which could be used to accompany human autonomy through controlling actuators such as mechanical orthosis, or autonomy monitoring by measuring the difference between "command signals" and actions.

Figure 2 :

 2 Figure 2: 10-20 electrodes placement, colored points are actual electrodes, gray points are placeholders used to distribute headset weight.

  marker (1) indicates location of the p.2 Colloque JETSAN 2023 hand part, marker (2) the elbow part and finally marker (3) the power and transmission part.

Figure 3 :

 3 Figure 3: Mechanical movement measurement device.

Figure 4 :

 4 Figure 4: Exemple of resistance variation during a movement, here closing then opening of the hand.

Figure 5 :

 5 Figure 5: Exemple of signals corresponding to no specific measured action.

Figure 6 :

 6 Figure 6: Eyeblink illustration, with illustration signal from AF3 and AF4.

Figure 7 :

 7 Figure 7: Arm flexion illustration, with signal illustration from CP1, along with sensor variation.

Figure 8 :

 8 Figure 8: Arm extension illustration, with signal illustration from CP1, along with sensor variation.

Figure 9 :

 9 Figure 9: Hand movement illustration.

Figure 10 :

 10 Figure 10: Hand movement illustration.

Figure 11 :

 11 Figure 11: Confusion matrix for EEG signals classification.

Table 1 :

 1 Classification results.

	Class	Precision Recall F1-Score
	Event0 0.87	0.94	0.90
	Event1 0.99	0.96	0.97
	Event2 0.90	0.70	0.79
	Event3 0.76	0.78	0.77
	Average 0.88	0.85	0.86

Acknowledgment: This work is part of a Ph.D project supported by Région Bourgogne-Franche-Comté (France). All subject were volunteers.

Data Availability Statement: All data are anonymized and protected to ensure subjects security. The data that support the findings of this study are anonymized and protected to ensure subjects security and are available under reasonable request from the corresponding author.

Conflict of interest:

The authors declare no conflict of interest.


Alice Lemarquand
email: alice.lemarquand@univ-eiffel.fr

Gaëlle Lissorgues

Pierre Jannot

Leo Kammerlocher

Michel Behr

Pierre-Jean Arnoux

Salah Boussen

Léo Kammerlocher

Using wearables to optimise the prehospital medical care management of traffic accident casualties

Keywords: wearable, traffic accidents, vital signs, trauma, scoring system, triage, emergency services

I. INTRODUCTION

Even with the increase in the automobile fleet and traffic, the annual number of deaths in road traffic accidents in France dropped from 18000 in the 70s to 8000 in 2000 and then to 3260 in 2022 [START_REF]Observatoire national interministériel de la sécurité routière[END_REF]. Regarding the number of seriously injured victims, they amounted to 16000 in 2022. Despite the substantial progress, road safety remains a public health issue and this decreasing trend must continue. Besides prevention measures to change users' behaviour and modification of safety legislation to improve road infrastructures and vehicle designs, a key element lies in optimising the prehospital medical care management of traffic accident casualties and of the trauma system organisation.

According to the "golden hour" concept, mortality is affected if medical care is not provided within the first hour after injury. Although this term would date back to the Vietnam war and may be unadapted in a civil context and over-generalised regarding the duration of one hour, it supports the fact that the elapsed time between the accident and the initial care represents a critical prehospital factor for the casualty outcome [START_REF] Lerner | The Golden Hour: Scientific Fact or Medical "Urban Legend"?[END_REF]. A longer medical response time is associated with more severe sequelae and higher mortality [START_REF] Byrne | Association Between Emergency Medical Service Response Time and Motor Vehicle Crash Mortality in the United States[END_REF]- [START_REF] Wilde | Do Emergency Medical System Response Times Matter for Health Outcomes?[END_REF]. Reducing the medical response time from 25 to 15 minutes should decrease the probability of death by one-third on average, both on motorways and conventional roads.

To overcome the lack of early information transmitted to the emergency services about the foreseeable injuries, injury mechanisms and associations [START_REF] Bruna-Rosso | When epidemiological databases inform injury mechanisms: biomechanical analysis of injury associations[END_REF], as well as the feasibility of using accident kinetic data to estimate injuries [START_REF] Bruna-Rosso | From Crash Kinetic Data to a "Virtual Injury Assessment[END_REF] have been previously investigated. In the context of the boom in the internet of things (IoT), the goal of the present study is to explore the potential of wearable technologies to improve the emergency care system for road traffic accidents. Wearables consist of one or several miniaturised sensors embedded into a garment, an accessory, an implant, an adhesive patch, or even a tattoo. Either electronic, optical, mechanical, or biochemical, these sensors enable to measure user's environment, motion, position or physiological parameters [START_REF] Iqbal | Advances in healthcare wearable devices[END_REF]- [START_REF] Seneviratne | A Survey of Wearable Devices and Challenges[END_REF]. They often operate with a wireless communication protocol to send the data on a smartphone or to a distant server for online or offline processing [START_REF] Hasan | A comprehensive review of wireless body area network[END_REF]- [START_REF] Mosenia | Wearable Medical Sensor-Based System Design: A Survey[END_REF]. Inter alia, these wearables have been adapted for various health applications including diagnosis and biomedical research, remote patient monitoring, vulnerable people (e.g. old, diseased, or elderly); as well as for sports tracking, gaming, and activity or emotion recognition.

Regarding road safety, research about driver drowsiness detection through either wearables or sensors integrated into vehicles is also in progress [START_REF] Said | Wearable biosensors bracelet for driveras health emergency detection[END_REF]. However, the present study focuses on post-accident management. It aims to discuss how a wearable would enable to access easily vital signs of the casualties and could be relevant for their diagnosis. In the first section, the specifications such a device should satisfy and the physiological parameters it should target are presented. Several wearable solutions have been considered from lab-built, to research-oriented kits and commercial devices. Then, a new approach for taking advantage of the measured data will be described including elements about a new scoring system computable continuously and directly from the wearable.

II. A WEARABLE TO MONITOR THE CASUALTIES' VITAL SIGNS

p. 2

Colloque JETSAN 2023

Monitoring road traffic accident casualties with a wearable presents several levels of scientific challenges. Over the short term, the device is intended to be installed on the casualty by the emergency workers when they reach the scene of the traffic accident. This characterisation tool would be complementary to the scope monitor with which the French rescue vehicles are already equipped. The wearable would enable the measurement of the casualty's vital signs with minimal handling, for instance before he is moved out of the vehicle. Information about the injured person's state could thus be acquired sooner, which would help diagnose and would benefit the casualty's outcome.

For early prediction of hemodynamic, respiratory, and neurologic distress, and considering the sensors' state of play, the relevant physiological parameters to target are temperature, motion, heart rate, oxygen saturation, and respiration rate. The technologies are already quite mature for temperature [START_REF] Tamura | Current Developments in Wearable Thermometers[END_REF], and motion that can be measured through inertial measurement units [START_REF] Yang | A review of accelerometry-based wearable motion detectors for physical activity monitoring[END_REF], [START_REF] Aroganam | Review on Wearable Technology Sensors Used in Consumer Sport Applications[END_REF]. Several solutions exist for the other parameters. In particular, heart rate is often assessed either by electrocardiography or photo-plethysmography (PPG) [START_REF] Vandenberk | Clinical Validation of Heart Rate Apps: Mixed-Methods Evaluation Study[END_REF].

If the wearable is to be installed by emergency workers, it has to fulfil several requirements. A crucial point is that it should be simple and fast to place so that the rescuers can move quickly to the first aid. It should also be non-invasive and compact in order not to interfere with casualty manipulation. For instance, electrocardiography is not adapted because it usually needs several electrodes that have to be precisely positioned. Thus photo-plethysmography should be preferred for heart rate measuring. This can be convenient because oximetry for spO2 measurement is based on a similar optical measurement principle and both are often combined [START_REF] Jahan | AN OVERVIEW ON HEART RATE MONITORING AND PULSE OXIMETER SYSTEM[END_REF], [START_REF] Chan | Pulse oximetry: Understanding its basic principles facilitates appreciation of its limitations[END_REF]. In addition, respiratory rate can be extracted from the signal envelope when the signal is good enough [START_REF] Pimentel | Toward a Robust Estimation of Respiratory Rate From Pulse Oximeters[END_REF]. Regarding the wearable format, a wristband seems to be the more adapted because on one hand it corresponds to an easily accessible anatomical site, and on the other side there is no need to undress the casualty or to prepare the skin as for patches. Armband and headband format could also be considered. Power consumption is not a limiting factor since an operating time of a few hours is enough for one casualty's monitoring from the accident to the hospital. The raw data should be automatically saved and the relevant parameters easily displayable.

Several Arduino prototypes have been developed based on lab-built or commercial photo-plethysmography sensors. However, a lot of development would be still required to make the homemade solution usable in this research project. Semicommercial wearable kits such as from BioSignalPlux were not deemed because they imply the installation of several wired sensors. Among other existing solutions, the E4 wristband by Empatica has finally been selected because the raw data measured are fully accessible, the measurement can be displayed on the dedicated smartphone application E4 realtime, and it has been used for numerous research studies [START_REF] Climent-Pérez | Dataset of acceleration signals recorded while performing activities of daily living[END_REF]- [START_REF] Grzesiak | Assessment of the Feasibility of Using Noninvasive Wearable Biometric Monitoring Sensors to Detect Influenza and the Common Cold Before Symptom Onset[END_REF]. This device enables to measure temperature, electro-dermal activity, motion through an accelerometer, photoplethysmography from which heart rate can be extracted, but no oxygen saturation.

III. DEVELOPMENT OF A NEW APPROACH TO PROCESS THE PHYSIOLOGICAL DATA

Besides identifying the hardware solution that could fit to optimise the prehospital medical care management of traffic accident victims, ways to evaluate the physiological data have also to be thought. Several scoring systems have been developed to assess objectively the severity of a casualty's medical state for different pre-hospital and in-hospital situations [START_REF] Khari | Glasgow Coma Scale Versus Physiologic Scoring Systems in Predicting the Outcome of ICU admitted Trauma Patients; a Diagnostic Accuracy Study[END_REF]- [START_REF] Galvagno | Correlation Between the Revised Trauma Score and Injury Severity Score: Implications for Prehospital Trauma Triage[END_REF]. For instance, the Glasgow Coma Scale (GCS) measures a person's level of consciousness and is especially relevant in the case of head injury; the Abbreviated Injury Score (AIS) and the Injury Severity Score (ISS) focus on anatomical features; the Modified Early Warning Score (MEWS) has been developed to identify patients requiring a higher level of care based on systolic blood pressure (SPS), heart rate, respiratory rate, temperature, and the "Alert, Verbal, Pain, Unresponsive" (AVPU) Score; and the Revised Trauma Score (RTS) is calculated from the GCS, the SPS, and the respiration rate. However medical scoring is still a subject that has to be further investigated. Some studies put their relevance for triage into question [START_REF] Gottschalk | Warning scores in triage -Is there any point?[END_REF], [START_REF] Patel | Does the use of a "track and trigger" warning system reduce mortality in trauma patients?[END_REF]. The optimal score seems to be still elucidated [START_REF] Fullerton | Is the Modified Early Warning Score (MEWS) superior to clinician judgement in detecting critical illness in the pre-hospital environment?[END_REF] and it may depend on the application. Since they need human evaluation, these scores are not calculated automatically, which can be time-consuming depending on the number of casualties to assess and is not adapted for real-time continuous updates. Furthermore, these scores have mostly been used to predict death, without trying to identify the cause.

Our approach is to develop three intermediate scores related to the hemodynamic, respiratory, and neurologic situation, that can be directly computable from the measurements collected with the wearable. The three functions are obviously connected together in real life, but this strategy seeks to be more specific about the injury type and make possible to anticipate the relevant medical resources. The physiological parameters used for the hemodynamic, respiratory, and neurologic scores are given Table I. A global score can also be computed from the three intermediate scores. Scoring systems is especially relevant in the case of mass casualty situation like a bus crash, or more broadly in crisis p. [START_REF] Byrne | Association Between Emergency Medical Service Response Time and Motor Vehicle Crash Mortality in the United States[END_REF] Colloque JETSAN 2023 circumstances such as natural disasters or terrorist attack. The simple triage and rapid treatment (START) protocol algorithm aims to sort the casualties into four groups based on four signs: mobility, respiratory rate, pulse rate, and mental state. Each casualty group is associated with a colour code indicating the emergency level for medical care [START_REF] Niswar | The design of wearable medical device for triaging disaster casualties in developing countries[END_REF]- [START_REF] Chang | Towards Robot-Assisted Mass-Casualty Triage[END_REF]: green for low priority, orange for delayable, red for urgent, and black for already dead. Alternative algorithms have also been developed [START_REF] Hyun | The Prediction Model for Classification of COVID-19 Infected Patients Using Vital Sign[END_REF]. The under-developed scores increase with the gravity and range from 0 to 100. It will be associated to the colour code: green from 0 to 33, orange from 34 to 66, and red from 67 to 100.

IV. CONCLUSION AND PERSPECTIVES

Wearables and Information Technology seem to be promising tools to upgrade the prehospital medical care management of traffic accident casualties. A discussion has been carried out regarding the technical specifications a wearable should satisfy to enable the diagnosis by the rescuers without impeding their work. The E4 wristband produced by Empatica has been identified as the best current solution for this specific project. It has been provided to local rescue organisations to constitute a database of physiological parameters measured as soon as possible after the accident, which doesn't exist so far. These data will be processed in order to find predictive features for hemodynamic, respiratory, and neurologic distress.

Furthermore, a new scoring system aiming to overview the hemodynamic, respiratory, and neurologic state of a casualty is being developed. The pre-processing routine, the score functions, and the algorithms based on either standard or fuzzy logic still have to be improved and will be optimised through the constituted database processing. The scores will be associated with a colour code and will be integrated in a triage interface under development. In particular, they will be tested during traffic road accident simulations, as well as firefighter and military exercises.

With the wearables' continuous progress meeting the different challenges of sensors miniaturisation, communication protocols, data processing and storing, power supplies, ergonomics and integration, the technological watch must be continued. Over the long run, with smartwatches democratisation, one could even imagine that people would already be equipped with the wearable and that personalised monitoring could start even before the rescuers reach the accident scene even though such modernisation of the medical emergency system seems a long way off with numerous technical, ethical and societal limitations more or less complicated to overcome.

TABLE I .

 I Physiological

parameters used for the intermediate scores computation

	Score	Parameters
	Hemodynamic	Heart rate, PPG amplitude
	Respiratory	Respiratory rate, oxygen saturation
	Neurologic	Motion, (heart rate variability, electro-dermal activity)

ACKNOWLEDGMENT

This work is founded by the Délégation à la Sécuritié Routière of the French Ministry of Internal Affairs in the context of the iSafe-Phase2 project. It has been carried out with the help of several L3 to M2 students.