From 4b2a268a5aa72601d9f1057cfbd019cc545b412d Mon Sep 17 00:00:00 2001 From: Svetlana Date: Tue, 10 Jul 2018 20:26:07 +0200 Subject: [PATCH] Draft --- ...de_monticore_lang_math_0_0_10_SNAPSHOT.xml | 13 ----- ...montiarc_math_generator_0_0_6_SNAPSHOT.xml | 13 ----- .../src/main/models/dp/Mastercomponent.emadl | 4 +- .../dp/subcomponents/KFMastercomponent.emadl | 47 ++++++++++--------- .../dp/subcomponents/Kalmanfilter.emadl | 5 +- 5 files changed, 28 insertions(+), 54 deletions(-) delete mode 100644 TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_math_0_0_10_SNAPSHOT.xml delete mode 100644 TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_monticar_embedded_montiarc_math_generator_0_0_6_SNAPSHOT.xml diff --git a/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_math_0_0_10_SNAPSHOT.xml b/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_math_0_0_10_SNAPSHOT.xml deleted file mode 100644 index 5eb2b5f..0000000 --- a/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_math_0_0_10_SNAPSHOT.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_monticar_embedded_montiarc_math_generator_0_0_6_SNAPSHOT.xml b/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_monticar_embedded_montiarc_math_generator_0_0_6_SNAPSHOT.xml deleted file mode 100644 index b7b4a2d..0000000 --- a/TorcsEMAMGenerator/.idea/libraries/Maven__de_monticore_lang_monticar_embedded_montiarc_math_generator_0_0_6_SNAPSHOT.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/TorcsEMAMGenerator/src/main/models/dp/Mastercomponent.emadl b/TorcsEMAMGenerator/src/main/models/dp/Mastercomponent.emadl index d26534b..74c1c0f 100644 --- a/TorcsEMAMGenerator/src/main/models/dp/Mastercomponent.emadl +++ b/TorcsEMAMGenerator/src/main/models/dp/Mastercomponent.emadl @@ -16,8 +16,8 @@ component Mastercomponent { connect imageIn -> ip.imageIn; connect ip.imageOut -> dpnet.image; connect dpnet.predictions -> un.normalizedPredictions; - connect un.affordance -> kfm.predictions; - connect kfm.predictionsSmoothed -> dc.affordanceIn; + //connect un.affordance -> kfm.predictions; + //connect kfm.predictionsSmoothed -> dc.affordanceIn; connect speedIn -> dc.speedIn; connect dc.commandsOut -> commandsOut; } \ No newline at end of file diff --git a/TorcsEMAMGenerator/src/main/models/dp/subcomponents/KFMastercomponent.emadl b/TorcsEMAMGenerator/src/main/models/dp/subcomponents/KFMastercomponent.emadl index affb82f..5f00b4e 100644 --- a/TorcsEMAMGenerator/src/main/models/dp/subcomponents/KFMastercomponent.emadl +++ b/TorcsEMAMGenerator/src/main/models/dp/subcomponents/KFMastercomponent.emadl @@ -4,30 +4,31 @@ component KFMastercomponent { ports in Affordance predictions, out Affordance predictionsSmoothed; - instance Kalmanfilter([predictions.distLL, 0]) kfLL; - instance Kalmanfilter([predictions.distMM, 0]) kfMM; - instance Kalmanfilter([predictions.distRR, 0]) kfRR; - instance Kalmanfilter([predictions.distL, 0]) kfL; - instance Kalmanfilter([predictions.distR, 0]) kfR; + instance Kalmanfilter kfLL; + //instance Kalmanfilter([predictions.distLL, 0]) kfLL; + //instance Kalmanfilter([predictions.distMM, 0]) kfMM; + //instance Kalmanfilter([predictions.distRR, 0]) kfRR; + //instance Kalmanfilter([predictions.distL, 0]) kfL; + //instance Kalmanfilter([predictions.distR, 0]) kfR; - connect predictions.angle -> predictionsSmoothed.angle; - connect predictions.toMarkingLL -> predictionsSmoothed.toMarkingLL; - connect predictions.toMarkingML -> predictionsSmoothed.toMarkingML; - connect predictions.toMarkingMR -> predictionsSmoothed.toMarkingMR; - connect predictions.toMarkingRR -> predictionsSmoothed.toMarkingRR; - connect predictions.toMarkingL -> predictionsSmoothed.toMarkingL; - connect predictions.toMarkingM -> predictionsSmoothed.toMarkingM; - connect predictions.toMarkingR -> predictionsSmoothed.toMarkingR; + //connect predictions.angle -> predictionsSmoothed.angle; + //connect predictions.toMarkingLL -> predictionsSmoothed.toMarkingLL; + //connect predictions.toMarkingML -> predictionsSmoothed.toMarkingML; + //connect predictions.toMarkingMR -> predictionsSmoothed.toMarkingMR; + //connect predictions.toMarkingRR -> predictionsSmoothed.toMarkingRR; + //connect predictions.toMarkingL -> predictionsSmoothed.toMarkingL; + //connect predictions.toMarkingM -> predictionsSmoothed.toMarkingM; + //connect predictions.toMarkingR -> predictionsSmoothed.toMarkingR; - connect predictions.distLL -> kfLL.measurement; - connect predictions.distMM -> kfMM.measurement; - connect predictions.distRR -> kfRR.measurement; - connect predictions.distL -> kfL.measurement; - connect predictions.distR -> kfR.measurement; + //connect predictions.distLL -> kfLL.measurement; + //connect predictions.distMM -> kfMM.measurement; + //connect predictions.distRR -> kfRR.measurement; + //connect predictions.distL -> kfL.measurement; + //connect predictions.distR -> kfR.measurement; - connect kfLL.state-> predictionsSmoothed.distLL; - connect kfMM.state-> predictionsSmoothed.distMM; - connect kfRR.state-> predictionsSmoothed.distRR; - connect kfL.state-> predictionsSmoothed.distL; - connect kfR.state-> predictionsSmoothed.distR; + //connect kfLL.state-> predictionsSmoothed.distLL; + //connect kfMM.state-> predictionsSmoothed.distMM; + //connect kfRR.state-> predictionsSmoothed.distRR; + //connect kfL.state-> predictionsSmoothed.distL; + //connect kfR.state-> predictionsSmoothed.distR; } \ No newline at end of file diff --git a/TorcsEMAMGenerator/src/main/models/dp/subcomponents/Kalmanfilter.emadl b/TorcsEMAMGenerator/src/main/models/dp/subcomponents/Kalmanfilter.emadl index 6a815bd..3bdb30f 100644 --- a/TorcsEMAMGenerator/src/main/models/dp/subcomponents/Kalmanfilter.emadl +++ b/TorcsEMAMGenerator/src/main/models/dp/subcomponents/Kalmanfilter.emadl @@ -1,7 +1,6 @@ package dp.subcomponents; -component Kalmanfilter(Q^{1, 2} X) { - +component Kalmanfilter { ports in Q^{1,1} measurement, out Q^{1,2} state; @@ -9,7 +8,7 @@ component Kalmanfilter(Q^{1, 2} X) { Q^{1, 1} dt = 0; Q^{2, 2} A = [1, dt; 0, 1]; // state transition matrix Q^{1, 2} measM = [1, 0] ; // C: measurement matrix - Q^{2, 2} procNoiseCov = [dt*dt*dt/3, dt*dt/2; dt*dt2/2, dt]; // Q: covariance of process noise + Q^{2, 2} procNoiseCov = [dt*dt*dt/3, dt*dt/2; dt*dt/2, dt]; // Q: covariance of process noise Q^{1, 1} measNoiseCov = 5; // R: covariance of measurement noise Q^{2, 2} errCov = [1000, 0; 0, 1000]; // P: estimate error covariance Q^{2, 2} I = [1, 0; 0, 1]; -- GitLab