24
Etude de cas CNES : Modélisation de la partie Commande/Contrôle d’un GCU Alexandre Cortier, Eric Morand

Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

Embed Size (px)

Citation preview

Page 1: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

Etude de cas CNES :Modélisation de la partie

Commande/Contrôle d’un GCUAlexandre Cortier, Eric Morand

Page 2: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

PLAN

I- IntroductionII- Modélisation : vues globalesIII- Sous-composant : CC/FiltrageIV- Sous-composant : CC/RoutageV- Sous-composant : CC/HKVI- Conclusion

Page 3: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

I- Introduction : objectifs• Modélisation de l’élément CC relatif à un logiciel de vol charge utile• Focalisation sur :

– Le filtrage des TC– Le routage des TM/TC– La génération de TM HK (House Keeping)

GCU

PF

CC MISSION

I1

I2

I3

Page 4: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

I- Introduction : Vue globale

• CC : Contrôle/Commande• MISSION : Partition Mission• PF : Plateforme• I1, I2, I3 : Instruments

CCPF I1

I2I3MISSION

Arinc 1553

Arinc 1553Arinc 1553

Arinc 1553

Arinc 1553

Page 5: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

PLANI- IntroductionII- Modélisation : vue globaleIII- Sous-composant : CC/FiltrageIV- Sous-composant : CC/RoutageV- Sous-composant : CC/HKVI- Conclusion

Page 6: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

II- Modélisation : zoom sur CCPort group : CMD_data, fresh

toPF

Routing

Filtering

HK

fromI1toI1[3]

fromI2toI2[3]

fromI3toI3[3]

fromMtoM[4]

fromPF

<< frequency = 20 Hz >>

fromM

filterTab modes

Page 7: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

II- Modélisation : vue globale

I1

I2

I3Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCCPF

MISSION

o Passage au synchrone :• nécessité de connaitre précisément les communications

-Ex : A qui peut s’adresser une TC de PF ? • nombre de signaux au pire cas…

o Communication avec l’environnement :• introduction de variables externes• besoin de buffer ! (cf. au cours d’un cycle de CC, un instrument peut recevoir plusieurs commandes )

toI1[3]

buffers

o Hypothèse• Tous les sous-composants sont à la même fréquence

Page 8: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

II- Modélisation : vue globale (2)

• Besoin de spécifier le comportement des buffers du MW…• Autre solution : spécifier directement les buffers en Synoptic

– le MW reçoit alors une seule donnée par cycle

I1

I2

I3Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCCPF

MISSION

bufferVecteur de données (N entrées)

Séquence de données

fréquence F

Fréquence NxF

Page 9: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

II- Modélisation : difficultés rencontrées• Problèmes ?

– Besoin d’associer à chaque donnée TM/TC sa fraîcheur• Utilisation de port group• Besoin de tester la fraîcheur d’un port à chaque cycle• Besoin de faire circuler des données même s’il elle ne sont pas utiles…

– Efficacité du résultat de la compilation des buffers Synoptic ?– Fréquence potentiellement très élevée en sortie ?

• Le MW doit pouvoir traiter les données d’un port à une vitesse NxF– N : nombre maximum de message pouvant être émis par CC à un composant

de l’environnement en 1 cycle– F : fréquence du composant CC

• Et si les sous-composant de CC ne possède pas la même fréquence ?– Besoin de nombreux adapter/buffer entre les sous-composants– Comment détermine t-on la taille du buffer ?– Que fait-on dans le cas d’un dépassement de buffer ? (Emission d’une TM anomaly ?)

Page 10: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

PLANI- IntroductionII- Modélisation : vue globaleIII- Sous-composant : CC/FiltrageIV- Sous-composant : CC/RoutageV- Sous-composant : CC/HKVI- Conclusion

Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCC

Page 11: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

III- Sous-composant : CC/Filtrage (1)

• Filtrage des TC en provenance de PF :– En fonction des modes (MISSION, CC, Instruments)– Configuré par un tableau (modifiable par TC : non modélisé pour le

moment)

Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCC

Page 12: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

III- Sous-composant : CC/Filtrage (2)type TC_TM_Data is record Type : integer; -- 0..1 : 0=TM, 1=TC APID : integer ; -- identifiant de l'application

destinatrice ack : integer; serviceType : integer; subServiceType : integer; sourceID : application_ID; -- id émétteru application_Data : string; errorCode : integer ; --0..6 -- Fin Packet Dataend;

port group CMD_receiverfeatures CMD_data : in data port TC_TM_Data; fresh : in data port boolean;end CMD_receiver;

port group CMD_senderfeatures CMD_data : out data port TC_TM_Data; fresh : out data port boolean;end CMD_sender;

--nb de "composant"NbPartition : constant integer ; -- nb message pouvant être transmisNbTypPUS : constant integer ; -- le nombre maximal de modes de l’ensemble des partitionsNbMaxModes : constant integer ;

type MTab_DataType is array NbMaxModes of boolean ;

type TypPUSTab_DataType is array NbTypPUS of MTab_DataType;

type FilteringTab_DataType is array NbPartition of TypPUSTab_DataType;

Difficultés rencontrés : • certains champs des TM/TC sont variables…

non représentable en Synoptic besoin de notion de sous-typage ou de type union

Page 13: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

III- Sous-composant : CC/Filtrage (3)block type filtering_typfeatures CMD_in : port CMD_receiver; currentModes : in data port ModesTab_DataType; CMD_to_CC_TC_Routing : port CMD_sender; CMD_to_CC_TM_Routing : port CMD_sender; end filtering_typ;

port group CMD_receiverfeatures CMD_data : in data port TC_TM_Data; fresh : in data port boolean;end CMD_receiver;

port group CMD_senderfeatures CMD_data : out data port TC_TM_Data; fresh : out data port boolean;end CMD_sender;

block type checkFiltering_typfeatures CMD_in : port CMD_receiver ; FilteringTab : in data port FilteringTab_DataType; currentModes : in data port ModesTab_DataType; isOK : out data port boolean;end checkFiltering_typ;

dataflow checkFiltering_typ.checkFiltering_dtfflows fl1 : data FilteringTab[CMD_in.CMD_data["APID"]][CMD_in.CMD_data["serviceType"]][currentModes[CMD_in.CMD_data["APID"]]] -> isOK ;end checkFiltering_typ.checkFiltering_dtf;

Page 14: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

III- Sous-composant : CC/Filtrage (4)dataflow filtering_typ.filtering_dtfblocks FilteringTab : variable FilteringTab_DataType; check : dataflow checkFiltering_dtf;Flows…fl3 : data check.isOK and CMD_in.fresh -> CMD_to_CC_TC_Routing.fresh; fl4 : data CMD_in.CMD_data -> CMD_to_CC_TC_Routing.CMD_data fl3 : data not(check.isOK) and CMD_in.fresh -> CMD_to_CC_TM_Routing.fresh; fl5 : data {Type:=0 ; -- TM(1,11) (TM anomaly) APID:=5 ; -- PF ack := 0; serviceType:=1 ; subServiceType:=11 ; sourceID:="CC" ; application_Data CMDfromPF["application_Data"]; errorCode :=0 ; } ->CMD_to_CC_TM_Routing.CMD_data;…end filtering_typ.filtering_dtf;

Page 15: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

PLANI- IntroductionII- Modélisation : vue globaleIII- Sous-composant : CC/FiltrageIV- Sous-composant : CC/RoutageV- Sous-composant : CC/HKVI- Conclusion

Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCC

Page 16: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

IV- Sous-composant : CC/Routage (1)block type routage_TC_typ features TM_fromPF : port CMD_receiver; TC_fromPF : port CMD_receiver; fromMISSION : port CMD_receiver; fromHK : port CMD_receiver; toI1[3] : port CMD_sender; toI2[3] : port CMD_sender; toI3[3] : port CMD_sender; toMission[4] : port CMD_sender; TMtoHK[3] : port CMD_sender; TCtoHK : port CMD_sender; end routage_TC_typ;

Page 17: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

IV- Sous-composant : CC/Routage (2)dataflow routage_TC_typ.routage_TC_dtf blocks Null_CMD : constant TC_TM_Data ; flows ----------------------------------- MISSION -> I1 fl0 : data (fromMISSION.CMD_data when (fromMISSION.CMD_data.APID="I1")) default NullCMD -> toI1[0].CMD_data ; fl1 : data fromMISSION.fresh -> toI1[0].fresh ; ----------------------------------- PF -> I1 fl0 : data (fromPF.CMD_data when (fromPF.CMD_data.APID="I1")) default NullCMD -> toI1[1].CMD_data ; fl1 : data fromPF.fresh -> toI1[1].fresh ; ----------------------------------- HK -> I1[…]----------------------------------- PF -> MISSION fl0 : data (fromPF.CMD_data when (fromPF.CMD_data.APID="MISSION")) default NullCMD -> toMISSION.CMD_data ; fl1 : data fromPF.fresh -> toMISSION.fresh ; ------------------------------------

end routage_TC_typ.routage_TC_dtf;

Difficultés rencontrés : • RAS• pourrait être généré automatiquement à partir d’une description tabulaire

Page 18: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

PLANI- IntroductionII- Modélisation : vue globaleIII- Sous-composant : CC/FiltrageIV- Sous-composant : CC/RoutageV- Sous-composant : CC/HKVI- Conclusion

Routing

Filtering

HK

fromI1

toM[4]

<< frequency = 20 Hz >>

fromM

filterTab modesCC

Page 19: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

V- Sous-composant : CC/HK (1)

State : ON

Automaton : HK

State : OFF

CMD_TC_inFrom PFTC(3,5) or TC(3,6)

CMD_TM_in[3]From I1,I2 and I3TM(3,25)

CMD_TC_outTo I1,I2 or I3TC(3,9)

CMD_TM_outto PFTM(5,2)

on TC(3,5) on TC(3,6)do ON.reset=true

on TC(3,6)do ON.reset=true

on TC(3,5)

Page 20: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

V- Sous-composant : CC/HK (2)

automaton HK_typ.HK_autstates OFF : dataflow HK_PARAM_OFF_dtf ; ON : dataflow HK_PARAM_ON_dtf ; initial state OFF;transitions tr1: OFF -[on (CMD_TC_in.CMD_data.serviceType=3 and CMD_TC_in.CMD_data.subServiceType=5 and CMD_TC_in.fresh=true) do ON.reset:=true; end ]->> ON; tr2: ON -[on (CMD_TC_in.CMD_data.serviceType=3 and CMD_TC_in.CMD_data.subServiceType=6 and CMD_TC_in.fresh=true) ]->> OFF; tr3: ON -[on (CMD_TC_in.CMD_data.serviceType=3 and CMD_TC_in.CMD_data.subServiceType=5 and CMD_TC_in.fresh=true) do ON.reset:=true; end ]->> ON; end HK_typ.HK_aut;

Page 21: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

V- Sous-composant : CC/HK/ON (1)

Dataflow : HK/ONCOUNTER

Init 20CMD_TC_inFrom PFTC(3,5) or TC(3,6)

CMD_TM_in[3]From I1,I2 and I3TM(3,25)

CMD_TC_outTo I1,I2 or I3TC(3,9)

CMD_TM_outto PFTM(5,2) 1 Hz

checkResponse

TM_HK_SENDERGENERATING

TC_TM

Cpt = 20 19 18 17 16 15 14 13 1

TC_I1[TM(5,2)]

[TM(5,2)]

TC_I2[TM(5,2)]

[TM(5,2)]

TC_I3[TM(5,2)]

[TM(5,2)]

TC_I1[TM(5,2)]

……

TM(3,25)to PF

<< frequency = 20 Hz >>

Page 22: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

• Difficultés ?– Besoin de disposer d’un ordonnanceur de

requêtes– Nécessité d’un compteur pour orchestrer les

requêtes

V- Sous-composant : CC/HK/ON (2)

Page 23: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

VI- Conclusion : difficultés rencontrés

• Editeur graphique inutilisable en l’état• Manque de blocs primitifs (librairie) pour spécifier des

conversions de flot• Primitives de conversion tableau -> flot

• Types de données insuffisants– Associer à un type entier une représentation en nombre de bit– Pas de notion de sous-typage ou de type union (et des primitives

d’utilisation associées) : cf. champ variable des TM/TC

• Besoin d’associé à une TM sa « fraicheur »– Notion d’event data permettrait de cacher le flag (et donc la

construction des groupes de ports)– Routage dynamique : garde sur connexions entre « event data »

Page 24: Etude de cas CNES : Modélisation de la partie Commande/Contrôle dun GCU Alexandre Cortier, Eric Morand

• Sémantique des automates– Notion d’historique / de reset à revoir– Différencier « suspend strong/weak transitions » et « abort

strong/weak transitions » plus clairement ?

• Etude de cas est par nature asynchrone.• Modélisable en synchrone en introduisant des booléens • MAIS : risque d’inefficacité (compilateur optimisé ?)

VI- Conclusion : difficultés rencontrés (2)