![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LIGHT2
Diff: main.cpp
- Revision:
- 195:dde3bb8e0d81
- Parent:
- 194:b31951919b55
- Child:
- 196:56a7e26a4a8a
--- a/main.cpp Fri Dec 18 14:57:14 2020 +0000 +++ b/main.cpp Fri Dec 18 15:54:11 2020 +0000 @@ -1,4 +1,4 @@ -//201218_4 +//201218_5 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -198,72 +198,72 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-1.7083642482757568f,-1.5779472589492798f,0.12903714179992676f,1.0634089708328247f,-2.158130645751953f,1.8104257583618164f,-0.2791702151298523f,-1.3234320878982544f,-0.0887109562754631f,-0.0838925912976265f,1.1776814460754395f,-1.0906319618225098f,-1.6356991529464722f,0.8737804293632507f,-0.2571594715118408f,1.425679326057434f}, -{-0.9315828084945679f,-0.48247814178466797f,-0.3927857577800751f,0.17988276481628418f,-1.191731333732605f,0.7561285495758057f,-0.5099403262138367f,-0.662891149520874f,0.12627223134040833f,0.15958870947360992f,0.3515961170196533f,-0.5163799524307251f,-0.44114604592323303f,0.36607253551483154f,-0.20967772603034973f,0.8521794676780701f}, -{-0.1401415467262268f,0.536644697189331f,0.36391180753707886f,-0.7396069765090942f,0.11177525669336319f,-0.02057299017906189f,0.1825331747531891f,0.22812804579734802f,-0.010339191183447838f,0.1558271050453186f,-0.5210474729537964f,0.07377694547176361f,0.06569085270166397f,0.887859582901001f,0.05590221285820007f,-0.18145160377025604f}, -{0.38947466015815735f,0.7902688980102539f,0.39742106199264526f,-0.4251823127269745f,0.7582203149795532f,-1.0087244510650635f,-0.22064009308815002f,0.7555295825004578f,0.11820007860660553f,0.2843056321144104f,-0.5753829479217529f,1.045906662940979f,0.3827585279941559f,0.8180925250053406f,-0.2961459457874298f,-0.09202978014945984f}, -{1.3200106620788574f,1.5207263231277466f,-0.0051451027393341064f,-0.6152558922767639f,1.3816864490509033f,-1.1872690916061401f,0.02445490099489689f,0.7481051087379456f,-0.013146400451660156f,0.09270843863487244f,-0.551243245601654f,0.9207057356834412f,0.9870776534080505f,0.9731601476669312f,-0.3865056037902832f,-0.8911765217781067f}, -{0.8773026466369629f,0.3782320022583008f,0.21773302555084229f,0.5241668820381165f,0.9724035859107971f,-0.6143779158592224f,0.05976053699851036f,0.24705880880355835f,-0.18107903003692627f,0.09867625683546066f,0.047598328441381454f,-0.5906416773796082f,0.5385941863059998f,1.0806857347488403f,-0.4132833778858185f,-1.1088954210281372f}, -{-1.2860573530197144f,-0.6182106733322144f,-0.2501986622810364f,-0.5696930289268494f,-1.1798095703125f,1.4417859315872192f,0.12410038709640503f,-2.725430488586426f,-1.1789278984069824f,0.19527918100357056f,0.19210797548294067f,0.31124386191368103f,-0.0372321717441082f,-0.9033676981925964f,-0.15618428587913513f,1.0094393491744995f}, -{-0.29186612367630005f,-1.0328090190887451f,-0.26619744300842285f,2.828730821609497f,-0.7062080502510071f,-0.24073761701583862f,-0.0939173549413681f,-1.0630011558532715f,0.7385551333427429f,0.12280473113059998f,0.3134021759033203f,-0.43344244360923767f,-0.44993478059768677f,0.3174239695072174f,0.04303058981895447f,-0.6784780621528625f}, -{1.59835946559906f,0.8740957379341125f,0.10248100757598877f,-2.73453688621521f,0.84181147813797f,-1.7514652013778687f,0.016528913751244545f,0.6764845848083496f,1.0502597093582153f,0.23555311560630798f,-2.7298104763031006f,3.2437171936035156f,-0.14212673902511597f,0.639388918876648f,-0.30555272102355957f,0.5875364542007446f}, -{-0.3848714232444763f,-0.03209398686885834f,0.18462657928466797f,0.1937711536884308f,0.6714569926261902f,0.3907460570335388f,-0.18479645252227783f,0.25423818826675415f,-4.370779991149902f,-0.470211923122406f,-1.026403546333313f,-2.6428158283233643f,2.8721742630004883f,-0.49147212505340576f,0.3484981060028076f,-2.299736976623535f}, -{0.434806764125824f,0.036423489451408386f,0.37182438373565674f,0.3337114155292511f,-0.02593325637280941f,-0.037050120532512665f,-0.0787377655506134f,0.10178950428962708f,2.9032366275787354f,0.11380341649055481f,0.48807212710380554f,-0.9232026934623718f,-1.8773866891860962f,-0.7698294520378113f,0.26688337326049805f,-0.9757272005081177f}, -{-0.631863534450531f,-0.51824551820755f,-0.40320003032684326f,0.16272775828838348f,0.3224349319934845f,-0.18526290357112885f,0.2721494436264038f,0.08035759627819061f,0.856447160243988f,0.2537602186203003f,-0.16383951902389526f,0.3714016079902649f,-0.24798749387264252f,-0.04087410122156143f,0.10493969917297363f,-0.23319652676582336f}, -{0.2278023362159729f,-0.05988635495305061f,0.19847965240478516f,-0.16288118064403534f,-0.07869156450033188f,0.31784969568252563f,-0.1270318329334259f,0.12723957002162933f,-0.12677061557769775f,-0.18985214829444885f,0.15085221827030182f,-0.0098095228895545f,-0.04912818968296051f,0.10715558379888535f,-0.22268100082874298f,-0.19564121961593628f}, -{-0.24136283993721008f,0.09043258428573608f,0.4127817749977112f,0.03742930293083191f,-0.09521298110485077f,-0.19498518109321594f,-0.2119545042514801f,-0.0026207196060568094f,-0.1323820948600769f,-0.27188432216644287f,-0.08169961720705032f,0.11178156733512878f,0.14862361550331116f,0.12379594892263412f,0.0479682981967926f,0.021596327424049377f}, -{0.12955604493618011f,-0.025349684059619904f,0.20282304286956787f,0.06336504220962524f,0.044888079166412354f,0.10501701384782791f,0.14649520814418793f,0.03327454626560211f,-0.11236454546451569f,0.07060986757278442f,0.09670546650886536f,0.000719104427844286f,-0.023936094716191292f,0.16088245809078217f,0.0668090283870697f,0.0534098744392395f}, -{0.08626224100589752f,0.17451998591423035f,-0.40439701080322266f,-0.11646418273448944f,-0.02201484702527523f,0.08347446471452713f,-0.07882561534643173f,-0.038883574306964874f,0.06304114311933517f,-0.05464116111397743f,-0.11908343434333801f,0.0135712381452322f,0.005938603542745113f,-0.00034736760426312685f,-0.08245879411697388f,-0.09743814170360565f}, -{-0.06705047190189362f,-0.2771543562412262f,0.16706281900405884f,-0.016586488112807274f,-0.0822872743010521f,-0.07644876837730408f,0.036811769008636475f,0.05269763618707657f,0.001398782478645444f,0.06734776496887207f,0.05126605182886124f,-0.018521256744861603f,-0.01790337823331356f,-0.36203619837760925f,0.29427415132522583f,-0.04341334477066994f}, + {-1.5049792528152466f,1.3884327411651611f,0.12903714179992676f,0.891964316368103f,-2.0343658924102783f,2.1200127601623535f,-0.17472904920578003f,0.1945325881242752f,-0.6159688234329224f,-2.1421313285827637f,0.646172046661377f,-1.4796212911605835f,-1.6515940427780151f,-1.0867961645126343f,-0.2571594715118408f,-0.6423998475074768f}, +{-0.8074502348899841f,0.6986951231956482f,-0.3927857577800751f,0.10117524862289429f,-1.0908969640731812f,0.9588668346405029f,-0.4054011106491089f,0.027100883424282074f,-0.20849254727363586f,-0.7737641334533691f,-0.0007267668261192739f,-0.559249222278595f,-0.34011590480804443f,-0.9275782108306885f,-0.20967772603034973f,0.00843813456594944f}, +{-0.1761643886566162f,-0.00044299568980932236f,0.36391180753707886f,-0.6050712466239929f,0.10568452626466751f,0.08904145658016205f,0.2872133255004883f,-0.04633462801575661f,-0.18011713027954102f,0.3201780915260315f,-0.6315233707427979f,0.2315744310617447f,0.21526654064655304f,0.2692757546901703f,0.05590221285820007f,0.1846989542245865f}, +{0.3208276033401489f,-0.5977734327316284f,0.39742106199264526f,-0.13856913149356842f,0.6892843246459961f,-0.9602494835853577f,-0.11584559082984924f,-0.06512385606765747f,0.1462620198726654f,0.9997460842132568f,-0.4601175785064697f,1.0265581607818604f,0.409962922334671f,0.5716820359230042f,-0.2961459457874298f,0.6279282569885254f}, +{1.2834209203720093f,-0.7100825905799866f,-0.0051451027393341064f,-0.48592910170555115f,1.3144265413284302f,-1.2957475185394287f,0.1294034719467163f,-0.3098825216293335f,0.4540647268295288f,1.3852906227111816f,-0.3826965093612671f,1.0702041387557983f,0.8663880825042725f,0.983588457107544f,-0.3865056037902832f,0.2630000412464142f}, +{0.7572326064109802f,-0.704451322555542f,0.21773302555084229f,0.2423843890428543f,0.74943608045578f,-1.221998691558838f,0.16514194011688232f,0.40929198265075684f,0.4561389982700348f,0.43248844146728516f,0.2699551284313202f,-0.26172181963920593f,0.477117657661438f,0.22961737215518951f,-0.4132833778858185f,-0.5123910307884216f}, +{0.10581762343645096f,1.3901673555374146f,-0.2501986622810364f,-0.1542971432209015f,-0.35934504866600037f,0.5287187695503235f,0.06014183163642883f,-0.40914610028266907f,0.3122667670249939f,0.3267156779766083f,0.07723409682512283f,0.10168510675430298f,-0.9989253282546997f,2.5577051639556885f,-0.15618428587913513f,-0.9690904021263123f}, +{-2.7382125854492188f,0.4130338430404663f,-0.26619744300842285f,1.700432538986206f,-1.3281302452087402f,-1.8974241018295288f,-0.17925891280174255f,-0.9012918472290039f,-0.07043382525444031f,-0.48516932129859924f,2.527921438217163f,-1.9383374452590942f,0.09208452701568604f,0.08270622044801712f,0.04303058981895447f,-1.6846622228622437f}, +{1.0545861721038818f,-1.4685617685317993f,0.10248100757598877f,-0.7680048942565918f,0.7788065075874329f,-0.5541813373565674f,-0.07246989011764526f,-3.9993937015533447f,-1.7258435487747192f,1.5052671432495117f,-2.6104493141174316f,2.101834535598755f,1.8155968189239502f,1.0661120414733887f,-0.30555272102355957f,2.365203619003296f}, +{-0.8168604373931885f,2.0169551372528076f,0.18462657928466797f,-3.2892398834228516f,1.213491439819336f,0.017481716349720955f,-0.2990540862083435f,1.388200283050537f,3.561858892440796f,-0.5190175771713257f,-0.29394879937171936f,-2.029303550720215f,1.6247004270553589f,0.7122467160224915f,0.3484981060028076f,-2.1400225162506104f}, +{1.007614254951477f,-0.9092363715171814f,0.37182438373565674f,1.7689789533615112f,-0.4636596143245697f,0.44717833399772644f,-0.20339298248291016f,1.655295729637146f,-2.704533576965332f,0.4038698971271515f,1.1270475387573242f,-0.9903129935264587f,-0.006957195699214935f,0.191023051738739f,0.26688337326049805f,-0.8353675007820129f}, +{0.3204830288887024f,-0.3771741986274719f,-0.40320003032684326f,0.8849078416824341f,-0.39249494671821594f,-0.11090171337127686f,0.1533789038658142f,-0.33072859048843384f,0.2818801701068878f,0.6622859239578247f,0.36905643343925476f,-0.027050090953707695f,0.031340520828962326f,0.22625774145126343f,0.10493969917297363f,1.2014644145965576f}, +{-0.027245059609413147f,-0.12394643574953079f,0.19847965240478516f,0.049304619431495667f,0.21819953620433807f,0.5548239350318909f,-0.2404318004846573f,0.34036731719970703f,0.2525804936885834f,-0.22883126139640808f,-0.282358318567276f,0.26164373755455017f,0.054766684770584106f,-0.10002446919679642f,-0.22268100082874298f,0.2973868250846863f}, +{0.06438226252794266f,-0.07111430168151855f,0.4127817749977112f,-0.06975249946117401f,-0.26233044266700745f,-0.24256393313407898f,-0.32001304626464844f,-0.22010767459869385f,0.21593058109283447f,0.0920371562242508f,-0.02842799946665764f,0.06874515116214752f,0.13893914222717285f,0.04359567537903786f,0.0479682981967926f,0.15775953233242035f}, +{-0.1833210438489914f,0.18803685903549194f,0.20282304286956787f,0.1314825862646103f,0.10088987648487091f,0.17484170198440552f,0.04202890396118164f,0.11449118703603745f,0.14355172216892242f,-0.01671559177339077f,-0.07656802237033844f,0.04497041553258896f,-0.010590135119855404f,-0.04078643396496773f,0.0668090283870697f,-0.31613799929618835f}, +{0.03417176753282547f,-0.3786371052265167f,-0.40439701080322266f,-0.0856500118970871f,-0.07531658560037613f,-0.010137107223272324f,-0.15568238496780396f,-0.07548399269580841f,-0.09875830262899399f,-0.022417474538087845f,-0.19422344863414764f,0.024653606116771698f,-0.006860379129648209f,0.06817493587732315f,-0.08245879411697388f,-0.16006922721862793f}, +{-0.02824515290558338f,-0.056637030094861984f,0.16706281900405884f,0.02173255942761898f,-0.07349086552858353f,0.11741489917039871f,-0.041414469480514526f,-0.003831858281046152f,0.17465364933013916f,0.020348260179162025f,0.14337372779846191f,0.13839061558246613f,0.052412476390600204f,-0.013077993877232075f,0.29427415132522583f,0.19772164523601532f}, }; const float h2[16][16] = { - {0.5691848397254944f,0.4728170931339264f,-0.06966331601142883f,-0.39116427302360535f,-0.21907491981983185f,0.41213688254356384f,0.146681010723114f,-0.022342750802636147f,-0.43008196353912354f,-0.1415480375289917f,0.43119117617607117f,-0.3641720414161682f,0.006088627967983484f,-0.1827574521303177f,-0.3519345819950104f,0.19674095511436462f}, -{1.2881673574447632f,0.15647029876708984f,0.057057321071624756f,0.3154185116291046f,-0.35503754019737244f,-0.18368716537952423f,-0.4701302647590637f,-0.4165448248386383f,-0.33757925033569336f,0.2895788848400116f,-0.05714080482721329f,-0.1503470540046692f,0.13544173538684845f,-0.1624496430158615f,-0.20547306537628174f,-0.08609229326248169f}, + {-0.09101764857769012f,0.4054962396621704f,-0.06966331601142883f,0.9045584797859192f,-0.21907491981983185f,3.1151559352874756f,0.0655006542801857f,0.0446651317179203f,-0.43008196353912354f,-0.1415480375289917f,-0.7361615896224976f,-5.880949974060059f,-0.02717401273548603f,0.7095373868942261f,0.7991701364517212f,0.32784658670425415f}, +{0.4075763523578644f,-0.16204024851322174f,0.057057321071624756f,0.28799089789390564f,-0.35503754019737244f,-0.3077959418296814f,-0.667557954788208f,-0.3348168432712555f,-0.33757925033569336f,0.2895788848400116f,-0.10099255293607712f,0.3099772334098816f,0.17714782059192657f,0.2539375424385071f,-1.1278986930847168f,-0.3848106861114502f}, {-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.6552329063415527f,-0.5718222856521606f,-0.2894435524940491f,-0.5079841613769531f,0.08946844935417175f,-4.105660915374756f,-0.46833527088165283f,0.2641298472881317f,0.26211628317832947f,0.2953031361103058f,2.969101905822754f,1.2770133018493652f,-0.5125404596328735f,2.347217559814453f,1.9680869579315186f,-0.4975593090057373f}, -{0.2024247944355011f,0.722917914390564f,-0.25313520431518555f,1.1699090003967285f,0.036378175020217896f,0.7215865850448608f,-0.38932323455810547f,-0.22802962362766266f,-0.024399548768997192f,-0.39465832710266113f,0.4061717391014099f,-1.7283275127410889f,-0.047698259353637695f,0.592915952205658f,-0.8277308344841003f,-0.16879820823669434f}, -{-1.3462021350860596f,-0.3149687349796295f,-0.3519742488861084f,0.5717698335647583f,-0.3015052080154419f,-2.073889970779419f,-0.8116636276245117f,-0.13270969688892365f,-0.23047015070915222f,0.3579089343547821f,-1.3835636377334595f,0.9355102181434631f,-0.3199501633644104f,-0.06824032217264175f,0.5207514762878418f,-0.9127680063247681f}, -{-0.3140398859977722f,-0.004035272169858217f,-0.3260969817638397f,0.0836765393614769f,-0.38453540205955505f,-0.31289756298065186f,0.285016268491745f,0.12387624382972717f,-0.0982072651386261f,0.13111665844917297f,-0.03587973490357399f,-0.23997631669044495f,-0.21546880900859833f,0.030660871416330338f,-0.27088475227355957f,-0.3908737599849701f}, -{-2.756251573562622f,-0.69954913854599f,0.33083590865135193f,-0.15728795528411865f,-0.14358049631118774f,0.35712817311286926f,-0.2757829427719116f,-0.32823872566223145f,0.2600560486316681f,-0.37898191809654236f,0.3066903054714203f,-0.23127834498882294f,-0.3441482484340668f,0.4460092782974243f,-2.52577543258667f,2.300333261489868f}, -{-0.8602809309959412f,-1.4238542318344116f,-0.11379697918891907f,-0.5701398849487305f,0.041274964809417725f,0.26059553027153015f,-0.23149670660495758f,-0.025799918919801712f,0.06103590130805969f,-0.38046833872795105f,-0.7604803442955017f,0.023763295263051987f,-0.3856164216995239f,-3.4005417823791504f,-1.2212531566619873f,-2.109743595123291f}, -{-0.01684081368148327f,0.22497045993804932f,-0.13502129912376404f,0.18864621222019196f,0.12987366318702698f,0.23987852036952972f,0.25282537937164307f,-0.3904013931751251f,-0.13619378209114075f,0.16938945651054382f,0.3096720278263092f,0.2490568906068802f,0.35410550236701965f,-0.3494294285774231f,-0.04511014744639397f,-0.23067177832126617f}, -{-3.6088755130767822f,-0.3405955135822296f,0.0457797646522522f,-3.544160842895508f,-0.03321319818496704f,-0.8580151796340942f,0.23537331819534302f,-0.2850639224052429f,-0.050184011459350586f,0.12480869889259338f,0.014287109486758709f,0.17153573036193848f,-0.3081429600715637f,0.9240223169326782f,-0.6378133893013f,-1.2251911163330078f}, -{-0.190174400806427f,1.8639897108078003f,0.3954955041408539f,0.251954048871994f,0.0033026933670043945f,1.4607285261154175f,-0.44148826599121094f,-0.25987958908081055f,0.3487861454486847f,-0.32520344853401184f,0.22084060311317444f,-0.04388221353292465f,-0.07088323682546616f,-1.681166648864746f,0.23780125379562378f,1.1097744703292847f}, -{-0.05599940940737724f,-0.47579967975616455f,-0.15798500180244446f,1.2764486074447632f,-0.37393757700920105f,-1.230921745300293f,-0.2088996320962906f,-0.37694165110588074f,-0.3764709532260895f,0.2424570620059967f,0.9758947491645813f,-1.3193187713623047f,0.24843472242355347f,-1.5051825046539307f,0.3099336326122284f,-0.8500361442565918f}, -{0.6509760618209839f,0.4550310969352722f,-0.2018718123435974f,1.319537878036499f,0.07545611262321472f,-0.04187782108783722f,-0.09848622232675552f,-0.24257183074951172f,-0.24509364366531372f,0.19522181153297424f,0.5890890955924988f,-0.11456185579299927f,-0.20275536179542542f,0.7209760546684265f,0.6397956013679504f,-1.382286548614502f}, +{-0.16781355440616608f,-1.205681324005127f,-0.2894435524940491f,-3.0178229808807373f,0.08946844935417175f,0.8701988458633423f,-0.5534926652908325f,0.3662342131137848f,0.26211628317832947f,0.2953031361103058f,-0.7005969882011414f,-0.9946783781051636f,-0.4869251847267151f,-0.010542111471295357f,0.6177319884300232f,0.12078813463449478f}, +{-0.7870347499847412f,1.358780026435852f,-0.25313520431518555f,1.5327919721603394f,0.036378175020217896f,0.3244888186454773f,-0.4755769968032837f,-0.13222959637641907f,-0.024399548768997192f,-0.39465832710266113f,0.3770657181739807f,-2.188513994216919f,-0.18945904076099396f,-1.564217448234558f,0.08839760720729828f,0.8966508507728577f}, +{0.5386860370635986f,0.5304108262062073f,-0.3519742488861084f,0.8151957988739014f,-0.3015052080154419f,0.10101134330034256f,-0.6611042618751526f,-0.06323602795600891f,-0.23047015070915222f,0.3579089343547821f,1.0146384239196777f,-1.816729187965393f,-0.39870911836624146f,1.8494337797164917f,1.6129482984542847f,-0.654404878616333f}, +{-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}, +{0.10344250500202179f,0.8851874470710754f,0.33083590865135193f,-0.9450300931930542f,-0.14358049631118774f,-0.8879885077476501f,-0.33660444617271423f,-0.3461519777774811f,0.2600560486316681f,-0.37898191809654236f,-2.4927995204925537f,0.6799273490905762f,-0.44419312477111816f,0.22575414180755615f,0.7631748914718628f,0.8120167851448059f}, +{-0.24644257128238678f,0.17985285818576813f,-0.11379697918891907f,1.467590570449829f,0.041274964809417725f,-1.0506867170333862f,-0.34555327892303467f,-0.042685262858867645f,0.06103590130805969f,-0.38046833872795105f,-1.560768485069275f,-0.37289687991142273f,-0.6082977652549744f,-0.3297945559024811f,-1.903340220451355f,0.07766012102365494f}, +{0.3750182092189789f,0.9095179438591003f,-0.13502129912376404f,-1.1646559238433838f,0.12987366318702698f,0.48973721265792847f,-0.14360187947750092f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.9756120443344116f,1.5680875778198242f,0.015860414132475853f,-1.8316001892089844f,0.03364758938550949f,-0.6048874258995056f}, +{0.001020657131448388f,-0.5778871774673462f,0.0457797646522522f,-1.3335444927215576f,-0.03321319818496704f,0.22450630366802216f,-0.2756686508655548f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-1.364320993423462f,-4.172216415405273f,-0.5792499780654907f,-0.1589745730161667f,-1.0930994749069214f,0.12804484367370605f}, +{0.6292679309844971f,0.45306727290153503f,0.3954955041408539f,0.12690812349319458f,0.0033026933670043945f,0.39511117339134216f,-0.47955650091171265f,-0.1643170565366745f,0.3487861454486847f,-0.32520344853401184f,1.591291069984436f,-0.9511956572532654f,-0.10463692247867584f,-0.5788776278495789f,0.9301892518997192f,0.7921565175056458f}, +{-1.9094338417053223f,1.0912913084030151f,-0.15798500180244446f,-0.20790745317935944f,-0.37393757700920105f,1.779664158821106f,-0.11615815758705139f,-0.3357280492782593f,-0.3764709532260895f,0.2424570620059967f,0.11706706136465073f,-0.4618774652481079f,0.0839148759841919f,0.1465109884738922f,0.07200270146131516f,0.1898588389158249f}, +{1.2760099172592163f,0.2635939121246338f,-0.2018718123435974f,-0.21050289273262024f,0.07545611262321472f,0.15267306566238403f,-0.41120466589927673f,-0.22413749992847443f,-0.24509364366531372f,0.19522181153297424f,-0.168448343873024f,-0.49023303389549255f,-0.43267005681991577f,-0.11180825531482697f,-2.4520909786224365f,-2.2206997871398926f}, {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.3342483937740326f,0.7637357711791992f,0.12081471085548401f,-1.4017548561096191f,0.29976895451545715f,0.572249710559845f,-0.21902163326740265f,0.19000603258609772f,-0.3893685042858124f,-0.02222958207130432f,0.04159463569521904f,0.13900333642959595f,-0.2710590064525604f,-1.1726809740066528f,-0.08039524406194687f,-0.6791633367538452f}, +{-0.3850473165512085f,0.60502028465271f,0.12081471085548401f,0.05673016980290413f,0.29976895451545715f,0.07498054951429367f,-0.19028231501579285f,0.2637995183467865f,-0.3893685042858124f,-0.02222958207130432f,1.285120964050293f,0.1741940826177597f,-0.5410208106040955f,0.5510839223861694f,0.7903842926025391f,0.19116832315921783f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.28966277837753296f,1.2351443767547607f,-1.1043834686279297f,0.39216870069503784f,0.17243613302707672f,0.2299596220254898f,0.21862678229808807f,-0.33722689747810364f,0.17085221409797668f,-0.20096071064472198f,0.3319207429885864f,1.111213207244873f,-0.02553936466574669f,0.7380833625793457f,0.6279491782188416f}, -{0.047732532024383545f,1.239972472190857f,-0.3333147466182709f,-0.8700975179672241f,0.5872277617454529f,0.04902389273047447f,-0.32568761706352234f,-0.17395144701004028f,-0.10114736109972f,-1.0741316080093384f,0.18357138335704803f,-0.4219442307949066f,0.33652955293655396f,0.2501889765262604f,-0.25120070576667786f,-1.571613073348999f}, + {-0.36079341173171997f,-2.0394980907440186f,0.027777254581451416f,-0.22982019186019897f,-0.01932685822248459f,0.07987586408853531f,0.16453437507152557f,0.1481759250164032f,-1.8260695934295654f,-0.12922662496566772f,-0.10849133133888245f,0.08728101849555969f,0.167767733335495f,0.313822865486145f,-0.535399854183197f,-0.027188511565327644f}, +{0.047732532024383545f,0.9618076086044312f,0.3481678366661072f,-0.8452519774436951f,-0.9864906072616577f,0.6582698225975037f,-0.35969480872154236f,-0.16095684468746185f,0.8305681943893433f,-0.3994109034538269f,0.29745107889175415f,-0.647723376750946f,-0.30517578125f,0.9108673930168152f,-0.5965732336044312f,-1.6962358951568604f}, {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.34068235754966736f,-2.2259345054626465f,-0.9216997027397156f,-0.8142727613449097f,-0.1867956668138504f,0.09955693781375885f,-0.11101119965314865f,-0.23464496433734894f,-0.41957905888557434f,0.13192829489707947f,0.059145133942365646f,-1.1542623043060303f,0.023795511573553085f,0.4761451482772827f,-0.6231865286827087f}, +{-0.30922991037368774f,-1.4941678047180176f,-1.079818844795227f,0.9250527620315552f,0.06139156222343445f,0.08592525869607925f,0.027424758300185204f,0.04547649249434471f,-1.5056060552597046f,-0.365601509809494f,-0.16192401945590973f,0.15959054231643677f,-1.0692600011825562f,0.4283374547958374f,-0.47111794352531433f,-0.4709107577800751f}, {-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.11103959381580353f,-0.6467089653015137f,-1.9154033660888672f,1.341623306274414f,-0.701852023601532f,-0.23281554877758026f,0.03704423829913139f,-0.42710521817207336f,-0.6047006845474243f,-0.1978701651096344f,-0.1618802547454834f,-1.351989984512329f,0.4888225197792053f,0.9614099860191345f,-2.249725580215454f}, -{0.4110594093799591f,0.10870896279811859f,-0.135735422372818f,0.5804780125617981f,0.27095577120780945f,-0.19853352010250092f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.3842025101184845f,-0.0403258353471756f,0.10744749754667282f,-0.33236318826675415f}, -{-0.40892091393470764f,0.07219429314136505f,-0.3890320658683777f,0.23248106241226196f,0.33654987812042236f,-0.052172280848026276f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.2777869403362274f,-0.33863815665245056f,0.10775503516197205f,-0.009796959348022938f}, +{-0.37449589371681213f,-0.4369526505470276f,-1.208013892173767f,0.7252630591392517f,0.5089448690414429f,0.3422243297100067f,-0.3449169099330902f,0.055282652378082275f,-0.3138900697231293f,-0.3560298979282379f,-0.20816515386104584f,-0.054754588752985f,-0.012407035566866398f,0.49851128458976746f,-0.5612673759460449f,-0.7927249073982239f}, +{0.4110594093799591f,0.1920347660779953f,-0.21054792404174805f,0.23240651190280914f,0.1802571415901184f,-0.16077619791030884f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.38961368799209595f,0.008103481493890285f,0.12098627537488937f,-0.28980788588523865f}, +{-0.40892091393470764f,0.07973587512969971f,-0.4225347340106964f,0.22082245349884033f,0.30674463510513306f,-0.015164071694016457f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.30998891592025757f,-0.33052098751068115f,0.11553362011909485f,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.12674163281917572f,-1.8066343069076538f,-2.6454362869262695f,-1.513123869895935f,-0.5654615163803101f,-0.1915251612663269f,-0.11633022129535675f,-0.42871835827827454f,-0.7320024967193604f,-0.10651703178882599f,-0.5063539147377014f,0.570899486541748f,-1.132482886314392f,0.08703529089689255f,-0.8601266741752625f}, -{-0.408692330121994f,-0.7229992151260376f,-0.039684589952230453f,0.11586404591798782f,0.25347626209259033f,-0.8820428252220154f,0.03285527229309082f,0.11867466568946838f,-0.9052098989486694f,-0.18457254767417908f,-0.13421255350112915f,-0.18340253829956055f,0.7221199870109558f,-4.207089900970459f,-1.194562554359436f,0.36525866389274597f}, -{-0.2991822361946106f,0.06960268318653107f,0.11643370240926743f,-0.05932474136352539f,0.195803701877594f,0.011859854683279991f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.09506481885910034f,-0.33226537704467773f,0.17675574123859406f,-0.16869547963142395f}, -{-0.2675279378890991f,0.6185293197631836f,-0.7997661232948303f,-0.002321854932233691f,0.5489782094955444f,-0.16728298366069794f,-0.32875844836235046f,-0.3670485019683838f,-0.5652082562446594f,-0.5957675576210022f,-0.6233183741569519f,-0.6195744276046753f,0.06166502833366394f,-0.8253225684165955f,0.8085088729858398f,1.0078809261322021f}, -{-0.015470266342163086f,-1.1152323484420776f,1.289136290550232f,1.5548841953277588f,1.030885100364685f,-0.2064899057149887f,0.05196094512939453f,-0.18992282450199127f,-0.3871394097805023f,-0.08023347705602646f,0.13179203867912292f,-0.17966221272945404f,-1.868313193321228f,-0.05276065692305565f,-0.22239743173122406f,0.4160137176513672f}, -{0.1863725483417511f,0.3686935305595398f,1.027355432510376f,1.7994378805160522f,-0.21010075509548187f,0.028893157839775085f,0.04860696196556091f,-0.0032099848613142967f,-0.21743838489055634f,-0.4624715745449066f,-0.5036341547966003f,0.022997958585619926f,0.8077424168586731f,0.8828359246253967f,0.12701526284217834f,-2.024989128112793f}, +{0.15459725260734558f,1.2427574396133423f,0.193179652094841f,-0.7398805618286133f,-0.4817911982536316f,-0.0939035415649414f,-0.055489517748355865f,-0.13401247560977936f,1.5515689849853516f,-0.47839227318763733f,-0.03722834214568138f,-0.6830673217773438f,0.958594024181366f,-0.6970508098602295f,0.15626497566699982f,1.2517952919006348f}, +{-0.408692330121994f,-0.6441293358802795f,0.3579084873199463f,0.5667678117752075f,1.1648471355438232f,1.0393614768981934f,0.03285527229309082f,0.38763079047203064f,-0.6279672384262085f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,0.23974189162254333f,0.6196199059486389f,0.9762318730354309f,-0.3892173171043396f}, +{-0.2991822361946106f,-0.009154408238828182f,0.13385441899299622f,-0.05932474136352539f,0.32624977827072144f,-0.14997488260269165f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.37819206714630127f,-0.2522141933441162f,0.1280381679534912f,0.020418301224708557f}, +{-0.2675279378890991f,0.22752805054187775f,0.9918881058692932f,-0.3263375759124756f,-0.49688720703125f,-0.6219033002853394f,-0.5266007781028748f,-0.5405108332633972f,1.1606967449188232f,-0.6998274326324463f,-0.6930839419364929f,-0.783081591129303f,0.5205210447311401f,-0.2892443835735321f,-0.4750079810619354f,1.0206432342529297f}, +{-0.015470266342163086f,-1.648854374885559f,-0.2384277582168579f,-2.0957741737365723f,-1.6361477375030518f,0.43126505613327026f,0.05196094512939453f,-0.18505549430847168f,-2.268740653991699f,-0.5114141702651978f,-0.03054753504693508f,-0.11511552333831787f,-0.7582811713218689f,0.5420505404472351f,-0.5685442090034485f,-0.9316728711128235f}, +{0.1863725483417511f,0.7245519161224365f,0.3409687578678131f,-0.9061988592147827f,1.1212410926818848f,-0.5218710899353027f,0.04860696196556091f,0.12026743590831757f,-1.0126233100891113f,0.03679993748664856f,-0.3252358138561249f,0.10295852273702621f,0.978594183921814f,-0.625475287437439f,1.5447208881378174f,-0.03620874881744385f}, }; -const float hout[16] = { 0.45773375034332275f,0.18331462144851685f,-0.21714521944522858f,-0.2464197874069214f,-0.218314990401268f,-0.11458878219127655f,-0.15254844725131989f,0.09362415969371796f,-0.07397104799747467f,0.16479983925819397f,0.02780149318277836f,-0.03927014395594597f,-0.12863878905773163f,0.12879210710525513f,0.13688769936561584f,-0.1818998157978058f }; - -const float b1[16] = { 0.4524996280670166f,0.21070164442062378f,-1.7145336866378784f,0.038984112441539764f,0.8108083605766296f,0.6599445939064026f,-0.1643390953540802f,1.3600108623504639f,0.13093411922454834f,-0.9038287997245789f,1.5731068849563599f,0.5593810081481934f,0.0018558003939688206f,-3.738471031188965f,-1.087764859199524f,1.568811297416687f }; - -const float b2[16] = { 0.303576797246933f,-1.1598354578018188f,-1.4564176797866821f,0.18654601275920868f,-0.6939148902893066f,0.042610399425029755f,0.10687939822673798f,-0.4624027609825134f,-1.20063054561615f,-1.912178635597229f,0.03409488871693611f,0.8649703860282898f,-0.26801833510398865f,1.4368915557861328f,0.828235924243927f,0.4541163444519043f }; - -const float b3[16] = { -1.963319182395935f,0.27306583523750305f,-0.9910871386528015f,-1.3165843486785889f,-0.2348240613937378f,0.41704362630844116f,-0.5419198274612427f,-1.0684020519256592f,-0.06659629195928574f,1.1529104709625244f,-0.3814184367656708f,-0.3054531216621399f,0.09647438675165176f,0.0942201167345047f,-0.4343146085739136f,-0.8535979986190796f }; - -const float bout[1] = { -0.11359032988548279f }; +const float hout[16] = { 0.45773375034332275f,0.17375539243221283f,-0.23764771223068237f,-0.09143640846014023f,-0.16163280606269836f,0.23837842047214508f,-0.05339581519365311f,-0.03423803672194481f,-0.15247350931167603f,0.0028862894978374243f,-0.025371452793478966f,0.005703639704734087f,-0.16284745931625366f,-0.11569779366254807f,0.14603784680366516f,-0.16416245698928833f }; + +const float b1[16] = { 0.6616275310516357f,-0.13481281697750092f,-1.7145336866378784f,0.07440292090177536f,0.8951196074485779f,1.0816856622695923f,-0.058932315558195114f,1.3293917179107666f,0.020480668172240257f,-0.5892835259437561f,0.21089354157447815f,1.3534598350524902f,-1.2202963829040527f,-1.9916216135025024f,-1.087764859199524f,0.9760429859161377f }; + +const float b2[16] = { -0.09380006790161133f,-1.064509630203247f,-1.4564176797866821f,0.2678755223751068f,-0.6939148902893066f,-0.12803801894187927f,0.10122966021299362f,-0.35512855648994446f,-1.20063054561615f,-1.912178635597229f,0.1515641063451767f,0.8412038087844849f,-0.415097177028656f,1.7469533681869507f,0.5643869042396545f,1.505944848060608f }; + +const float b3[16] = { -1.963319182395935f,-0.021264158189296722f,-1.0536612272262573f,0.7838545441627502f,-0.9922052621841431f,1.3160772323608398f,-0.6213743686676025f,-0.8503386974334717f,-1.0721707344055176f,0.18971462547779083f,-0.4227040708065033f,-0.3531782329082489f,-1.2684650421142578f,-0.21604318916797638f,-0.9929291605949402f,-0.17358574271202087f }; + +const float bout[1] = { -0.18828609585762024f }; /////////////////////////////////////////////////////////////////////////////////////////////RL float input_RL[num_input_RL] = { 0.0f }; @@ -1037,8 +1037,8 @@ input_NN[ind] = torq.sen / 10000.0f * 8.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 * 8.0f + 0.5f; - input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f*8.0f+0.5f; + input_NN[ind] = (f_future[time_interval*i+time_interval] - torq.sen)/10000.0f * 8.0f + 0.5f; +// input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f*8.0f+0.5f; ind = ind + 1; }