![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
for learning
Diff: main.cpp
- Revision:
- 227:3bc296775732
- Parent:
- 226:133f5e9bf4ce
- Child:
- 228:83e3a91aa1c6
diff -r 133f5e9bf4ce -r 3bc296775732 main.cpp --- a/main.cpp Wed Dec 30 02:14:01 2020 +0000 +++ b/main.cpp Wed Dec 30 03:52:47 2020 +0000 @@ -1,4 +1,4 @@ -//201229_1 +//201229_2 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -199,72 +199,72 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-2.2697463035583496f,2.1160788536071777f,0.12903714179992676f,-2.311962842941284f,-2.033754587173462f,2.1115450859069824f,-0.17472904920578003f,-0.3331819772720337f,0.2245292067527771f,-0.09310080856084824f,-0.2364850789308548f,-2.479942560195923f,-0.27122363448143005f,0.29293036460876465f,-0.2571594715118408f,0.7997570633888245f}, -{-1.6175206899642944f,0.8747233748435974f,-0.3927857577800751f,-0.6210108995437622f,-0.6867057681083679f,1.4515836238861084f,-0.4054011106491089f,0.34664079546928406f,0.21746966242790222f,0.1651710569858551f,-0.2733224928379059f,-1.6616266965866089f,0.2283460944890976f,-0.26786449551582336f,-0.20967772603034973f,0.3615615665912628f}, -{-1.2485815286636353f,0.6323836445808411f,0.36391180753707886f,-0.49815866351127625f,-0.37574639916419983f,1.3529977798461914f,0.2872133255004883f,-0.07520823925733566f,-0.04353624954819679f,0.17607754468917847f,-0.3472820818424225f,-1.1856549978256226f,-0.009962721727788448f,0.1882459670305252f,0.05590221285820007f,-0.1354839950799942f}, -{-0.37035778164863586f,0.2764766216278076f,0.39742106199264526f,0.09786108881235123f,-0.4552900493144989f,0.47079044580459595f,-0.11584559082984924f,-0.6199881434440613f,-0.021246016025543213f,0.3174647390842438f,0.09640467911958694f,0.03453358635306358f,-0.1721496433019638f,0.07347317785024643f,-0.2961459457874298f,0.04657832905650139f}, -{1.5702474117279053f,-0.40184739232063293f,-0.0051451027393341064f,0.516058623790741f,0.32582345604896545f,-0.2775055170059204f,0.1294034719467163f,-0.8100912570953369f,-0.1856280118227005f,0.1411595642566681f,0.3481818735599518f,1.010986089706421f,-0.07578666508197784f,0.19066327810287476f,-0.3865056037902832f,-0.6756601929664612f}, -{3.921570062637329f,-3.473679304122925f,0.21773302555084229f,2.6134684085845947f,3.3160603046417236f,-2.2699544429779053f,0.16514194011688232f,1.4215986728668213f,-0.3945431411266327f,0.1619565188884735f,-0.2475448101758957f,2.8288304805755615f,-0.27247968316078186f,0.3155742287635803f,-0.4132833778858185f,-1.749335765838623f}, -{1.2228211164474487f,-0.18562108278274536f,-0.2501986622810364f,0.04795699566602707f,-1.3927079439163208f,-0.08277851343154907f,0.06014183163642883f,-2.607146978378296f,0.24616490304470062f,0.024721112102270126f,0.14736972749233246f,0.5134474039077759f,-0.18025311827659607f,0.267583966255188f,-0.15618428587913513f,0.18829205632209778f}, -{-0.38914060592651367f,0.98116135597229f,-0.26619744300842285f,-0.7627539038658142f,-2.5764272212982178f,-1.3153140544891357f,-0.17925891280174255f,-3.5242974758148193f,-0.1522589921951294f,0.11010321229696274f,0.10167164355516434f,-1.0037798881530762f,0.36388099193573f,0.025797873735427856f,0.04303058981895447f,0.9441773891448975f}, -{-0.23711659014225006f,0.03749708831310272f,0.10248100757598877f,2.0582423210144043f,-0.4214884340763092f,-0.7755205035209656f,-0.07246989011764526f,-2.1488499641418457f,-0.816179633140564f,0.3885577917098999f,-0.3009353578090668f,-0.44453397393226624f,0.2216866910457611f,0.1190120130777359f,-0.30555272102355957f,-0.11512482911348343f}, -{-0.3486669361591339f,-1.4357330799102783f,0.18462657928466797f,3.3947975635528564f,1.2537645101547241f,0.9114041924476624f,-0.2990540862083435f,0.1948457658290863f,-0.6949117183685303f,-0.40582966804504395f,-0.011856677010655403f,-1.1777557134628296f,0.3652753233909607f,-0.3004799783229828f,0.3484981060028076f,-1.0257669687271118f}, -{-0.30276724696159363f,-0.7243128418922424f,0.37182438373565674f,1.9109848737716675f,0.7817525267601013f,1.4623398780822754f,-0.20339298248291016f,0.6901871562004089f,-0.8227569460868835f,0.08449453860521317f,0.34513503313064575f,-1.261414885520935f,-0.07331579923629761f,-0.05159478262066841f,0.26688337326049805f,-1.0774604082107544f}, -{-0.5955638289451599f,-0.7636374235153198f,-0.40320003032684326f,-0.14073055982589722f,0.5583768486976624f,1.3839830160140991f,0.1533789038658142f,0.5793758630752563f,-0.25771084427833557f,0.23128938674926758f,-0.41701540350914f,-0.2349357008934021f,0.1380450278520584f,-0.0441913828253746f,0.10493969917297363f,-0.5167906880378723f}, -{-0.23121966421604156f,-0.2530200779438019f,0.19847965240478516f,-0.9911980032920837f,0.5122191309928894f,0.7782383561134338f,-0.2404318004846573f,0.15677829086780548f,-0.15089081227779388f,-0.203257218003273f,-0.1118941530585289f,-0.38195863366127014f,0.08519630134105682f,-0.003126929048448801f,-0.22268100082874298f,-0.6037920713424683f}, -{-0.1271163672208786f,-0.24466533958911896f,0.4127817749977112f,-0.8709549307823181f,0.2099313586950302f,-0.9028926491737366f,-0.32001304626464844f,0.17364360392093658f,-0.13172510266304016f,-0.25422778725624084f,-0.1979030817747116f,-0.008686555549502373f,-0.3198285400867462f,-0.08344824612140656f,0.0479682981967926f,-0.21525290608406067f}, -{-0.12931154668331146f,0.057841233909130096f,0.20282304286956787f,-0.4424556791782379f,0.42240244150161743f,-1.6744434833526611f,0.04202890396118164f,0.0643862709403038f,0.28223463892936707f,0.04564328491687775f,-0.2825957238674164f,-0.5040830969810486f,0.09628073871135712f,-0.0957854762673378f,0.0668090283870697f,0.07157763838768005f}, -{-0.06334788352251053f,-0.23721008002758026f,-0.40439701080322266f,-0.7362864017486572f,-0.05272766202688217f,-2.7526774406433105f,-0.15568238496780396f,0.04001821205019951f,0.23508107662200928f,-0.042920272797346115f,-0.4774540960788727f,-0.06895071268081665f,-0.2785647511482239f,-0.062423594295978546f,-0.08245879411697388f,0.04138099402189255f}, -{-0.16436980664730072f,-0.5228402018547058f,0.16706281900405884f,-2.2984442710876465f,0.07267970591783524f,-4.615265846252441f,-0.041414469480514526f,0.38444995880126953f,0.1214236170053482f,0.0537165142595768f,-0.357377290725708f,-0.06932318210601807f,0.10447091609239578f,0.2719307839870453f,0.29427415132522583f,-0.21438637375831604f}, + {-1.9207786321640015f,1.6988773345947266f,0.12903714179992676f,-1.279435157775879f,-1.9909706115722656f,0.7861484885215759f,-0.17472904920578003f,2.4785399436950684f,-0.4457712769508362f,-2.131021499633789f,-0.23763932287693024f,-2.3421378135681152f,-0.30731669068336487f,-1.2876925468444824f,-0.2571594715118408f,0.987026035785675f}, +{-1.0858988761901855f,0.6040210127830505f,-0.3927857577800751f,-2.0846407413482666f,-0.6688789129257202f,0.1907724142074585f,-0.4054011106491089f,1.3712066411972046f,-0.21409939229488373f,-0.2795054018497467f,-0.27449890971183777f,-2.075670003890991f,0.1928560435771942f,-1.1678922176361084f,-0.20967772603034973f,0.4458991289138794f}, +{-1.0285701751708984f,0.6030817627906799f,0.36391180753707886f,-2.0771591663360596f,-0.39852604269981384f,0.13221867382526398f,0.2872133255004883f,0.8451540470123291f,-0.2726841866970062f,-0.00858672522008419f,-0.3484817147254944f,-1.2455003261566162f,-0.044814277440309525f,-0.3362787365913391f,0.05590221285820007f,-0.1909589320421219f}, +{-0.6374551653862f,0.43551942706108093f,0.39742106199264526f,-0.004433820489794016f,-0.49116432666778564f,-0.43226829171180725f,-0.11584559082984924f,0.19686971604824066f,-0.06810595095157623f,0.01453996542841196f,0.09518895298242569f,0.7109192609786987f,-0.20577971637248993f,-0.06710827350616455f,-0.2961459457874298f,-0.0010055431630462408f}, +{1.0016977787017822f,-0.13692297041416168f,-0.0051451027393341064f,1.9194016456604004f,0.26095712184906006f,-0.46686214208602905f,0.1294034719467163f,-1.4040372371673584f,-0.04142839461565018f,0.28280720114707947f,0.34694814682006836f,2.017042398452759f,-0.10804130882024765f,0.6484437584877014f,-0.3865056037902832f,-0.37220606207847595f}, +{3.7013962268829346f,-3.278064250946045f,0.21773302555084229f,3.473672866821289f,3.215096950531006f,-1.398314118385315f,0.16514194011688232f,-3.392561674118042f,-0.012783311307430267f,2.540696144104004f,-0.2487698644399643f,2.9128754138946533f,-0.3032718896865845f,1.8724522590637207f,-0.4132833778858185f,-0.8123645186424255f}, +{-0.6710088849067688f,0.46112117171287537f,-0.2501986622810364f,-2.3768506050109863f,-1.4471440315246582f,0.8103431463241577f,0.06014183163642883f,-2.1690258979797363f,0.5684102177619934f,0.9370816349983215f,0.1465349942445755f,4.244968891143799f,-0.22622241079807281f,1.8125272989273071f,-0.15618428587913513f,-5.338499546051025f}, +{-1.2472254037857056f,1.9048551321029663f,-0.26619744300842285f,1.7906368970870972f,-2.4618420600891113f,0.3910621106624603f,-0.17925891280174255f,-0.05274081975221634f,-0.11704742163419724f,-1.3910291194915771f,0.10057748109102249f,0.47454091906547546f,0.3281961977481842f,-0.5049985647201538f,0.04303058981895447f,2.4299402236938477f}, +{-0.2762143909931183f,1.5523386001586914f,0.10248100757598877f,-0.6649307608604431f,-0.8571042418479919f,0.2966843843460083f,-0.07246989011764526f,-1.4243028163909912f,-0.38427025079727173f,0.7453100085258484f,-0.3020334541797638f,0.5186165571212769f,0.1919834464788437f,0.7505708336830139f,-0.30555272102355957f,-0.0865456834435463f}, +{0.4833992123603821f,-0.66792893409729f,0.18462657928466797f,-2.204852819442749f,1.2485759258270264f,-0.14624856412410736f,-0.2990540862083435f,-1.0172507762908936f,-0.07009746134281158f,1.3455805778503418f,-0.013086263090372086f,-1.4063358306884766f,0.33873435854911804f,0.6942158341407776f,0.3484981060028076f,-1.8230526447296143f}, +{0.263083815574646f,-0.7824137806892395f,0.37182438373565674f,-1.4554626941680908f,0.8534267544746399f,-0.45402467250823975f,-0.20339298248291016f,-0.15594691038131714f,-0.4494841992855072f,1.4487119913101196f,0.34380078315734863f,-2.0460476875305176f,-0.09975148737430573f,0.2791770398616791f,0.26688337326049805f,-0.5918031930923462f}, +{-0.3671118915081024f,-1.3361672163009644f,-0.40320003032684326f,-0.36611101031303406f,0.8394630551338196f,-0.5290222764015198f,0.1533789038658142f,0.021133562549948692f,-0.1523493230342865f,1.4112792015075684f,-0.4184671640396118f,-1.0062904357910156f,0.10812203586101532f,0.03889288008213043f,0.10493969917297363f,0.19405925273895264f}, +{-0.22922350466251373f,-0.8320530652999878f,0.19847965240478516f,0.3712257146835327f,0.6117526888847351f,-0.27650442719459534f,-0.2404318004846573f,0.1262647807598114f,-0.18097127974033356f,0.5093924403190613f,-0.11337478458881378f,-0.8287050724029541f,0.0486176498234272f,-0.07510311156511307f,-0.22268100082874298f,-0.25564345717430115f}, +{-0.07298066467046738f,-0.660511314868927f,0.4127817749977112f,0.27916836738586426f,0.09690514951944351f,-0.666505753993988f,-0.32001304626464844f,-0.11481151729822159f,-0.1562783271074295f,0.09439577907323837f,-0.19933317601680756f,-0.5123093724250793f,-0.361269474029541f,-0.2158910483121872f,0.0479682981967926f,0.01685076393187046f}, +{0.020352520048618317f,-0.12291094660758972f,0.20282304286956787f,-0.0021502289455384016f,0.256190687417984f,-0.3862338662147522f,0.04202890396118164f,0.27421513199806213f,0.24047711491584778f,-0.0012752359034493566f,-0.2839800715446472f,-0.43262234330177307f,0.052558090537786484f,-0.22255147993564606f,0.0668090283870697f,-0.46243277192115784f}, +{0.06367768347263336f,-0.46460282802581787f,-0.40439701080322266f,0.15040989220142365f,-0.19055356085300446f,-0.31834033131599426f,-0.15568238496780396f,-0.016957277432084084f,0.09625150263309479f,-0.37879759073257446f,-0.47873246669769287f,-0.3153415024280548f,-0.32210999727249146f,-0.1251159906387329f,-0.08245879411697388f,-0.3120158910751343f}, +{-0.1498112976551056f,-1.1029441356658936f,0.16706281900405884f,1.2164077758789062f,0.14411111176013947f,-0.8045989871025085f,-0.041414469480514526f,0.3490663468837738f,-0.21580351889133453f,0.013945421203970909f,-0.3585408926010132f,-0.8998300433158875f,0.06326267123222351f,0.7034234404563904f,0.29427415132522583f,-1.0481795072555542f}, }; const float h2[16][16] = { - {0.6870895624160767f,3.6746487617492676f,-0.06966331601142883f,-1.0642476081848145f,-0.21907491981983185f,5.141122817993164f,2.485464572906494f,-0.049610212445259094f,-0.43008196353912354f,-0.1415480375289917f,1.8557672500610352f,-0.5127325057983398f,0.020933745428919792f,-4.127963066101074f,0.8898313641548157f,-2.5996580123901367f}, -{-0.5193911194801331f,-2.089723825454712f,0.057057321071624756f,-0.2761891186237335f,-0.35503754019737244f,-1.4439270496368408f,2.9152603149414062f,-0.265109658241272f,-0.33757925033569336f,0.2895788848400116f,3.4944498538970947f,-0.6352575421333313f,0.20874691009521484f,0.22130528092384338f,-2.37044358253479f,-3.2518551349639893f}, + {-3.279550790786743f,1.3984382152557373f,-0.06966331601142883f,5.138574600219727f,-0.21907491981983185f,3.159214973449707f,-11.226640701293945f,0.03695585951209068f,-0.43008196353912354f,-0.1415480375289917f,0.3537538945674896f,-0.489955335855484f,0.07270299643278122f,-4.281073093414307f,4.7336907386779785f,0.16744309663772583f}, +{0.17123033106327057f,-0.32801592350006104f,0.057057321071624756f,-0.8009116053581238f,-0.35503754019737244f,0.8754817843437195f,-0.11818888783454895f,-0.3436000347137451f,-0.33757925033569336f,0.2895788848400116f,0.5213285684585571f,-0.777406632900238f,0.1337842345237732f,1.1321638822555542f,1.9351468086242676f,1.1557437181472778f}, {-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.29042911529541016f,0.0850529670715332f,-0.2894435524940491f,0.9083148241043091f,0.08946844935417175f,-0.3694393038749695f,-1.9789056777954102f,0.30597805976867676f,0.26211628317832947f,0.2953031361103058f,0.3806999921798706f,-0.18785648047924042f,-0.5432137846946716f,-1.2326310873031616f,0.4557395577430725f,0.36813783645629883f}, -{0.05463621765375137f,1.648303747177124f,-0.25313520431518555f,2.1411404609680176f,0.036378175020217896f,0.2640312910079956f,-2.3572585582733154f,-0.3157302737236023f,-0.024399548768997192f,-0.39465832710266113f,0.08887764811515808f,-1.0177232027053833f,-0.03325901925563812f,-0.377375066280365f,-1.5176246166229248f,-1.3263354301452637f}, -{-0.27445268630981445f,0.044222280383110046f,-0.3519742488861084f,0.020389582961797714f,-0.3015052080154419f,-0.05877840891480446f,-0.1295541524887085f,0.031063230708241463f,-0.23047015070915222f,0.3579089343547821f,0.12515008449554443f,-0.3939391076564789f,-0.34014707803726196f,0.8548136949539185f,0.2128278762102127f,-0.009794359095394611f}, +{-0.7092615365982056f,-2.1974642276763916f,-0.2894435524940491f,0.7854074835777283f,0.08946844935417175f,-1.307998538017273f,0.31863710284233093f,0.40539678931236267f,0.26211628317832947f,0.2953031361103058f,1.2642722129821777f,0.024607442319393158f,-0.4620853662490845f,0.491230845451355f,0.4109271466732025f,0.9385437369346619f}, +{-1.4256187677383423f,2.012375593185425f,-0.25313520431518555f,1.5635145902633667f,0.036378175020217896f,1.7026065587997437f,-0.428992360830307f,-0.12713438272476196f,-0.024399548768997192f,-0.39465832710266113f,1.1830649375915527f,-0.8617092967033386f,-0.11491943150758743f,-2.74824857711792f,-0.19821076095104218f,-2.1217200756073f}, +{0.17164383828639984f,0.22212368249893188f,-0.3519742488861084f,-0.12988653779029846f,-0.3015052080154419f,-0.19120539724826813f,-0.035322483628988266f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,0.3648194670677185f,-0.3632545471191406f,-0.28813818097114563f,0.06268922239542007f,0.4878838360309601f,-0.13957220315933228f}, {-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.7745811343193054f,0.43823742866516113f,0.33083590865135193f,0.32325437664985657f,-0.14358049631118774f,-0.5838668942451477f,-2.7892940044403076f,-0.4364927411079407f,0.2600560486316681f,-0.37898191809654236f,0.48453131318092346f,-0.45433786511421204f,-0.4077425003051758f,0.10996997356414795f,-4.25514030456543f,-3.7227020263671875f}, -{-0.006837370339781046f,0.1642095148563385f,-0.11379697918891907f,0.33623170852661133f,0.041274964809417725f,-0.5825773477554321f,-0.1624518483877182f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.1595766246318817f,-0.545246958732605f,-0.37024784088134766f,-0.1575523167848587f,-0.09610440582036972f,-0.48694995045661926f}, -{-0.1087164357304573f,0.3503989279270172f,-0.13502129912376404f,-0.060202471911907196f,0.12987366318702698f,0.12094435840845108f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.13571058213710785f,0.3872660994529724f,0.3811538517475128f,-0.35255753993988037f,-0.006949732080101967f,-0.2228918820619583f}, -{-0.2894132733345032f,0.011871201917529106f,0.0457797646522522f,-0.35378244519233704f,-0.03321319818496704f,-0.4036423861980438f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.19837161898612976f,0.3545852601528168f,-0.3647043704986572f,0.4003598093986511f,-0.41271811723709106f,-0.26710039377212524f}, -{0.3008931577205658f,-0.14995072782039642f,0.3954955041408539f,0.5216120481491089f,0.0033026933670043945f,0.2185026854276657f,0.2904948890209198f,-0.13695485889911652f,0.3487861454486847f,-0.32520344853401184f,0.06570026278495789f,-0.4404744505882263f,-0.03746383264660835f,0.36095479130744934f,-0.4144689738750458f,0.08218350261449814f}, -{-0.2646476626396179f,-0.2206238955259323f,-0.15798500180244446f,0.37385594844818115f,-0.37393757700920105f,0.35715484619140625f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.11781324446201324f,-0.2837170362472534f,0.41839322447776794f,-0.007101783994585276f,-0.11921016871929169f,0.0991160050034523f}, -{-0.2612467110157013f,0.26446953415870667f,-0.2018718123435974f,-0.04702913016080856f,0.07545611262321472f,0.04219565540552139f,-0.11297860741615295f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.3128192722797394f,-0.28594154119491577f,-0.16718891263008118f,0.237469881772995f,-0.22471296787261963f,-0.08226354420185089f}, +{-1.68680739402771f,0.6638245582580566f,0.33083590865135193f,-1.7502901554107666f,-0.14358049631118774f,-1.2175366878509521f,-1.4789408445358276f,-0.3297775983810425f,0.2600560486316681f,-0.37898191809654236f,2.483837127685547f,-0.6449811458587646f,-0.4324319064617157f,1.8047806024551392f,1.9251035451889038f,-5.345644950866699f}, +{-0.011864129453897476f,0.24240601062774658f,-0.11379697918891907f,0.09250956773757935f,0.041274964809417725f,-0.4395125210285187f,0.17291413247585297f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-0.10104721039533615f,-0.4444259703159332f,-0.4070247709751129f,-0.309760183095932f,-0.32266420125961304f,-0.35147857666015625f}, +{0.5592901110649109f,0.10831301659345627f,-0.13502129912376404f,0.1443445235490799f,0.12987366318702698f,-0.23341365158557892f,1.5150891542434692f,-0.4706239700317383f,-0.13619378209114075f,0.16938945651054382f,-0.37716418504714966f,-0.08305957168340683f,0.14325641095638275f,-0.5774527192115784f,-0.8109194040298462f,0.9875264167785645f}, +{-0.24372076988220215f,-0.01538371667265892f,0.0457797646522522f,-0.35645297169685364f,-0.03321319818496704f,-0.44354382157325745f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.22652651369571686f,0.3545852601528168f,-0.3647043704986572f,0.42405930161476135f,-0.3867824375629425f,-0.28787633776664734f}, +{1.0675148963928223f,0.2293117344379425f,0.3954955041408539f,0.7653166055679321f,0.0033026933670043945f,-0.5015988945960999f,-1.2019602060317993f,-0.10559144616127014f,0.3487861454486847f,-0.32520344853401184f,-0.6979184746742249f,-0.5480722188949585f,-0.1258290410041809f,-0.5579017996788025f,0.34959855675697327f,0.08290502429008484f}, +{-0.1197410598397255f,-0.22591204941272736f,-0.15798500180244446f,0.34808388352394104f,-0.37393757700920105f,0.3207882344722748f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.09483251720666885f,-0.2837170362472534f,0.41839322447776794f,0.009451267309486866f,-0.13658572733402252f,0.12012352049350739f}, +{0.1656266450881958f,0.022133832797408104f,-0.2018718123435974f,0.07037214934825897f,0.07545611262321472f,-0.07566960901021957f,0.4267517030239105f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,-0.3724291920661926f,-0.6575173735618591f,-0.39271044731140137f,0.3236285150051117f,-0.3919552266597748f,0.28225356340408325f}, {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.7134329676628113f,-0.052853863686323166f,0.12081471085548401f,0.0885314866900444f,0.29976895451545715f,0.13591955602169037f,0.4252123534679413f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.368678480386734f,-0.4235660135746002f,-0.3287670612335205f,-0.030784178525209427f,-0.33652985095977783f,0.15664343535900116f}, +{-2.0181589126586914f,-2.3426811695098877f,0.12081471085548401f,-0.10881300270557404f,0.29976895451545715f,-0.4033913016319275f,0.2747650146484375f,0.2833297848701477f,-0.3893685042858124f,-0.02222958207130432f,2.368856191635132f,-0.44632554054260254f,-0.25490495562553406f,0.02596704661846161f,1.9061853885650635f,-0.5236271619796753f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.011012091301381588f,-0.08469975739717484f,-0.05051663517951965f,-0.13180319964885712f,0.03014490008354187f,0.3332441747188568f,0.3036012351512909f,0.12052453309297562f,-0.07464778423309326f,-0.11870327591896057f,0.4001283347606659f,0.05569266155362129f,0.3470017910003662f,0.2124619036912918f,0.6467408537864685f}, -{0.047732532024383545f,-0.4710002541542053f,-3.973160743713379f,-1.6878151893615723f,-1.8207725286483765f,0.9388903975486755f,-0.2720594108104706f,0.06247803568840027f,-1.3784089088439941f,-0.3999633491039276f,0.2454482764005661f,0.4260072708129883f,-1.9264519214630127f,-0.9032373428344727f,1.5214601755142212f,-0.7143508195877075f}, + {-0.36079341173171997f,-1.176302194595337f,0.959162175655365f,-0.48920923471450806f,0.8694946765899658f,1.9670933485031128f,0.11358434706926346f,-0.008825941011309624f,-0.4870230555534363f,-0.2505175471305847f,-0.1351129114627838f,0.8353851437568665f,-6.752339839935303f,-0.03938703611493111f,-3.1741437911987305f,0.8818673491477966f}, +{0.047732532024383545f,1.0629931688308716f,-0.6350641846656799f,-0.3420157730579376f,-0.8291696310043335f,-1.396787405014038f,-0.32212066650390625f,-0.0935864970088005f,0.000492760562337935f,-0.5774019360542297f,0.20503714680671692f,0.32605159282684326f,-1.7806776762008667f,1.0902012586593628f,-0.37709569931030273f,-0.5827578902244568f}, {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.1856261044740677f,0.2812199592590332f,-0.2940351665019989f,-0.5251300930976868f,1.2234913110733032f,0.04465974494814873f,0.07002416253089905f,-0.7640371322631836f,-0.5844600796699524f,-0.056033775210380554f,-1.5783137083053589f,-0.22802484035491943f,0.5673947334289551f,-0.09663663804531097f,0.0034908787347376347f}, +{-0.30922991037368774f,-0.45854222774505615f,1.1073622703552246f,-0.49021875858306885f,-3.950211524963379f,1.7038768529891968f,0.0887235626578331f,-0.08585517108440399f,-0.4692097008228302f,-0.6527137160301208f,-0.2290327399969101f,2.56268048286438f,-0.9999791979789734f,0.5930535197257996f,0.8207638263702393f,0.417977899312973f}, {-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.5151291489601135f,-2.110109329223633f,0.039931271225214005f,-0.3436148762702942f,0.45118024945259094f,-0.18732719123363495f,0.22384825348854065f,-3.0164310932159424f,-0.3240533769130707f,-0.19109833240509033f,1.3143516778945923f,0.5283421874046326f,0.049671806395053864f,0.1680707335472107f,1.2531133890151978f}, -{0.4110594093799591f,0.33176305890083313f,-0.4520510137081146f,-3.3476786613464355f,0.948876678943634f,0.008992924354970455f,-0.08670487999916077f,-0.25336313247680664f,-0.25318628549575806f,-0.3312968611717224f,0.0184091255068779f,-0.24467864632606506f,1.1397196054458618f,-19.880067825317383f,-0.41450992226600647f,0.6386731863021851f}, -{-0.40892091393470764f,0.06075982749462128f,-0.2628916800022125f,0.02211926504969597f,0.17967818677425385f,0.1892240345478058f,-0.23312048614025116f,-0.390264093875885f,0.16904254257678986f,-0.1559126079082489f,-0.14134526252746582f,-0.14881500601768494f,-0.3672119975090027f,-0.12088104337453842f,0.2601229250431061f,-0.13139896094799042f}, +{-0.37449589371681213f,0.295567125082016f,-0.4088749587535858f,-0.043956413865089417f,1.0780417919158936f,0.23847971856594086f,-0.18960633873939514f,0.0674910917878151f,-0.6745506525039673f,-0.42047327756881714f,-0.4179152548313141f,-1.9143165349960327f,-0.5511244535446167f,-0.790189266204834f,0.4125581681728363f,-0.790862500667572f}, +{0.4110594093799591f,1.1701329946517944f,0.5681906938552856f,0.3143150508403778f,-0.14053039252758026f,0.041716884821653366f,-0.08670487999916077f,-0.25336313247680664f,-0.17685538530349731f,-0.192522332072258f,-0.14935921132564545f,-1.6479074954986572f,-2.0645601749420166f,-1.2652114629745483f,-0.5234649181365967f,-0.9890998601913452f}, +{-0.40892091393470764f,0.05822417512536049f,-0.3867315948009491f,0.25968697667121887f,0.2448660135269165f,-0.031271472573280334f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.07636835426092148f,-0.35165199637413025f,-0.36560842394828796f,0.16087059676647186f,-0.018878500908613205f}, {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,1.7241225242614746f,-0.6365997791290283f,-0.35132426023483276f,0.17890878021717072f,-0.6558207869529724f,-0.08742031455039978f,0.05785742402076721f,-0.03979473561048508f,-0.39906400442123413f,-0.15960898995399475f,1.2954472303390503f,-2.621685266494751f,-1.0401958227157593f,0.6017050743103027f,1.5809630155563354f}, -{-0.408692330121994f,-0.29477816820144653f,0.03837122768163681f,-0.11855655163526535f,0.060835614800453186f,-0.262676477432251f,0.03285527229309082f,0.38763079047203064f,-0.3194047212600708f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.5533397197723389f,-0.2563649117946625f,-0.37028229236602783f,0.15349136292934418f}, -{-0.2991822361946106f,0.22577506303787231f,-0.07897943258285522f,0.07559660822153091f,0.1937188357114792f,0.11779775470495224f,-0.11253207921981812f,0.34576353430747986f,0.16782228648662567f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.015840977430343628f,-0.13475483655929565f,0.4367380738258362f,-0.03075362741947174f}, -{-0.2675279378890991f,-0.3534528315067291f,0.795311689376831f,-3.40805721282959f,-0.04898405075073242f,-0.01076955534517765f,-0.42279961705207825f,-0.31893211603164673f,-0.8699809908866882f,-0.7178359627723694f,-0.5807120203971863f,0.3136196434497833f,0.3418859839439392f,0.009392887353897095f,-0.25633153319358826f,0.2063475251197815f}, -{-0.015470266342163086f,-0.33451321721076965f,-1.8089319467544556f,0.1993291825056076f,-1.3866753578186035f,-0.6183779239654541f,-0.13107649981975555f,-0.008358269929885864f,-0.1463192254304886f,-0.5245264768600464f,0.15223190188407898f,-0.3079873025417328f,0.01583760976791382f,-0.49864935874938965f,1.9532345533370972f,1.1015044450759888f}, -{0.1863725483417511f,-1.3953653573989868f,-0.785886287689209f,-1.5119303464889526f,1.1382683515548706f,0.32635053992271423f,-0.12577135860919952f,0.17769548296928406f,-0.13496801257133484f,0.0018981441389769316f,-0.4641093313694f,0.44618114829063416f,0.9706767797470093f,-3.185784339904785f,-4.110508918762207f,-0.701421856880188f}, +{0.15459725260734558f,1.7443275451660156f,-1.591740369796753f,-0.2975398004055023f,0.31785422563552856f,0.04364809766411781f,-0.08742031455039978f,0.05785742402076721f,-0.2837896943092346f,-0.3673296868801117f,-0.12857381999492645f,-0.8325196504592896f,-0.37156933546066284f,-0.6884478330612183f,-0.6881860494613647f,1.5288281440734863f}, +{-0.408692330121994f,0.01719093509018421f,0.05000424385070801f,0.0922636091709137f,-0.02135528437793255f,-0.14273621141910553f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.4053786098957062f,-0.16870169341564178f,-0.11664175987243652f,0.3340166509151459f}, +{-0.2991822361946106f,0.26145896315574646f,0.013320297934114933f,-0.05932474136352539f,0.17160382866859436f,0.15367117524147034f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.11107879132032394f,-0.22281543910503387f,0.2101161628961563f,-0.07371605932712555f}, +{-0.2675279378890991f,-0.171584352850914f,0.8003653287887573f,-0.09207814931869507f,0.17126235365867615f,-1.083191990852356f,-0.3741258978843689f,-0.4711456894874573f,-0.5868393182754517f,-0.7122592926025391f,-0.6053783297538757f,0.4375041425228119f,0.8803552985191345f,1.1093401908874512f,0.1538943350315094f,0.45353952050209045f}, +{-0.015470266342163086f,-1.0723323822021484f,0.723766565322876f,0.21223178505897522f,-0.763659656047821f,-0.45682474970817566f,-0.1438569277524948f,-0.16299200057983398f,-0.4030216634273529f,-0.5859634280204773f,-0.02150462381541729f,0.8767731785774231f,-0.001121284905821085f,-1.9785069227218628f,0.3488675355911255f,-1.2748806476593018f}, +{0.1863725483417511f,0.8063966035842896f,-0.261747807264328f,-0.5229145288467407f,-0.9701830148696899f,-2.291463613510132f,-0.14978085458278656f,-0.13449683785438538f,-0.009946722537279129f,0.21375170350074768f,-0.3929237127304077f,-1.7317408323287964f,0.8280795812606812f,0.8070957064628601f,-1.3346682786941528f,-0.546489417552948f}, }; -const float hout[16] = { 0.45773375034332275f,0.3343513309955597f,0.20888426899909973f,0.12405800819396973f,-0.1822827309370041f,0.22027702629566193f,0.09631972014904022f,0.15066689252853394f,-0.2117258608341217f,-0.047320280224084854f,0.041092678904533386f,-0.17925195395946503f,-0.10832655429840088f,0.15202918648719788f,-0.11462922394275665f,-0.2474198341369629f }; - -const float b1[16] = { 0.8578622937202454f,1.8717803955078125f,-1.7145336866378784f,0.11644494533538818f,0.5963828563690186f,1.2755355834960938f,-0.058932315558195114f,3.150829315185547f,0.7200431823730469f,-0.8998371362686157f,0.5687511563301086f,1.343883991241455f,-0.37784427404403687f,-0.8744925856590271f,-1.087764859199524f,1.0147984027862549f }; - -const float b2[16] = { -0.3640436828136444f,-0.5804413557052612f,-1.4564176797866821f,-0.31257641315460205f,-0.6939148902893066f,-0.19237355887889862f,0.5664706230163574f,-0.4364980459213257f,-1.20063054561615f,-1.912178635597229f,-1.241424560546875f,0.05994709953665733f,-0.21352645754814148f,1.2648658752441406f,1.2819905281066895f,1.829100489616394f }; - -const float b3[16] = { -1.963319182395935f,-0.4856412708759308f,0.6176115870475769f,0.19022414088249207f,1.1651538610458374f,-0.002870276104658842f,-0.6302200555801392f,-0.6562485098838806f,1.461742877960205f,0.2694356143474579f,-0.36246874928474426f,-2.8072521686553955f,-0.5458581447601318f,0.6261339783668518f,-1.5309842824935913f,-0.11706110090017319f }; - -const float bout[1] = { -0.08046042919158936f }; +const float hout[16] = { 0.45773375034332275f,0.23944081366062164f,-0.1609853059053421f,0.04123726487159729f,-0.15389685332775116f,0.15428707003593445f,-0.08261777460575104f,-0.0670207068324089f,-0.17322556674480438f,-0.0906682163476944f,0.07139790803194046f,-0.09385088831186295f,-0.10334277898073196f,0.16455674171447754f,0.13848303258419037f,-0.16110169887542725f }; + +const float b1[16] = { 1.1493452787399292f,1.1892979145050049f,-1.7145336866378784f,1.892533540725708f,0.8489716053009033f,0.734098494052887f,-0.058932315558195114f,2.2942941188812256f,0.4328959882259369f,-2.3650143146514893f,0.5675008296966553f,1.369621753692627f,-0.41816702485084534f,-1.8981163501739502f,-1.087764859199524f,3.761976957321167f }; + +const float b2[16] = { 1.3426367044448853f,0.4375428557395935f,-1.4564176797866821f,-0.5988835692405701f,-0.6939148902893066f,0.683953583240509f,1.1661195755004883f,-0.3192075192928314f,-1.20063054561615f,-1.912178635597229f,-1.324724555015564f,0.25205105543136597f,-0.3226426839828491f,1.075128197669983f,-1.1039854288101196f,1.398043155670166f }; + +const float b3[16] = { -1.963319182395935f,-0.47129005193710327f,0.313810795545578f,-0.22355298697948456f,0.7034278512001038f,0.7489508986473083f,-0.6396648287773132f,-0.9656848907470703f,0.21340391039848328f,0.2163408100605011f,-0.5201754570007324f,0.18033207952976227f,0.9134877920150757f,0.6106834411621094f,0.6409071683883667f,0.5369388461112976f }; + +const float bout[1] = { -0.19219829142093658f }; float valve_ref_pos_buffer[10] = {0.0f}; @@ -1041,9 +1041,9 @@ 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] - torq.sen)/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*8.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])/10000.0f + 0.5f; ind = ind + 1; }