![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: main.cpp
- Revision:
- 168:f05a45d5f318
- Parent:
- 166:cdd224dca34b
- Child:
- 169:645207e160ca
diff -r cdd224dca34b -r f05a45d5f318 main.cpp --- a/main.cpp Tue Oct 13 07:44:11 2020 +0000 +++ b/main.cpp Fri Oct 16 00:25:32 2020 +0000 @@ -1,4 +1,4 @@ -//201013_3 +//201016_1 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -193,72 +193,72 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-0.9422973394393921f,0.816138744354248f,0.12903714179992676f,0.4502071440219879f,-1.1140856742858887f,0.8009461164474487f,-0.17472904920578003f,0.6318963170051575f,-1.1436399221420288f,-0.6893237233161926f,-0.2402734011411667f,-0.9842925667762756f,-0.2659071385860443f,-0.5343328714370728f,-0.2571594715118408f,-0.5537636280059814f}, -{-0.8519548773765564f,0.6565931439399719f,-0.3927857577800751f,0.07483011484146118f,-0.9019891023635864f,0.3965883255004883f,-0.4054011106491089f,0.24833782017230988f,-0.6761838793754578f,-0.2098483443260193f,-0.2770787179470062f,-0.6331954598426819f,0.2338932603597641f,-0.8753694295883179f,-0.20967772603034973f,-0.1774672269821167f}, -{-0.7044785618782043f,0.42973583936691284f,0.36391180753707886f,-0.34168773889541626f,-0.3618927001953125f,0.2956364154815674f,0.2872133255004883f,0.16543300449848175f,-0.48478376865386963f,0.02830495871603489f,-0.350972443819046f,-0.3733316957950592f,-0.004153335001319647f,-0.19601291418075562f,0.05590221285820007f,-0.32414478063583374f}, -{-0.3552502989768982f,-0.1009606420993805f,0.39742106199264526f,0.25304022431373596f,0.030921420082449913f,-0.41105446219444275f,-0.11584559082984924f,0.11025658249855042f,0.024052847176790237f,0.4500434100627899f,0.0928492322564125f,0.3181978762149811f,-0.166091188788414f,-0.030338767915964127f,-0.2961459457874298f,0.10466702282428741f}, -{0.5342218279838562f,-0.3397206962108612f,-0.0051451027393341064f,0.13548119366168976f,0.5061395764350891f,-0.546393632888794f,0.1294034719467163f,-0.6671127676963806f,0.4504651725292206f,0.6643060445785522f,0.34480199217796326f,0.2930491268634796f,-0.06942032277584076f,0.48893359303474426f,-0.3865056037902832f,-0.10466403514146805f}, -{1.3246031999588013f,-1.5123186111450195f,0.21773302555084229f,0.09286653995513916f,1.3203978538513184f,-1.4014114141464233f,0.16514194011688232f,-1.5082521438598633f,1.0016365051269531f,1.235943078994751f,-0.2507423460483551f,0.6433713436126709f,-0.2658242881298065f,1.1912657022476196f,-0.4132833778858185f,-0.027060367166996002f}, -{0.1273804008960724f,0.13252614438533783f,-0.2501986622810364f,-0.5859838724136353f,-0.342183917760849f,0.3593035042285919f,0.06014183163642883f,-0.2289130538702011f,0.5002049803733826f,0.02584199793636799f,0.14808937907218933f,0.19150348007678986f,-0.17128024995326996f,0.365104079246521f,-0.15618428587913513f,-0.2701209485530853f}, -{-0.06399786472320557f,-0.09476010501384735f,-0.26619744300842285f,-0.04987308010458946f,-0.492236465215683f,0.01857869327068329f,-0.17925891280174255f,-0.20871999859809875f,0.12933646142482758f,0.06090860813856125f,0.10296232998371124f,0.14094074070453644f,0.3721265494823456f,0.055147673934698105f,0.04303058981895447f,-0.006053004413843155f}, -{0.2654061019420624f,0.26224228739738464f,0.10248100757598877f,-0.596210777759552f,-0.16576111316680908f,0.07295040041208267f,-0.07246989011764526f,-0.43253424763679504f,-0.07300584018230438f,0.4837280213832855f,-0.2996826469898224f,0.19941766560077667f,0.22998356819152832f,0.35608574748039246f,-0.30555272102355957f,0.07220940291881561f}, -{0.11786475032567978f,-0.41986238956451416f,0.18462657928466797f,-0.37801647186279297f,0.22378583252429962f,0.10312975198030472f,-0.2990540862083435f,-0.1843118965625763f,0.19073587656021118f,-0.22762800753116608f,-0.010670982301235199f,-0.9497440457344055f,0.3733196556568146f,0.037525616586208344f,0.3484981060028076f,-0.1094270572066307f}, -{0.6070651412010193f,-0.09914976358413696f,0.37182438373565674f,0.018310997635126114f,0.07455449551343918f,-0.12630106508731842f,-0.20339298248291016f,-0.045236699283123016f,-0.32284286618232727f,0.25843581557273865f,0.34605979919433594f,-1.0087871551513672f,-0.06535344570875168f,0.24279603362083435f,0.26688337326049805f,-0.4403117895126343f}, -{-0.22165389358997345f,-0.5628076195716858f,-0.40320003032684326f,-0.20227207243442535f,0.1302938610315323f,-0.1623421460390091f,0.1533789038658142f,0.4045383632183075f,-0.12937217950820923f,0.3980630338191986f,-0.41651004552841187f,-0.6266176700592041f,0.14604397118091583f,0.17627350986003876f,0.10493969917297363f,-0.21720585227012634f}, -{0.030336881056427956f,-0.3146386742591858f,0.19847965240478516f,-0.0050943773239851f,0.2731168866157532f,0.09094318747520447f,-0.2404318004846573f,0.228116974234581f,-0.19871845841407776f,-0.04024843871593475f,-0.1112145334482193f,-0.9000332355499268f,0.09352868050336838f,0.15391482412815094f,-0.22268100082874298f,-0.5411937236785889f}, -{-0.13979318737983704f,-0.1483089029788971f,0.4127817749977112f,-0.19421952962875366f,-0.3487865924835205f,-0.24741530418395996f,-0.32001304626464844f,-0.16491003334522247f,-0.19151969254016876f,-0.11659505218267441f,-0.1970081627368927f,-0.6741900444030762f,-0.31111955642700195f,0.017213257029652596f,0.0479682981967926f,-0.0767170637845993f}, -{0.1018039658665657f,0.02260236069560051f,0.20282304286956787f,-0.001347720855847001f,0.19300313293933868f,-0.08332309871912003f,0.04202890396118164f,0.4737999737262726f,0.17798906564712524f,0.13439501821994781f,-0.281271755695343f,-0.8036220073699951f,0.10531322658061981f,-0.0502358041703701f,0.0668090283870697f,-0.01713453233242035f}, -{-0.12013847380876541f,-0.3260125517845154f,-0.40439701080322266f,-0.13912852108478546f,-0.30754464864730835f,0.06261581927537918f,-0.15568238496780396f,0.17538794875144958f,0.0854315236210823f,0.07091780751943588f,-0.4755752980709076f,-0.43720322847366333f,-0.2693168520927429f,0.02042545937001705f,-0.08245879411697388f,0.05099216103553772f}, -{0.001502394676208496f,-0.30525463819503784f,0.16706281900405884f,0.034485120326280594f,-0.004272279795259237f,-0.339826375246048f,-0.041414469480514526f,0.04367552325129509f,-0.02342265099287033f,0.34166520833969116f,-0.35515230894088745f,-0.04239179193973541f,0.11384518444538116f,0.5522218346595764f,0.29427415132522583f,-0.038875143975019455f}, + {-1.3752100467681885f,0.9850414395332336f,0.12903714179992676f,-0.23237967491149902f,-1.5664141178131104f,0.36565715074539185f,-0.17472904920578003f,-0.3780243396759033f,-0.5318458676338196f,-0.6931207776069641f,-0.24376395344734192f,-3.9280478954315186f,-0.259793758392334f,-0.5339483022689819f,-0.2571594715118408f,-0.4960939884185791f}, +{-1.184814453125f,0.8704654574394226f,-0.3927857577800751f,-0.40050771832466125f,-1.4921096563339233f,0.5157514810562134f,-0.4054011106491089f,-0.3723553717136383f,-0.264297217130661f,-0.4598728120326996f,-0.2805407643318176f,-2.543855905532837f,0.24001067876815796f,-0.9143947958946228f,-0.20967772603034973f,-0.46271881461143494f}, +{-0.9112814664840698f,0.6714562773704529f,0.36391180753707886f,-0.6117674708366394f,-1.1069424152374268f,0.9712548851966858f,0.2872133255004883f,-0.059537652879953384f,-0.28272250294685364f,-0.4464949667453766f,-0.3544096052646637f,-1.0609019994735718f,0.0019771659281104803f,-0.2590618431568146f,0.05590221285820007f,-1.0201798677444458f}, +{-0.2895396053791046f,-0.01403216365724802f,0.39742106199264526f,0.20069332420825958f,-0.6715657114982605f,0.5361601710319519f,-0.11584559082984924f,0.3479021489620209f,-0.01779201813042164f,-0.017457854002714157f,0.08943979442119598f,0.845181941986084f,-0.15994226932525635f,-0.14522784948349f,-0.2961459457874298f,-0.7345172166824341f}, +{1.1968307495117188f,-0.8280011415481567f,-0.0051451027393341064f,0.39627134799957275f,0.3181920051574707f,-0.05303953215479851f,0.1294034719467163f,0.16528914868831635f,0.07129872590303421f,0.7101694941520691f,0.34140077233314514f,1.623598575592041f,-0.06323867291212082f,0.27155500650405884f,-0.3865056037902832f,-0.30631402134895325f}, +{3.009206533432007f,-3.122997522354126f,0.21773302555084229f,0.7692314386367798f,2.249300003051758f,-2.275317907333374f,0.16514194011688232f,0.11058115214109421f,0.17132356762886047f,2.417614459991455f,-0.25413116812705994f,2.2743594646453857f,-0.25959381461143494f,0.8003392219543457f,-0.4132833778858185f,1.4499995708465576f}, +{-0.7179104089736938f,0.8526995182037354f,-0.2501986622810364f,-0.875395655632019f,-0.5985659956932068f,2.8744397163391113f,0.06014183163642883f,-0.8439451456069946f,-0.05617062747478485f,-0.640657901763916f,0.14294663071632385f,3.381211519241333f,-0.1638868898153305f,-0.2370987981557846f,-0.15618428587913513f,-0.7710326910018921f}, +{-0.5504567623138428f,0.25199615955352783f,-0.26619744300842285f,-0.08971554040908813f,-0.3043712079524994f,0.903326153755188f,-0.17925891280174255f,-0.6943695545196533f,-0.25526830554008484f,0.20558907091617584f,0.09723648428916931f,2.3618743419647217f,0.38060376048088074f,-0.1769549399614334f,0.04303058981895447f,-0.12222103029489517f}, +{0.06810358166694641f,0.17962348461151123f,0.10248100757598877f,-0.30372604727745056f,0.4354613721370697f,-0.7276828289031982f,-0.07246989011764526f,-0.6118704676628113f,-0.42743170261383057f,1.453460693359375f,-0.30540645122528076f,1.6834946870803833f,0.23858578503131866f,0.21455851197242737f,-0.30555272102355957f,0.8063939213752747f}, +{-0.0713198110461235f,-0.4495846927165985f,0.18462657928466797f,0.05500239133834839f,0.7719969153404236f,-1.2848507165908813f,-0.2990540862083435f,-0.22474081814289093f,-0.1015893891453743f,0.7663454413414001f,-0.016399379819631577f,-0.03539150580763817f,0.38201630115509033f,-0.09081173688173294f,0.3484981060028076f,0.7820040583610535f}, +{0.33533185720443726f,0.13371603190898895f,0.37182438373565674f,0.39484986662864685f,0.35771995782852173f,-1.3015228509902954f,-0.20339298248291016f,-0.14145439863204956f,-0.5059540271759033f,0.8015591502189636f,0.34025880694389343f,-0.6485148072242737f,-0.05657690018415451f,0.09265313297510147f,0.26688337326049805f,0.2284013032913208f}, +{-0.4380135238170624f,-0.15535405278205872f,-0.40320003032684326f,0.0452105812728405f,0.23505118489265442f,-0.8950125575065613f,0.1533789038658142f,0.1997886300086975f,-0.24218705296516418f,0.45601460337638855f,-0.42232224345207214f,-0.5756524205207825f,0.15488487482070923f,-0.013335001654922962f,0.10493969917297363f,0.23898905515670776f}, +{-0.02198643982410431f,0.009633726440370083f,0.19847965240478516f,0.0860355794429779f,0.336037278175354f,-0.277248352766037f,-0.2404318004846573f,-0.07731665670871735f,-0.2765587270259857f,-0.1708865910768509f,-0.11712735891342163f,-0.7335506677627563f,0.10241620987653732f,-0.06552530825138092f,-0.22268100082874298f,-0.13819573819637299f}, +{0.020149538293480873f,-0.03840681165456772f,0.4127817749977112f,-0.2523573637008667f,-0.21765978634357452f,-0.4540342092514038f,-0.32001304626464844f,-0.5396589040756226f,-0.21919101476669312f,-0.2550864815711975f,-0.20302052795886993f,-0.2918916642665863f,-0.3021690249443054f,-0.19007131457328796f,0.0479682981967926f,0.28083792328834534f}, +{0.19955825805664062f,0.13080951571464539f,0.20282304286956787f,-0.21126452088356018f,0.15339018404483795f,-0.06708966940641403f,0.04202890396118164f,0.06752092391252518f,0.25217023491859436f,-0.20238792896270752f,-0.2873592674732208f,-0.42253321409225464f,0.11435109376907349f,-0.2376958578824997f,0.0668090283870697f,0.04261681064963341f}, +{-0.03747318685054779f,-0.29164087772369385f,-0.40439701080322266f,-0.3783135414123535f,-0.40124887228012085f,-0.026558339595794678f,-0.15568238496780396f,-0.08766567707061768f,0.21709603071212769f,-0.35802650451660156f,-0.4817592203617096f,-0.3809756338596344f,-0.2601439654827118f,-0.1273980438709259f,-0.08245879411697388f,0.014104350470006466f}, +{0.16147102415561676f,-0.5628581643104553f,0.16706281900405884f,-0.1172998696565628f,-0.03297983109951019f,-0.9104568362236023f,-0.041414469480514526f,0.1465616226196289f,0.04248951002955437f,0.007101915311068296f,-0.3614332377910614f,-0.48312774300575256f,0.12316523492336273f,0.3939219117164612f,0.29427415132522583f,0.3038717210292816f}, }; const float h2[16][16] = { - {-0.6470258235931396f,0.9234167337417603f,-0.06966331601142883f,-0.014286808669567108f,-0.21907491981983185f,1.380876064300537f,0.07633070647716522f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,-5.604593753814697f,-0.32560282945632935f,0.051604073494672775f,-1.2667008638381958f,-0.7034933567047119f,-2.5710673332214355f}, -{-0.45135530829429626f,-1.0134674310684204f,0.057057321071624756f,0.010767251253128052f,-0.35503754019737244f,-1.7479071617126465f,-0.619813859462738f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-0.36765870451927185f,-0.9216219186782837f,0.0722721517086029f,0.373965859413147f,1.5379374027252197f,-1.6105296611785889f}, + {0.33418041467666626f,2.9079723358154297f,-0.06966331601142883f,-0.009902028366923332f,2.812035322189331f,4.195849418640137f,-0.038234543055295944f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,0.10707370936870575f,-0.20333009958267212f,-0.031739287078380585f,-3.289416551589966f,-1.172767996788025f,-0.6248859763145447f}, +{0.11070519685745239f,-2.3348469734191895f,0.057057321071624756f,-0.10134492069482803f,-5.252432346343994f,-1.3715343475341797f,-0.8426902890205383f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-7.361403465270996f,-0.858361005783081f,0.0845860168337822f,2.2169580459594727f,-3.0816471576690674f,-1.0190033912658691f}, {-0.22745239734649658f,0.003037691116333008f,-0.061119019985198975f,0.35696902871131897f,0.05568113923072815f,0.011741191148757935f,-0.20225946605205536f,-0.08465918898582458f,0.3489862382411957f,0.0687277615070343f,0.31964078545570374f,0.3004753887653351f,0.36063823103904724f,-0.42892736196517944f,0.08652284741401672f,0.027493387460708618f}, -{-0.007047394756227732f,-0.27744632959365845f,-0.2894435524940491f,0.29351896047592163f,0.08946844935417175f,0.28017458319664f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.4756048023700714f,0.22531040012836456f,-0.5598627328872681f,-0.21528418362140656f,0.23964208364486694f,0.01794714853167534f}, -{-0.9996108412742615f,0.6556373238563538f,-0.25313520431518555f,0.20095843076705933f,0.036378175020217896f,0.5841151475906372f,-0.4279506504535675f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-3.687429189682007f,-0.8674498200416565f,-0.16278326511383057f,-0.9830107092857361f,-0.47475293278694153f,-1.9154908657073975f}, -{0.7125872373580933f,-0.5864613652229309f,-0.3519742488861084f,0.31401076912879944f,-0.3015052080154419f,-0.5513808131217957f,-0.6527066826820374f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-1.9749420881271362f,-0.5287045240402222f,-0.423772931098938f,0.48089835047721863f,0.3467353880405426f,-1.494025707244873f}, +{-0.1391567885875702f,0.03293241187930107f,-0.2894435524940491f,0.25554025173187256f,0.08946844935417175f,0.1340968757867813f,-0.39087218046188354f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.7025435566902161f,0.05798906087875366f,-0.5013425946235657f,-0.030901746824383736f,-0.06675297021865845f,-0.0446302704513073f}, +{-2.245600938796997f,1.6008015871047974f,-0.25313520431518555f,0.1469619870185852f,1.6072996854782104f,-1.3637473583221436f,-0.5957030653953552f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-6.811410427093506f,-0.7977238893508911f,-0.022602174431085587f,-1.6454986333847046f,0.5441725850105286f,-0.7979243397712708f}, +{0.5210384130477905f,-0.11346126347780228f,-0.3519742488861084f,0.29306867718696594f,-0.3572634160518646f,1.75344979763031f,-0.744201123714447f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-2.398893117904663f,-0.48980283737182617f,-0.45957082509994507f,0.5487804412841797f,-0.7850930690765381f,-0.7663227319717407f}, {-0.1828227937221527f,-0.02554568648338318f,-0.3260969817638397f,0.08422836661338806f,-0.38453540205955505f,-0.25432005524635315f,0.285016268491745f,0.12387624382972717f,-0.0982072651386261f,0.13111665844917297f,-0.03692615032196045f,-0.32796353101730347f,-0.21546880900859833f,0.049302369356155396f,-0.27088475227355957f,-0.4124959409236908f}, -{1.4051717519760132f,-1.2096902132034302f,0.33083590865135193f,-0.26489073038101196f,-0.14358049631118774f,-1.1046992540359497f,-0.2944647967815399f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,-1.5173996686935425f,-0.8136221170425415f,-0.5190281271934509f,0.7176072597503662f,0.3367636501789093f,-1.135432481765747f}, -{-0.7854704260826111f,0.8660656213760376f,-0.11379697918891907f,-0.002599106403067708f,0.041274964809417725f,0.4969264566898346f,-0.34446999430656433f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-1.73382568359375f,-0.8644884824752808f,-0.559813916683197f,-1.2818701267242432f,-0.24607324600219727f,-1.5984642505645752f}, -{0.14415183663368225f,0.3720410168170929f,-0.13502129912376404f,-0.28218820691108704f,0.12987366318702698f,0.26643428206443787f,-0.0732683390378952f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.9983624219894409f,-0.13910961151123047f,0.07658924162387848f,-1.1047462224960327f,-0.2704657316207886f,-0.07523636519908905f}, -{-0.25595757365226746f,-0.002680697478353977f,0.0457797646522522f,-0.35344916582107544f,-0.03321319818496704f,-0.43828925490379333f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.21199601888656616f,0.3545852601528168f,-0.3647043704986572f,0.41276517510414124f,-0.3999668061733246f,-0.27647581696510315f}, -{-0.9552686810493469f,0.7854958176612854f,0.3954955041408539f,0.21858009696006775f,0.0033026933670043945f,-0.6821251511573792f,-0.5856509208679199f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-0.4841294288635254f,-0.5940548777580261f,-0.07454157620668411f,-1.1652522087097168f,0.5018336772918701f,-0.8274908661842346f}, -{-0.2541414797306061f,-0.21145831048488617f,-0.15798500180244446f,0.40099087357521057f,-0.37393757700920105f,0.35053005814552307f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.11015696823596954f,-0.2837170362472534f,0.41839322447776794f,-0.01921037770807743f,-0.1291121244430542f,0.1134575754404068f}, -{0.5787839889526367f,0.46909838914871216f,-0.2018718123435974f,-0.1313052773475647f,0.07545611262321472f,0.3535527288913727f,-0.43976590037345886f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.7600628137588501f,-0.7896730303764343f,-0.34561383724212646f,-0.4759311378002167f,-0.5667108297348022f,0.07422734797000885f}, +{-0.007747650612145662f,0.3667842745780945f,0.33083590865135193f,-0.38213321566581726f,-0.14358049631118774f,-0.2546055316925049f,-0.09043094515800476f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,0.49078798294067383f,-0.3058888614177704f,-0.31673234701156616f,0.44664251804351807f,-0.9339061975479126f,-0.1061311885714531f}, +{-0.17694538831710815f,0.1767565757036209f,-0.11379697918891907f,-0.07116051763296127f,0.041274964809417725f,-0.517110288143158f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-0.3456110656261444f,-0.24793067574501038f,-0.4166972041130066f,-0.30618393421173096f,-0.33565962314605713f,-0.48154377937316895f}, +{0.5043365359306335f,0.1850307136774063f,-0.13502129912376404f,-0.25706031918525696f,-0.8451530337333679f,-0.9415315389633179f,-0.2777014970779419f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,1.5622152090072632f,-0.19312366843223572f,0.1250869333744049f,-0.1843482404947281f,1.0270578861236572f,-0.5840676426887512f}, +{-0.25693249702453613f,-0.010147050023078918f,0.0457797646522522f,-0.3549601435661316f,-0.03321319818496704f,-0.4391511380672455f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.22192376852035522f,0.3545852601528168f,-0.3647043704986572f,0.4194667637348175f,-0.3910166025161743f,-0.2837793529033661f}, +{2.3816981315612793f,0.4564768075942993f,0.3954955041408539f,0.11254638433456421f,1.1973353624343872f,1.804193377494812f,-0.8583166599273682f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-1.3897980451583862f,-0.5921090841293335f,-0.14213289320468903f,-0.26851770281791687f,1.597784161567688f,-0.5877130031585693f}, +{-0.267646849155426f,-0.20429572463035583f,-0.15798500180244446f,0.3999568819999695f,-0.37393757700920105f,0.35770177841186523f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.10294663906097412f,-0.2837170362472534f,0.41839322447776794f,-0.02792874164879322f,-0.13706544041633606f,0.11999254673719406f}, +{0.2282707840204239f,-0.13254989683628082f,-0.2018718123435974f,-0.07019486278295517f,0.07545611262321472f,-0.33204764127731323f,-0.4035329520702362f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.47974857687950134f,-0.8069085478782654f,-0.40297332406044006f,0.23708327114582062f,0.5259239673614502f,-0.3548051416873932f}, {0.4138670265674591f,0.1604653298854828f,0.056746453046798706f,0.036025404930114746f,0.3228367865085602f,-0.07083973288536072f,0.018455177545547485f,0.0059362053871154785f,0.40515169501304626f,0.014240056276321411f,-0.07738298177719116f,0.1407785713672638f,-0.13024571537971497f,-0.29546058177948f,-0.11976784467697144f,-0.35825538635253906f}, -{-0.05113271251320839f,0.13485679030418396f,0.12081471085548401f,-0.19953562319278717f,0.29976895451545715f,-0.04317038133740425f,-0.2533479928970337f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.7943016886711121f,-0.30180585384368896f,-0.3520440459251404f,0.03719378635287285f,0.3227134644985199f,-0.17047692835330963f}, +{-0.5818981528282166f,0.014110059477388859f,0.12081471085548401f,-0.2973254919052124f,0.5392167568206787f,0.3773144781589508f,-0.39351940155029297f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,-6.493835926055908f,-0.12242847681045532f,-0.2689415514469147f,-0.2518419325351715f,-0.1694900244474411f,-0.652117908000946f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-1.6707737445831299f,0.15204265713691711f,-0.5357672572135925f,1.4726365804672241f,-0.6270995736122131f,0.3332441747188568f,0.3036012351512909f,-0.5172237753868103f,-1.8653632402420044f,-0.11870327591896057f,0.0830279216170311f,1.3689990043640137f,-1.9819954633712769f,-0.7810831665992737f,0.5823317766189575f}, -{0.047732532024383545f,0.18275044858455658f,-0.8281071782112122f,-0.25506946444511414f,0.5425428152084351f,-0.3514978587627411f,-0.3198729455471039f,-0.09594926238059998f,0.09731216728687286f,1.1421339511871338f,0.12330646067857742f,-0.8789128065109253f,-0.3508574366569519f,-0.33041754364967346f,-0.41934341192245483f,-0.7479274868965149f}, + {-0.36079341173171997f,-1.5671656131744385f,-0.870830237865448f,-0.4786093831062317f,-0.5575059056282043f,-0.773746132850647f,0.29977259039878845f,0.1743643879890442f,-0.5892294645309448f,-0.19605471193790436f,-0.27379146218299866f,0.06893575936555862f,2.2012624740600586f,-2.7650468349456787f,-1.8527313470840454f,1.5724681615829468f}, +{0.047732532024383545f,-0.23476845026016235f,-2.8836917877197266f,-0.42602431774139404f,-2.397148370742798f,1.254254937171936f,-0.3198729455471039f,-0.25123724341392517f,0.013695899397134781f,-0.5729482173919678f,0.09775999933481216f,-0.5587971806526184f,-0.9381403923034668f,-1.532671570777893f,-0.6944977045059204f,1.4258947372436523f}, {0.07903262972831726f,0.2790505588054657f,-0.07798504829406738f,0.04248586297035217f,-0.1963958442211151f,-0.19260792434215546f,-0.4038352966308594f,0.015906542539596558f,0.15353140234947205f,0.030178606510162354f,0.2488909661769867f,0.13805970549583435f,-0.0816211998462677f,-0.20733052492141724f,-0.3036302626132965f,0.054825395345687866f}, -{-0.30922991037368774f,-0.1686210185289383f,0.3091491460800171f,-0.37385931611061096f,-0.2175711691379547f,0.10472610592842102f,0.20021501183509827f,0.07002416253089905f,-0.23992235958576202f,-0.365601509809494f,0.13192829489707947f,0.41021624207496643f,-0.046575967222452164f,0.07995431870222092f,0.1429337114095688f,0.0017364860977977514f}, -{-0.39607733488082886f,-0.05481579899787903f,0.1976260244846344f,0.022423356771469116f,0.16892847418785095f,-0.27518749237060547f,0.16012099385261536f,0.3626593053340912f,-0.08640444278717041f,-0.11053556203842163f,-0.10529157519340515f,-0.31317979097366333f,-0.1530032455921173f,-0.1336749792098999f,0.22959044575691223f,0.19986507296562195f}, -{-0.37449589371681213f,-0.06108805537223816f,-1.0402090549468994f,0.08990592509508133f,-1.1193269491195679f,1.9863181114196777f,-0.18732719123363495f,0.06542519479990005f,-0.3333929479122162f,-0.2741556167602539f,-0.379880428314209f,-0.12976209819316864f,0.7532670497894287f,0.5838814973831177f,0.33683496713638306f,0.16442498564720154f}, -{0.4110594093799591f,0.12136334180831909f,-0.0060456483624875546f,0.37246426939964294f,0.46871381998062134f,-0.393480122089386f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.19097194075584412f,-0.2122516930103302f,0.3126353323459625f,-0.11581012606620789f}, +{-0.30922991037368774f,-0.16969707608222961f,0.3056027889251709f,-0.380797415971756f,-0.17742466926574707f,0.10660405457019806f,0.20021501183509827f,0.07002416253089905f,-0.25412267446517944f,-0.365601509809494f,0.13192829489707947f,0.41021624207496643f,-0.13397035002708435f,0.0815882533788681f,0.15073642134666443f,0.10944337397813797f}, +{-0.39607733488082886f,-0.05481579899787903f,0.1976260244846344f,0.022423356771469116f,0.16892847418785095f,-0.6999471187591553f,0.16012099385261536f,0.21129152178764343f,-0.08640444278717041f,-0.11053556203842163f,-0.2634495496749878f,-0.31317979097366333f,-0.1530032455921173f,-0.24679358303546906f,0.22959044575691223f,-3.0342295169830322f}, +{-0.37449589371681213f,-0.10077743977308273f,-4.51036262512207f,-0.04963836818933487f,-0.8192825317382812f,-0.6951172947883606f,-0.19780586659908295f,-0.09049295634031296f,-0.9114404916763306f,-0.8623005151748657f,-0.4059421718120575f,-0.16295623779296875f,-5.017462730407715f,-1.1079373359680176f,0.34683844447135925f,0.6427209377288818f}, +{0.4110594093799591f,0.2715781033039093f,-0.38537508249282837f,0.37246426939964294f,-0.05490662157535553f,-0.009114405140280724f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,-0.13377737998962402f,0.25604528188705444f,0.3126353323459625f,-0.1528691202402115f}, {-0.40892091393470764f,0.043769627809524536f,-0.3867315948009491f,0.25968697667121887f,0.3424709737300873f,-0.051169753074645996f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.2742875814437866f,-0.36560842394828796f,0.07994696497917175f,0.005298197269439697f}, {0.10697010159492493f,-0.12228584289550781f,-0.37870171666145325f,0.21184906363487244f,-0.37222859263420105f,-0.17138728499412537f,-0.1382003128528595f,0.3493293821811676f,-0.360889196395874f,-0.3875247836112976f,0.42142823338508606f,-0.3482915461063385f,-0.3289247751235962f,-0.2186824083328247f,0.09620395302772522f,-0.06898030638694763f}, {0.2847062647342682f,0.018552124500274658f,0.11435768008232117f,0.36562982201576233f,-0.047046810388565063f,0.30447837710380554f,0.2430230677127838f,0.2909286320209503f,-0.2802048921585083f,0.18043199181556702f,0.41849127411842346f,-0.287167489528656f,0.24394884705543518f,-0.14084559679031372f,-0.10168051719665527f,0.010465055704116821f}, -{0.15459725260734558f,0.7006567716598511f,-0.6552103161811829f,-0.16883844137191772f,0.04475979506969452f,1.3933134078979492f,-0.08742031455039978f,0.05785742402076721f,-0.3147772252559662f,-0.1499585062265396f,-0.0067095705308020115f,0.011672536842525005f,0.2257264107465744f,1.4594110250473022f,0.42127248644828796f,-0.9906511902809143f}, -{-0.408692330121994f,-0.12167225778102875f,-0.11162155121564865f,0.0922636091709137f,-0.12863297760486603f,-0.1449405699968338f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.6882802844047546f,-0.19589252769947052f,-0.3583527207374573f,0.07805956155061722f}, -{-0.2991822361946106f,0.3794580399990082f,0.014117272570729256f,-0.05932474136352539f,0.1678178459405899f,0.1392442286014557f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.3626573383808136f,0.09562748670578003f,-0.21479249000549316f,0.36124154925346375f,-0.0492718480527401f}, -{-0.2675279378890991f,-0.20912638306617737f,0.3860570192337036f,-0.10026536881923676f,0.750762403011322f,-0.3292187452316284f,-0.32875844836235046f,-0.31893211603164673f,-0.8638364672660828f,0.0629776194691658f,-0.5012393593788147f,-0.5317681431770325f,0.9589196443557739f,-0.8428072929382324f,0.34423255920410156f,0.7128982543945312f}, -{-0.015470266342163086f,-0.44555407762527466f,0.25433310866355896f,0.20409812033176422f,-0.22110849618911743f,-0.8526780009269714f,0.05196094512939453f,-0.008358269929885864f,-1.8200902938842773f,-1.404388666152954f,0.04944964125752449f,1.2042348384857178f,-0.6587819457054138f,-0.01796478033065796f,0.10451231151819229f,0.4006541967391968f}, -{0.1863725483417511f,0.2446456104516983f,-0.011895897798240185f,-0.46003812551498413f,-0.09950538724660873f,0.7812361121177673f,0.04860696196556091f,0.17769548296928406f,-0.21045884490013123f,-0.02392253838479519f,-0.5194469094276428f,-0.7190624475479126f,0.9879310727119446f,-0.04284123703837395f,-0.017980048432946205f,0.010620726272463799f}, +{0.15459725260734558f,0.22762465476989746f,1.5232031345367432f,-0.2233445942401886f,1.524779200553894f,2.6997625827789307f,-0.08742031455039978f,0.05785742402076721f,-0.1277361363172531f,-0.37371426820755005f,-0.03133596479892731f,-0.30447322130203247f,-1.9101834297180176f,0.6954238414764404f,0.46117544174194336f,1.1762653589248657f}, +{-0.408692330121994f,0.07260357588529587f,-0.02147701010107994f,0.0922636091709137f,-0.1529182642698288f,-0.05657944083213806f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.6609845757484436f,-0.1087266057729721f,-0.10636871308088303f,-0.0133456289768219f}, +{-0.2991822361946106f,0.3794580399990082f,-0.08715943992137909f,-0.05932474136352539f,0.11478022485971451f,0.3007120192050934f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.05380958318710327f,-0.13672849535942078f,0.35829514265060425f,-0.10585878044366837f}, +{-0.2675279378890991f,-0.1429223269224167f,-0.9267327189445496f,-0.1256239265203476f,0.49980443716049194f,-0.843601405620575f,-0.33532586693763733f,-0.31893211603164673f,-1.478386402130127f,-1.1926257610321045f,-0.5260127782821655f,-0.8384293913841248f,0.9772797226905823f,0.1813446283340454f,0.17612296342849731f,1.590701699256897f}, +{-0.015470266342163086f,-0.4976375699043274f,2.497199058532715f,0.14489558339118958f,0.11334121972322464f,0.3805958926677704f,0.02394937537610531f,-0.16103173792362213f,-0.677362859249115f,-0.8498573303222656f,-0.026575788855552673f,-0.427055299282074f,0.17177484929561615f,1.67837655544281f,0.08538639545440674f,-1.3552721738815308f}, +{0.1863725483417511f,0.13157431781291962f,-0.047772910445928574f,-0.49708226323127747f,0.7275430560112f,-0.145163431763649f,0.04860696196556091f,0.17769548296928406f,-0.050254471600055695f,0.19876523315906525f,-0.5504136085510254f,0.19592127203941345f,0.23928996920585632f,-0.12190091609954834f,-0.1250786930322647f,0.041962411254644394f}, }; -const float hout[16] = { 0.45773375034332275f,0.8294255137443542f,-0.6711450219154358f,-0.1830643117427826f,0.7750869989395142f,0.35511845350265503f,0.0030125975608825684f,0.022223524749279022f,0.04753764718770981f,-0.7876517176628113f,-0.003175719641149044f,0.0392247810959816f,0.6021333932876587f,-0.3109360337257385f,0.23280669748783112f,-1.4544168710708618f }; +const float hout[16] = { 0.45773375034332275f,0.5733839869499207f,-0.5152473449707031f,-0.035915032029151917f,-0.306951105594635f,0.30648893117904663f,-0.1005084440112114f,-0.08898112922906876f,-0.2034129500389099f,-0.05844772607088089f,-0.07081260532140732f,0.08596939593553543f,0.5426119565963745f,0.5678461194038391f,1.0715678930282593f,-0.25178417563438416f }; -const float b1[16] = { 0.7056122422218323f,1.1291390657424927f,-1.7145336866378784f,0.2956685423851013f,1.0393290519714355f,0.9797787070274353f,-0.058932315558195114f,1.0276665687561035f,0.7101954817771912f,-0.9258805513381958f,0.5699434876441956f,1.9668344259262085f,-0.37089529633522034f,-0.8922005295753479f,-1.087764859199524f,0.8579965233802795f }; +const float b1[16] = { 0.5956194400787354f,1.4903173446655273f,-1.7145336866378784f,0.2382747083902359f,1.812330722808838f,1.1310549974441528f,-0.058932315558195114f,1.0475828647613525f,0.5750831365585327f,-1.1691874265670776f,0.564017653465271f,0.8430382013320923f,-0.3627738058567047f,-0.8757394552230835f,-1.087764859199524f,1.8534502983093262f }; -const float b2[16] = { 0.30709776282310486f,-1.0053777694702148f,-1.4564176797866821f,-0.5643334984779358f,-0.6939148902893066f,-0.09909917414188385f,0.11684336513280869f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,-0.40117043256759644f,0.19153909385204315f,-0.38083168864250183f,1.8678460121154785f,0.29272031784057617f,0.6278016567230225f }; +const float b2[16] = { -0.19254711270332336f,-1.2538373470306396f,-1.4564176797866821f,-0.6360846757888794f,-2.2159981727600098f,-0.5284036993980408f,0.07729385793209076f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.16195619106292725f,0.17741809785366058f,-0.3301374316215515f,1.8553483486175537f,-0.1654871553182602f,0.5861462950706482f }; -const float b3[16] = { -1.963319182395935f,-0.6741920113563538f,0.12937204539775848f,-0.21879643201828003f,-0.9361562132835388f,-0.30483272671699524f,-0.45353031158447266f,-0.814145028591156f,0.053998082876205444f,0.6373391151428223f,-0.4335314631462097f,0.11158346384763718f,-0.267436146736145f,-0.325805127620697f,-1.3426309823989868f,-0.44092661142349243f }; +const float b3[16] = { -1.963319182395935f,-0.5293647646903992f,-0.10495924949645996f,-0.23769626021385193f,1.5550658702850342f,1.2147407531738281f,-0.47398853302001953f,-0.9554895758628845f,-0.067354217171669f,-0.006115084979683161f,-0.45877549052238464f,-0.290895938873291f,-1.0047727823257446f,1.1215981245040894f,-1.407442569732666f,-1.6007274389266968f }; -const float bout[1] = { -0.17210061848163605f }; +const float bout[1] = { -0.10839174687862396f }; float VALVE_POS_RAW_NN = 0.0f; @@ -400,8 +400,8 @@ input_NN[ind] = torq.sen / 10000.0f + 0.5f; ind = ind + 1; for(int i=0; i<numfuture_f; i++) { - input_NN[ind] = (f_future[time_interval*i+time_interval] - torq.sen)/10000.0f+0.5f; -// input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f+0.5f; +// input_NN[ind] = (f_future[time_interval*i+time_interval] - torq.sen)/10000.0f+0.5f; + input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f+0.5f; ind = ind + 1; }