![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
for learning
Diff: main.cpp
- Revision:
- 193:4b5e617b8481
- Parent:
- 192:637092202815
- Child:
- 194:b31951919b55
--- a/main.cpp Fri Dec 18 05:44:16 2020 +0000 +++ b/main.cpp Fri Dec 18 13:29:04 2020 +0000 @@ -1,4 +1,4 @@ -//201218_2 +//201218_3 #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.6065647602081299f,1.4442633390426636f,0.12903714179992676f,0.45971256494522095f,-1.8865612745285034f,1.5917413234710693f,-0.17472904920578003f,1.3308944702148438f,-2.2597649097442627f,-0.03385619446635246f,-0.23437689244747162f,-1.2534494400024414f,-0.26408806443214417f,-1.170938491821289f,-0.2571594715118408f,-1.0241847038269043f}, -{-1.0844218730926514f,0.8761997222900391f,-0.3927857577800751f,0.10885071754455566f,-1.2577664852142334f,0.7939999103546143f,-0.4054011106491089f,0.5431910753250122f,-1.5450149774551392f,0.22130662202835083f,-0.27116647362709045f,-0.7526845335960388f,0.23553097248077393f,-1.0955637693405151f,-0.20967772603034973f,-0.6584876179695129f}, -{-0.8407496213912964f,0.5658552646636963f,0.36391180753707886f,-0.2829425036907196f,-0.6343178153038025f,0.6252744793891907f,0.2872133255004883f,0.39229825139045715f,-1.4613970518112183f,0.22947895526885986f,-0.34503698348999023f,-0.4441416561603546f,-0.00272137182764709f,-0.3266361355781555f,0.05590221285820007f,-1.1430491209030151f}, -{-0.35328859090805054f,-0.09043431282043457f,0.39742106199264526f,0.33738622069358826f,-0.10881924629211426f,-0.196650430560112f,-0.11584559082984924f,0.22384493052959442f,-1.0161447525024414f,0.367963969707489f,0.09880797564983368f,0.34261059761047363f,-0.16485224664211273f,-0.029696160927414894f,-0.2961459457874298f,-0.9798188209533691f}, -{1.1166077852249146f,-0.8807020783424377f,-0.0051451027393341064f,0.24785789847373962f,0.9506633281707764f,-0.8863392472267151f,0.1294034719467163f,-1.1181002855300903f,-0.1819683164358139f,0.18784251809120178f,0.35077041387557983f,0.5736857056617737f,-0.06842327117919922f,1.0477333068847656f,-0.3865056037902832f,-0.9327677488327026f}, -{3.284773111343384f,-3.371878147125244f,0.21773302555084229f,0.23583510518074036f,3.1542773246765137f,-3.0821757316589355f,0.16514194011688232f,-3.329540491104126f,1.6303980350494385f,0.20284788310527802f,-0.24478337168693542f,1.4629696607589722f,-0.26506540179252625f,3.08347487449646f,-0.4132833778858185f,0.32265838980674744f}, -{-0.16142688691616058f,0.6516218781471252f,-0.2501986622810364f,-0.7905404567718506f,-0.6181723475456238f,0.8566709160804749f,0.06014183163642883f,-0.4896201193332672f,1.5439631938934326f,-0.1533675193786621f,0.15192021429538727f,-0.10490059852600098f,-0.1730978935956955f,0.016282489523291588f,-0.15618428587913513f,0.5365569591522217f}, -{-0.8748350739479065f,0.699435293674469f,-0.26619744300842285f,-0.08359992504119873f,-1.2200344800949097f,0.7180229425430298f,-0.17925891280174255f,0.24654683470726013f,0.32283562421798706f,0.030707592144608498f,0.10629666596651077f,-0.48497965931892395f,0.37155985832214355f,-0.5724917650222778f,0.04303058981895447f,0.5190708637237549f}, -{0.44692766666412354f,0.06991451233625412f,0.10248100757598877f,-0.6408140659332275f,0.08631881326436996f,-0.2442355901002884f,-0.07246989011764526f,-0.8822688460350037f,0.9748199582099915f,0.2915976345539093f,-0.2963060140609741f,0.3272884786128998f,0.22921693325042725f,0.7057540416717529f,-0.30555272102355957f,1.1995744705200195f}, -{0.10254709422588348f,-0.41143253445625305f,0.18462657928466797f,-0.4237739145755768f,0.2854340970516205f,-0.03984415903687477f,-0.2990540862083435f,-0.3689456582069397f,1.033217430114746f,-0.506875216960907f,-0.007301787845790386f,-0.4488030672073364f,0.372331827878952f,0.18685422837734222f,0.3484981060028076f,0.7737299799919128f}, -{0.4530602991580963f,0.06132202595472336f,0.37182438373565674f,-0.03273813799023628f,0.0010348001960664988f,-0.13872838020324707f,-0.20339298248291016f,0.0005765249952673912f,0.3678560256958008f,0.007492598611861467f,0.3493041396141052f,-0.34462884068489075f,-0.06654797494411469f,0.24928389489650726f,0.26688337326049805f,0.2785782217979431f}, -{-0.4162179231643677f,-0.3465555012226105f,-0.40320003032684326f,-0.26510435342788696f,0.01366904191672802f,-0.13112711906433105f,0.1533789038658142f,0.6211925745010376f,0.4397057294845581f,0.1924997866153717f,-0.41328826546669006f,-0.0027057332918047905f,0.14470605552196503f,0.1354319006204605f,0.10493969917297363f,0.35834529995918274f}, -{-0.09877526015043259f,-0.15477481484413147f,0.19847965240478516f,-0.08667934685945511f,0.21006469428539276f,0.05856190621852875f,-0.2404318004846573f,0.5306714177131653f,0.29814204573631287f,-0.20526979863643646f,-0.10813693702220917f,-0.45609328150749207f,0.09201034903526306f,0.1650717556476593f,-0.22268100082874298f,-0.07950642704963684f}, -{-0.18069559335708618f,-0.07498950511217117f,0.4127817749977112f,-0.29987478256225586f,-0.34160202741622925f,-0.36815145611763f,-0.32001304626464844f,0.18809133768081665f,0.2339780628681183f,-0.23265855014324188f,-0.19404397904872894f,-0.44801175594329834f,-0.31276315450668335f,0.09648053348064423f,0.0479682981967926f,0.23451268672943115f}, -{0.09760818630456924f,0.05593819171190262f,0.20282304286956787f,-0.1285126656293869f,0.21780484914779663f,-0.24251754581928253f,0.04202890396118164f,0.8997607827186584f,0.4931466281414032f,0.07827243953943253f,-0.2784428298473358f,-0.7169914841651917f,0.10353262722492218f,0.04148343950510025f,0.0668090283870697f,0.10605200380086899f}, -{-0.17180080711841583f,-0.24694566428661346f,-0.40439701080322266f,-0.278349369764328f,-0.3476768434047699f,-0.05055616796016693f,-0.15568238496780396f,0.7173581123352051f,0.24213942885398865f,-0.006808132864534855f,-0.47287464141845703f,-0.4041852056980133f,-0.2711547017097473f,0.034751903265714645f,-0.08245879411697388f,-0.017323751002550125f}, -{0.10924900323152542f,-0.37913835048675537f,0.16706281900405884f,-0.1058274433016777f,0.09666857868432999f,-0.6143539547920227f,-0.041414469480514526f,0.46004220843315125f,0.15673750638961792f,0.09002777934074402f,-0.35252657532691956f,0.13107328116893768f,0.11200001835823059f,0.6850409507751465f,0.29427415132522583f,-0.10907641053199768f}, + {-2.0806894302368164f,1.8419220447540283f,0.12903714179992676f,0.3766104280948639f,-2.5691683292388916f,1.3948698043823242f,-1.6932644844055176f,0.47781115770339966f,-0.774815022945404f,-0.14850656688213348f,-0.03650430217385292f,-2.368614435195923f,-2.1139299869537354f,-1.45517098903656f,-0.2571594715118408f,-0.06029130890965462f}, +{-1.499216914176941f,1.2110093832015991f,-0.3927857577800751f,0.0755331888794899f,-1.912123441696167f,0.634615957736969f,-1.588600993156433f,0.1134842112660408f,-0.4692782759666443f,0.13740988075733185f,-0.028703559190034866f,-1.5429214239120483f,-0.7857987880706787f,-1.4273113012313843f,-0.20967772603034973f,0.22353018820285797f}, +{-0.9740145802497864f,0.6290917992591858f,0.36391180753707886f,-0.2652323544025421f,-1.0473108291625977f,0.27822592854499817f,-0.6762312054634094f,0.24158823490142822f,-0.48006561398506165f,0.17687489092350006f,0.1041826531291008f,-0.9442924857139587f,-0.3642197847366333f,-0.5978294014930725f,0.05590221285820007f,-0.008679859340190887f}, +{-0.1346927434206009f,-0.36659669876098633f,0.39742106199264526f,0.4090283513069153f,-0.21661870181560516f,-0.7815824747085571f,-0.6867067217826843f,0.45081475377082825f,-0.22874140739440918f,0.3471550941467285f,0.611111044883728f,0.28319814801216125f,0.14088939130306244f,-0.1510155200958252f,-0.2961459457874298f,0.3566420078277588f}, +{1.43129301071167f,-1.254888892173767f,-0.0051451027393341064f,0.3767557144165039f,0.8894379734992981f,-1.431206464767456f,0.2549896836280823f,-0.16752402484416962f,-0.12987858057022095f,0.19921472668647766f,0.48584452271461487f,1.1332663297653198f,0.9898359179496765f,0.9567762017250061f,-0.3865056037902832f,0.11671999096870422f}, +{3.0383973121643066f,-3.2238690853118896f,0.21773302555084229f,0.4259805679321289f,2.487938642501831f,-2.927023410797119f,1.3221275806427002f,-0.9985578656196594f,0.015695471316576004f,0.24681439995765686f,-1.112740397453308f,2.7345285415649414f,1.7078537940979004f,2.5884315967559814f,-0.4132833778858185f,0.1871054768562317f}, +{-0.08909858763217926f,0.04017534852027893f,-0.2501986622810364f,-1.4312419891357422f,0.10488540679216385f,-0.006775588262826204f,0.036645688116550446f,-0.03338433802127838f,-0.4603580832481384f,-0.04075203463435173f,6.466564655303955f,0.14596475660800934f,-3.76338529586792f,0.8909745216369629f,-0.15618428587913513f,-0.5056508779525757f}, +{-0.0644197091460228f,-0.0824904516339302f,-0.26619744300842285f,-0.9450392127037048f,0.21956279873847961f,0.5414075255393982f,0.06343743950128555f,0.26915308833122253f,-0.18562251329421997f,0.05249443277716637f,2.5711328983306885f,-0.20299145579338074f,0.32254835963249207f,-0.6894297003746033f,0.04303058981895447f,-2.268955945968628f}, +{0.010134553536772728f,0.07090140879154205f,0.10248100757598877f,-1.4144065380096436f,0.14498041570186615f,0.6121429800987244f,1.7088721990585327f,-6.707942485809326f,-0.6278461217880249f,0.4125310778617859f,-1.9015189409255981f,-0.17366135120391846f,2.945331573486328f,1.5498052835464478f,-0.30555272102355957f,-2.353926420211792f}, +{-0.19771908223628998f,-0.37083661556243896f,0.18462657928466797f,-1.2041350603103638f,0.46593061089515686f,0.6668076515197754f,1.1944712400436401f,-3.0236237049102783f,-0.08968208730220795f,-0.4030909240245819f,-0.7150384187698364f,-0.663982093334198f,1.4682765007019043f,0.37283697724342346f,0.3484981060028076f,-1.2506699562072754f}, +{0.22058553993701935f,0.1321832835674286f,0.37182438373565674f,-0.7691853046417236f,0.06517745554447174f,0.28921499848365784f,0.5419366955757141f,-2.370201587677002f,-0.4239056408405304f,0.043917566537857056f,-0.2696247398853302f,-0.37864330410957336f,0.1648407280445099f,0.5010892748832703f,0.26688337326049805f,-0.7171939015388489f}, +{-0.31798315048217773f,-0.23621180653572083f,-0.40320003032684326f,-0.8372410535812378f,0.21226218342781067f,0.13394197821617126f,0.0203731507062912f,0.9504984617233276f,-0.27080845832824707f,0.14300179481506348f,-0.6072286367416382f,0.24522404372692108f,-0.6103735566139221f,0.15849997103214264f,0.10493969917297363f,0.48328933119773865f}, +{-0.019870232790708542f,-0.04535185545682907f,0.19847965240478516f,-0.645010232925415f,0.15441982448101044f,0.19513094425201416f,-0.15949001908302307f,1.0981990098953247f,-0.358957976102829f,-0.2793225646018982f,-0.32054436206817627f,-0.08625413477420807f,-0.525904655456543f,0.22998401522636414f,-0.22268100082874298f,0.5257316827774048f}, +{-0.011861208826303482f,-0.03636765852570534f,0.4127817749977112f,-0.8922302722930908f,-0.20182070136070251f,-0.12261747568845749f,-0.2627313435077667f,0.48942577838897705f,-0.2826015055179596f,-0.31948286294937134f,-0.30100518465042114f,0.10201402753591537f,-0.18361657857894897f,0.19040097296237946f,0.0479682981967926f,1.3197470903396606f}, +{0.12351126223802567f,0.0939125269651413f,0.20282304286956787f,-0.734791100025177f,0.0898694396018982f,-0.13186074793338776f,0.02113427221775055f,0.47443610429763794f,0.09890269488096237f,-0.0655839666724205f,-0.04224861413240433f,-0.30557194352149963f,0.7833285927772522f,0.17788979411125183f,0.0668090283870697f,1.285325527191162f}, +{-0.03807421028614044f,-0.1136704608798027f,-0.40439701080322266f,-1.0595369338989258f,-0.13023366034030914f,0.10300719738006592f,-0.14926490187644958f,1.3389246463775635f,0.05884883925318718f,-0.18226976692676544f,0.31049856543540955f,-0.010614922270178795f,-0.21370303630828857f,-0.021214483305811882f,-0.08245879411697388f,2.3053054809570312f}, +{-0.16781732439994812f,0.013002467341721058f,0.16706281900405884f,-1.1158241033554077f,-0.045615483075380325f,-0.4337211847305298f,-0.27456235885620117f,1.5922147035598755f,-0.2640377879142761f,-0.04499654844403267f,-1.8151977062225342f,0.38335272669792175f,-2.189336061477661f,0.884656548500061f,0.29427415132522583f,4.138731479644775f}, }; const float h2[16][16] = { - {-0.2100285440683365f,0.5450449585914612f,-0.06966331601142883f,-0.16327691078186035f,-0.21907491981983185f,-0.7174352407455444f,-0.08997400104999542f,0.03496444225311279f,-0.43008196353912354f,-0.1415480375289917f,-1.024130940437317f,-0.43296945095062256f,0.12968102097511292f,-1.542701005935669f,-0.4490607678890228f,-4.010191440582275f}, -{0.09335885941982269f,-2.328054904937744f,0.057057321071624756f,-0.4136889576911926f,-0.35503754019737244f,-1.8548954725265503f,-0.5476264953613281f,-0.3163917064666748f,-0.33757925033569336f,0.2895788848400116f,-3.989751100540161f,-0.2958875000476837f,0.33698758482933044f,2.3751473426818848f,-0.10209953784942627f,-1.2367063760757446f}, + {-0.373119056224823f,3.5553245544433594f,-0.18637831509113312f,3.7563912868499756f,-0.3262759745121002f,-2.3471240997314453f,-0.08586140722036362f,-0.0851021334528923f,-0.43008196353912354f,-0.20591317117214203f,-3.0219662189483643f,-2.8412041664123535f,-1.2025442123413086f,-1.6519156694412231f,-1.1901919841766357f,-1.2586970329284668f}, +{-0.21345800161361694f,-2.3205506801605225f,-0.09147269278764725f,-2.9883475303649902f,-0.38782384991645813f,-0.1081438660621643f,-1.32341730594635f,-0.39894118905067444f,-0.33757925033569336f,0.22082164883613586f,-12.76615047454834f,-10.454728126525879f,-0.8961352109909058f,3.2336769104003906f,1.445095181465149f,-1.3371248245239258f}, {-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.05469902977347374f,-0.25110578536987305f,-0.2894435524940491f,0.5345750451087952f,0.08946844935417175f,0.4574865400791168f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.3205234110355377f,0.3810727894306183f,-0.404754102230072f,-0.2590928077697754f,0.2257760912179947f,0.16342028975486755f}, -{-0.25391754508018494f,0.49998918175697327f,-0.25313520431518555f,0.0678805261850357f,0.036378175020217896f,-0.5025586485862732f,-0.58262699842453f,-0.12088710814714432f,-0.024399548768997192f,-0.39465832710266113f,-1.5418189764022827f,-0.7374540567398071f,0.10077962279319763f,-0.4282504618167877f,-0.49100643396377563f,-0.64886075258255f}, -{0.34239134192466736f,-1.3530895709991455f,-0.3519742488861084f,0.014243300072848797f,-0.3015052080154419f,-1.4964323043823242f,-0.6469179391860962f,-0.04728340730071068f,-0.23047015070915222f,0.3579089343547821f,-2.080329179763794f,-0.22948884963989258f,-0.20959392189979553f,1.118597149848938f,0.13593792915344238f,-2.15841007232666f}, -{-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.1319282501935959f,-1.5630793571472168f,0.33083590865135193f,-0.6722083687782288f,-0.14358049631118774f,-1.5424034595489502f,-0.5113024115562439f,-0.32745271921157837f,0.2600560486316681f,-0.37898191809654236f,-2.461042642593384f,-0.40288063883781433f,-0.31673234701156616f,1.471474289894104f,0.17047874629497528f,-0.9254405498504639f}, -{-0.2827617824077606f,-0.5835872888565063f,-0.11379697918891907f,-0.2174888700246811f,0.041274964809417725f,-1.1300400495529175f,-0.5878999829292297f,-0.08471067994832993f,0.06103590130805969f,-0.38046833872795105f,-2.1991589069366455f,-0.5746544599533081f,-0.37024784088134766f,-1.5039541721343994f,-0.564139187335968f,-0.7886471748352051f}, -{-0.16934998333454132f,0.5294079184532166f,-0.13502129912376404f,0.6688047051429749f,0.12987366318702698f,0.48973479866981506f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.5563372373580933f,0.3686026632785797f,0.3811538517475128f,-0.608641505241394f,-0.3150292634963989f,-0.07790349423885345f}, -{-0.290787935256958f,0.008599113672971725f,0.0457797646522522f,-0.3533823788166046f,-0.03321319818496704f,-0.4156119227409363f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.2018822431564331f,0.3545852601528168f,-0.3647043704986572f,0.40289223194122314f,-0.40987616777420044f,-0.2687363028526306f}, -{0.31293871998786926f,0.514428973197937f,0.3954955041408539f,0.03152908384799957f,0.0033026933670043945f,0.11348362267017365f,-0.25357672572135925f,-0.1509854942560196f,0.3487861454486847f,-0.32520344853401184f,0.08041279017925262f,-0.32230615615844727f,0.0820283591747284f,-0.3886100947856903f,0.11279337108135223f,-0.043686479330062866f}, -{-0.26997238397598267f,-0.21165083348751068f,-0.15798500180244446f,0.37889501452445984f,-0.37393757700920105f,0.3643323481082916f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.11038123071193695f,-0.2837170362472534f,0.41839322447776794f,-0.016996487975120544f,-0.12759913504123688f,0.10896846652030945f}, -{-0.2488415539264679f,0.5050635933876038f,-0.2018718123435974f,0.4112447202205658f,0.07545611262321472f,0.41179272532463074f,-0.39304429292678833f,-0.21989363431930542f,-0.24509364366531372f,0.19522181153297424f,0.8638243079185486f,-0.5810434818267822f,-0.16718891263008118f,-0.8570219874382019f,-0.6993795037269592f,0.26117852330207825f}, +{0.39014673233032227f,-0.39607951045036316f,-0.2894435524940491f,0.41481518745422363f,0.08946844935417175f,-0.22121116518974304f,-0.40275976061820984f,0.2650929391384125f,0.26211628317832947f,0.2953031361103058f,0.8374318480491638f,0.1486164778470993f,0.3700002133846283f,0.7084981799125671f,-0.2438845932483673f,0.17641611397266388f}, +{-0.6145792603492737f,1.4241276979446411f,-0.38599735498428345f,1.0056519508361816f,-0.130391925573349f,-0.5785019993782043f,-0.8334283828735352f,-0.2552958130836487f,-0.024399548768997192f,-0.4501388370990753f,-10.357773780822754f,-5.493231773376465f,-2.6973838806152344f,-1.543803095817566f,-0.31024715304374695f,-2.4421327114105225f}, +{-0.4475497901439667f,-0.48771294951438904f,-0.4826374053955078f,-0.7084127068519592f,-0.3307701051235199f,-0.23040759563446045f,-0.5431229472160339f,-0.053084585815668106f,-0.23047015070915222f,0.3046051263809204f,-2.272104501724243f,-6.695068359375f,-0.1596900373697281f,-0.07568152248859406f,-0.6455795168876648f,-1.9376535415649414f}, +{-0.3334483802318573f,-0.4921075701713562f,-0.3260969817638397f,0.47393539547920227f,-0.4052906930446625f,0.9536952376365662f,-0.18061208724975586f,0.12387624382972717f,-0.0982072651386261f,0.07934291660785675f,-2.9281649589538574f,-6.097873687744141f,0.5353059768676758f,0.21125705540180206f,0.1671367734670639f,-0.6433596014976501f}, +{0.002462406875565648f,-0.13203328847885132f,0.1748848259449005f,0.062082864344120026f,-0.24962033331394196f,0.3382720649242401f,0.22629152238368988f,-0.4360564351081848f,0.2600560486316681f,-0.37898191809654236f,-1.594963788986206f,-1.8958890438079834f,-1.448304533958435f,0.798218309879303f,0.4798305332660675f,-0.17965641617774963f}, +{-0.7740408182144165f,-0.00020000309450551867f,-0.2609816789627075f,-0.3370492160320282f,-0.07906099408864975f,-0.018349304795265198f,-0.3007965683937073f,-0.17639212310314178f,0.06103590130805969f,-0.38046833872795105f,-0.23538073897361755f,0.0592195987701416f,-0.40873199701309204f,-0.3732284605503082f,0.07351911813020706f,-0.7348899245262146f}, +{-0.1242457702755928f,0.10498577356338501f,-0.13502129912376404f,-0.060150690376758575f,0.12987366318702698f,0.3816811740398407f,0.2711336314678192f,-0.37463870644569397f,-0.13619378209114075f,0.16938945651054382f,0.43584179878234863f,0.3007356822490692f,0.1462758630514145f,-0.520169198513031f,-0.17727826535701752f,0.1449422985315323f}, +{-1.2907301187515259f,-0.015403985045850277f,-0.11076373606920242f,0.21192514896392822f,-0.03321319818496704f,-1.347303032875061f,0.11128412932157516f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-18.543546676635742f,-0.28718826174736023f,-0.36511552333831787f,0.2045985460281372f,1.0332635641098022f,-0.9086235761642456f}, +{0.08386392891407013f,2.098982334136963f,0.2407342940568924f,1.1502493619918823f,-0.10786735266447067f,-0.9310345649719238f,-1.3677669763565063f,-0.19258876144886017f,0.3487861454486847f,-0.3656117618083954f,-2.6828837394714355f,-2.9330313205718994f,-0.13798509538173676f,-0.05980028212070465f,0.9416042566299438f,-0.7318357825279236f}, +{-0.028731070458889008f,-0.026831166818737984f,-0.15798500180244446f,-0.0034756625536829233f,-0.5573786497116089f,0.357199102640152f,-0.5187659859657288f,-0.46072864532470703f,-0.3764709532260895f,0.19903655350208282f,-1.1018555164337158f,0.6878526210784912f,0.03562719747424126f,-0.45660585165023804f,-0.06941013038158417f,-0.18342538177967072f}, +{0.08938371390104294f,0.019140882417559624f,-0.25673651695251465f,-0.04428382217884064f,-0.3924296796321869f,1.991448163986206f,-0.9358435273170471f,-0.23740285634994507f,-0.24509364366531372f,0.1368061751127243f,0.5035690069198608f,1.8021210432052612f,-0.11762721836566925f,-2.0946662425994873f,-0.9601436853408813f,-0.21151992678642273f}, {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.4079033434391022f,0.0030517925042659044f,0.12081471085548401f,-0.5565865635871887f,0.29976895451545715f,-1.0711815357208252f,-0.3759289085865021f,0.23442097008228302f,-0.3893685042858124f,-0.02222958207130432f,-3.00561785697937f,-0.32067564129829407f,-0.19991017878055573f,-0.5704829692840576f,0.07654765248298645f,-2.1375231742858887f}, +{-0.424070805311203f,0.010647752322256565f,0.015124130062758923f,0.033794887363910675f,0.11311512440443039f,-0.28193730115890503f,0.2703526020050049f,0.13120506703853607f,-0.3893685042858124f,-0.02222958207130432f,-1.432602882385254f,-0.9122090935707092f,-1.3930901288986206f,-0.15213778614997864f,-0.04224979132413864f,-1.4842122793197632f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.08991171419620514f,-0.07854580879211426f,-0.3761775493621826f,-0.19077321887016296f,0.04002965986728668f,0.3332441747188568f,0.3036012351512909f,-0.2405819296836853f,0.04891335964202881f,-0.11870327591896057f,0.4001283347606659f,0.023342788219451904f,0.3089201748371124f,-0.3160521388053894f,0.14951297640800476f}, -{0.047732532024383545f,-0.09652574360370636f,0.8443890810012817f,-0.2737945318222046f,-0.6023720502853394f,0.0635899230837822f,-0.3198729455471039f,0.06247803568840027f,-0.14267313480377197f,-0.025146597996354103f,0.22248788177967072f,-0.3128277659416199f,-0.1967906951904297f,2.094522714614868f,-0.3103681206703186f,-0.29817160964012146f}, -{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.09327439963817596f,0.05971873924136162f,-0.3845849633216858f,-0.5093491673469543f,0.33769017457962036f,0.20021501183509827f,0.07002416253089905f,-0.33915144205093384f,-0.365601509809494f,-0.03443625569343567f,0.41021624207496643f,-0.2978057265281677f,0.35003378987312317f,0.26804131269454956f,-0.023121735081076622f}, -{-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,1.8457472324371338f,-1.8165240287780762f,0.09289615601301193f,-1.1789792776107788f,1.3625030517578125f,-0.18732719123363495f,0.22384825348854065f,-0.5127489566802979f,-1.1904394626617432f,-0.154531329870224f,0.19005391001701355f,-0.5971469283103943f,-0.36133918166160583f,0.4544094502925873f,-0.4715000092983246f}, -{0.4110594093799591f,0.2230953872203827f,-0.48654863238334656f,0.37246426939964294f,-0.24602459371089935f,0.1548190414905548f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,0.22344467043876648f,-0.1344406008720398f,0.35313835740089417f,0.21155259013175964f,0.10930821299552917f,0.3126353323459625f,-0.3391006588935852f}, -{-0.40892091393470764f,0.04582450911402702f,-0.3875610828399658f,0.25968697667121887f,0.3424709737300873f,-0.05059037357568741f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.15431912243366241f,-0.14134526252746582f,-0.0003446042537689209f,-0.2742875814437866f,-0.3649594783782959f,0.07994696497917175f,0.005298197269439697f}, + {-0.36079341173171997f,0.4573541581630707f,-0.325107216835022f,-0.4272470772266388f,-0.39737746119499207f,0.2834421396255493f,0.3332441747188568f,0.3036012351512909f,-0.2895206809043884f,0.08099097013473511f,-0.11870327591896057f,0.4001283347606659f,0.03681709244847298f,0.5518370866775513f,0.06409662961959839f,0.1620478332042694f}, +{0.047732532024383545f,-0.300658255815506f,-1.3235893249511719f,-1.084731101989746f,-0.22308531403541565f,0.6925809979438782f,-0.3241617977619171f,-0.34273138642311096f,2.446197986602783f,-0.36785638332366943f,0.2839009761810303f,-0.43809396028518677f,2.1469027996063232f,0.9680188894271851f,0.5854582190513611f,0.2277306318283081f}, +{0.07903262972831726f,0.2790505588054657f,-0.0448407344520092f,0.04248586297035217f,-0.17811879515647888f,-0.19260792434215546f,-0.4038352966308594f,0.015906542539596558f,0.15353140234947205f,0.030178606510162354f,0.2488909661769867f,0.13805970549583435f,-0.07610863447189331f,-0.20733052492141724f,-0.3036302626132965f,0.054825395345687866f}, +{-0.30922991037368774f,-1.4248790740966797f,-2.2566752433776855f,-1.8004227876663208f,0.7235559821128845f,0.6167980432510376f,0.17782625555992126f,-0.7147418260574341f,2.1931867599487305f,0.4008365869522095f,-0.2853640913963318f,0.11604917794466019f,3.048943281173706f,3.169879913330078f,0.3572247326374054f,-1.7431739568710327f}, +{-0.39607733488082886f,0.10962998867034912f,0.023933079093694687f,-0.042653702199459076f,0.10805846750736237f,-0.2995353639125824f,0.16012099385261536f,0.3626593053340912f,-0.32160404324531555f,-0.023096678778529167f,-0.10529157519340515f,-0.31317979097366333f,0.04330437257885933f,-0.16106648743152618f,0.1951502114534378f,0.31701672077178955f}, +{-0.37449589371681213f,-0.9570617079734802f,-0.18645547330379486f,-0.7889876365661621f,0.17885488271713257f,0.2740497887134552f,-0.18732719123363495f,-0.05049999803304672f,-1.7403619289398193f,0.4164712131023407f,-0.21354427933692932f,-0.1020674780011177f,0.4254971146583557f,-0.030363813042640686f,1.014643907546997f,-0.10146742314100266f}, +{0.4110594093799591f,0.08816589415073395f,-0.020595824345946312f,0.3703838288784027f,0.2720140516757965f,-0.4842216968536377f,-0.08670487999916077f,-0.25336313247680664f,-0.1550750732421875f,-0.987932562828064f,-0.1344406008720398f,0.35313835740089417f,-0.3957892060279846f,-0.15961946547031403f,0.22525130212306976f,0.3789818584918976f}, +{-0.40892091393470764f,0.07838445156812668f,-0.3972336947917938f,0.22499339282512665f,0.3223019242286682f,-0.04307904466986656f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.30871930718421936f,-0.33111128211021423f,0.08064798265695572f,0.08909518271684647f}, {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.8427432179450989f,0.679609477519989f,-0.1838339865207672f,-0.8048290014266968f,1.4805269241333008f,-0.08742031455039978f,0.05785742402076721f,-0.4665476381778717f,0.49658796191215515f,-0.08510879427194595f,-0.309722363948822f,-0.2896781861782074f,-0.9483605027198792f,0.4396055340766907f,0.17858834564685822f}, -{-0.408692330121994f,0.15604840219020844f,-0.11896948516368866f,0.0922636091709137f,-0.1451295167207718f,0.10412421077489853f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.07742909342050552f,0.12809070944786072f,0.03996849060058594f,-0.4220041334629059f,-0.2886850833892822f,-0.3350064158439636f,0.3153386116027832f}, -{-0.2991822361946106f,0.3794580399990082f,-0.07897943258285522f,-0.05932474136352539f,0.08582660555839539f,0.24227938055992126f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.015840977430343628f,-0.13475483655929565f,0.36124154925346375f,-0.16869547963142395f}, -{-0.2675279378890991f,0.4225318431854248f,-1.3155782222747803f,0.011379898525774479f,1.3093910217285156f,0.03549259528517723f,-0.32875844836235046f,-0.31893211603164673f,-0.9009249806404114f,-0.3259560763835907f,-0.5623511672019958f,-0.42054229974746704f,0.45179739594459534f,2.150045156478882f,0.3168305456638336f,0.050804875791072845f}, -{-0.015470266342163086f,-0.5833328366279602f,0.6117988228797913f,0.3354269862174988f,0.33325907588005066f,-0.5840275883674622f,0.05196094512939453f,-0.008358269929885864f,-0.5232630372047424f,-0.37522807717323303f,0.06831542402505875f,-0.11511552333831787f,0.5202909708023071f,-0.2629256248474121f,-0.06220770627260208f,-0.4585099518299103f}, -{0.1863725483417511f,1.084182858467102f,-1.0181115865707397f,-0.4724007248878479f,-0.33689597249031067f,0.9457219839096069f,0.04860696196556091f,0.17769548296928406f,-0.12625347077846527f,0.3378079831600189f,-0.4645434319972992f,0.19592127203941345f,-0.12818381190299988f,1.0687506198883057f,-0.028336618095636368f,-0.11500971764326096f}, +{0.2847062647342682f,0.018552124500274658f,0.11435768008232117f,0.36562982201576233f,-0.19755424559116364f,0.4533067047595978f,0.2430230677127838f,0.2909286320209503f,-0.2802048921585083f,0.02909536473453045f,0.41849127411842346f,-0.287167489528656f,0.0940583124756813f,-0.14209046959877014f,0.0495246946811676f,-0.0824357196688652f}, +{0.15459725260734558f,0.4935417175292969f,-0.25264647603034973f,0.11184422671794891f,-0.3341422379016876f,1.1511648893356323f,-0.08742031455039978f,-0.36949634552001953f,1.6829259395599365f,2.233215093612671f,0.07771988958120346f,-0.41695454716682434f,-0.10912178456783295f,1.7060784101486206f,2.532484769821167f,2.331334114074707f}, +{-0.408692330121994f,0.8799136281013489f,-0.14514438807964325f,-0.20895916223526f,-1.578966498374939f,1.469042181968689f,0.03285527229309082f,0.4112691879272461f,1.0228923559188843f,2.2706377506256104f,0.12809070944786072f,0.03996849060058594f,0.9477834105491638f,1.5862021446228027f,0.10855130106210709f,-2.259545087814331f}, +{-0.2991822361946106f,-0.6050435900688171f,0.9256192445755005f,-0.08229707181453705f,0.15689420700073242f,0.4238896071910858f,-0.11253207921981812f,0.2177363783121109f,-0.05294230207800865f,-0.5830169916152954f,-1.0703593492507935f,-0.36229726672172546f,-0.8443012237548828f,0.37606582045555115f,0.5651885867118835f,-1.0894941091537476f}, +{-0.2675279378890991f,-2.22987699508667f,0.15863703191280365f,-0.21841442584991455f,1.3560339212417603f,-0.492367148399353f,-0.32875844836235046f,-0.802202045917511f,-0.1637519896030426f,-4.078615188598633f,-1.2283751964569092f,-0.5240398645401001f,0.19471454620361328f,-0.13531909883022308f,1.8324934244155884f,0.5436633825302124f}, +{-0.015470266342163086f,-1.0924882888793945f,0.5259896516799927f,0.0900004431605339f,-0.9157431721687317f,-0.07713504880666733f,-0.021036196500062943f,-0.6448765397071838f,-0.3460008203983307f,0.1362907439470291f,-0.37829816341400146f,-0.20573563873767853f,-0.7316341996192932f,-0.5581928491592407f,-1.8910645246505737f,-0.6874275207519531f}, +{0.1863725483417511f,0.9558444023132324f,-0.8446718454360962f,-0.6416004300117493f,0.08933153003454208f,0.5898428559303284f,0.04860696196556091f,0.17769548296928406f,1.308203935623169f,0.42126715183258057f,-0.4451454281806946f,0.08378204703330994f,0.3650934100151062f,0.6331697702407837f,0.21046006679534912f,0.009809033945202827f}, }; -const float hout[16] = { 0.45773375034332275f,1.3250397443771362f,-0.43074095249176025f,-0.16762784123420715f,-0.8715445399284363f,-0.003051317995414138f,0.0030125975608825684f,0.15066689252853394f,-0.0765313059091568f,0.4119625687599182f,0.11355479061603546f,-0.2710728645324707f,-0.8439583778381348f,0.3218585252761841f,0.46201157569885254f,-0.1275034099817276f }; - -const float b1[16] = { 0.34294191002845764f,1.5131592750549316f,-1.7145336866378784f,0.27451324462890625f,0.7751843929290771f,1.270938515663147f,-0.058932315558195114f,0.9476056098937988f,1.562255859375f,-1.0377662181854248f,0.5732393264770508f,1.2818049192428589f,-0.37127330899238586f,-1.085002064704895f,-1.087764859199524f,2.2922277450561523f }; - -const float b2[16] = { -0.1286313831806183f,-1.2512075901031494f,-1.4564176797866821f,-0.8030261397361755f,-0.6939148902893066f,-0.16376319527626038f,0.1311706006526947f,-0.3665841221809387f,-1.20063054561615f,-1.912178635597229f,-0.45517241954803467f,0.411864310503006f,-0.07918518036603928f,1.8873957395553589f,-0.0411815345287323f,0.7242259383201599f }; - -const float b3[16] = { -1.963319182395935f,-0.7351341247558594f,0.33326515555381775f,-0.1386529505252838f,0.015884902328252792f,-0.056516703218221664f,-0.45353031158447266f,-0.6562485098838806f,-0.015211169607937336f,0.611303448677063f,-0.34831100702285767f,-0.014407366514205933f,-0.7992978692054749f,-1.2589401006698608f,-1.226777195930481f,-0.5482154488563538f }; - -const float bout[1] = { 0.22396063804626465f }; +const float hout[16] = { 0.45773375034332275f,0.10028111189603806f,-0.15963390469551086f,-0.16705428063869476f,-0.13918212056159973f,0.13862498104572296f,-0.03826538845896721f,-0.08387956768274307f,-0.13896769285202026f,-0.1727340966463089f,0.4263496398925781f,0.039233312010765076f,-0.14129970967769623f,0.21044084429740906f,0.17624303698539734f,-0.1203421801328659f }; + +const float b1[16] = { 0.6145862936973572f,1.4653651714324951f,-1.7145336866378784f,-0.8318495154380798f,1.8101054430007935f,1.8614740371704102f,1.4533389806747437f,2.6761667728424072f,0.17127400636672974f,-1.12446928024292f,-1.444535255432129f,1.2159825563430786f,0.3056347072124481f,-1.360192060470581f,-1.087764859199524f,-2.10600209236145f }; + +const float b2[16] = { -0.23251420259475708f,-0.42732852697372437f,-1.6084238290786743f,-0.17800576984882355f,-0.9509057402610779f,-0.00474552670493722f,0.10984312742948532f,-0.4811083972454071f,-1.20063054561615f,-1.9749670028686523f,1.7751399278640747f,1.0225811004638672f,-0.07708542048931122f,1.9233418703079224f,0.42136311531066895f,0.17162247002124786f }; + +const float b3[16] = { -1.963319182395935f,-0.9337409734725952f,0.4731481671333313f,-0.5163841247558594f,-0.23898737132549286f,0.5903229713439941f,-0.4740028977394104f,-0.8475961685180664f,-0.9789288640022278f,-0.7117742300033569f,-0.2875189781188965f,-0.3560875654220581f,-1.3554514646530151f,-0.16300444304943085f,-0.8108376264572144f,0.2676752209663391f }; + +const float bout[1] = { -0.12355829030275345f }; /////////////////////////////////////////////////////////////////////////////////////////////RL float input_RL[num_input_RL] = { 0.0f }; @@ -1031,13 +1031,13 @@ // } for(int i=0; i<numpast_f; i++) { - input_NN[ind] = f_past[time_interval*i] / 10000.0f + 0.5f; + input_NN[ind] = f_past[time_interval*i] / 10000.0f * 8.0f + 0.5f; ind = ind + 1; } - input_NN[ind] = torq.sen / 10000.0f + 0.5f; + 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+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+0.5f; ind = ind + 1; }