![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
for learning
Diff: main.cpp
- Revision:
- 236:1276112e0147
- Parent:
- 234:1cdc45c27ba7
- Child:
- 237:aa3863117889
diff -r 4be664734d36 -r 1276112e0147 main.cpp --- a/main.cpp Fri Jan 01 12:15:49 2021 +0000 +++ b/main.cpp Sat Jan 02 06:58:18 2021 +0000 @@ -1,4 +1,4 @@ -//210101_1 1kHz +//210102_1 1kHz #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -199,72 +199,71 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-0.3518959879875183f,-1.69797682762146f,-2.1282193660736084f,0.07460802793502808f,0.4083598852157593f,-0.7478575110435486f,-0.24204020202159882f,0.022494137287139893f,-0.38182884454727173f,0.1710560917854309f,-0.5618472695350647f,-0.24755993485450745f,0.07800555229187012f,-0.11408881843090057f,2.00408673286438f,0.08599450439214706f}, -{-0.23303905129432678f,-0.6088531017303467f,-1.162105917930603f,-0.2855757474899292f,-0.4139590263366699f,-0.12036176770925522f,-0.33242931962013245f,0.33744025230407715f,0.019223570823669434f,0.025203019380569458f,0.010082818567752838f,-0.32528552412986755f,0.07627367973327637f,0.36430639028549194f,0.8490098118782043f,0.02658339962363243f}, -{0.054309576749801636f,-0.6756351590156555f,-0.38059884309768677f,-0.3997206389904022f,0.37840962409973145f,-0.46292808651924133f,-0.3337523639202118f,-0.21087387204170227f,0.18194907903671265f,-0.15486115217208862f,-0.48726019263267517f,0.2976128160953522f,-0.10916683077812195f,0.1307639181613922f,0.19809672236442566f,0.3890748620033264f}, -{-0.28941866755485535f,0.2456064522266388f,-0.393026202917099f,-0.3544938564300537f,-0.3382750153541565f,0.27266401052474976f,-0.4222949147224426f,0.2507844567298889f,0.405910849571228f,0.15534931421279907f,0.07898453623056412f,-0.21736784279346466f,-0.35986700654029846f,-0.4081882834434509f,-0.42403799295425415f,0.0561867393553257f}, -{0.260015070438385f,0.585556149482727f,0.30323508381843567f,-0.3760731518268585f,0.08130717277526855f,0.005908521823585033f,0.35346728563308716f,0.05169829726219177f,0.39578813314437866f,0.3265618085861206f,0.09266892820596695f,-0.24159389734268188f,0.3847886323928833f,0.3471701741218567f,-1.3181854486465454f,0.3569074869155884f}, -{0.07367211580276489f,1.521565556526184f,2.345362901687622f,0.21967214345932007f,0.4170142412185669f,0.6747139096260071f,0.16131609678268433f,-0.05181002616882324f,0.03649970889091492f,0.3132137656211853f,0.4686543047428131f,0.0925305187702179f,-0.004373282194137573f,0.3530316650867462f,-2.0337753295898438f,0.4983721375465393f}, -{-0.1849803626537323f,-0.9590993523597717f,-0.2802956998348236f,0.10853719711303711f,-0.34670042991638184f,-0.13690190017223358f,-0.07871395349502563f,-0.3424152731895447f,-0.0723131000995636f,-0.09276700019836426f,0.43821901082992554f,0.37728869915008545f,0.1583765149116516f,0.24978892505168915f,-0.07854941487312317f,-0.04284338653087616f}, -{0.3363311290740967f,-0.7796613574028015f,-0.12148615717887878f,0.2931549549102783f,-0.2531799077987671f,-0.21972180902957916f,-0.15988385677337646f,-0.16074800491333008f,-0.3888390362262726f,-0.03829273581504822f,0.7230599522590637f,0.08995217829942703f,-0.03030523657798767f,0.035904496908187866f,0.294111967086792f,-0.49187636375427246f}, -{-0.008942186832427979f,-0.2458847463130951f,0.04273533821105957f,-0.26002514362335205f,0.369967520236969f,0.3970028758049011f,0.06158176064491272f,0.3959408402442932f,-0.011539667844772339f,-0.3851383328437805f,0.6504956483840942f,-0.18361234664916992f,-0.3491899371147156f,-0.4619986414909363f,0.335550457239151f,-0.36968812346458435f}, -{-0.23328730463981628f,-0.36262547969818115f,0.1724269986152649f,-0.14789578318595886f,-0.1547950804233551f,-0.2832684814929962f,-0.09938845038414001f,0.10942506790161133f,-0.3328583538532257f,0.32593780755996704f,0.08618786185979843f,0.01168887410312891f,0.025072604417800903f,-0.15519265830516815f,-0.09023689478635788f,-0.2123822718858719f}, -{-0.2889084219932556f,-0.023485874757170677f,-0.05854697525501251f,0.358765184879303f,-0.4070855379104614f,-0.6087843179702759f,-0.14795801043510437f,0.12666010856628418f,0.2193526029586792f,0.2858560085296631f,-0.4274939298629761f,0.1574348509311676f,-0.35532402992248535f,-0.06206052377820015f,-0.10873384028673172f,0.20974156260490417f}, -{-0.349159836769104f,0.09926782548427582f,0.1492946594953537f,-0.09636816382408142f,-0.3470844030380249f,-0.14391815662384033f,-0.24872183799743652f,-0.3441091775894165f,-0.20228171348571777f,-0.3132234513759613f,-0.445285826921463f,-0.08717029541730881f,0.11759966611862183f,0.10235890001058578f,-0.0059266467578709126f,-0.32778745889663696f}, -{0.38546842336654663f,0.042861178517341614f,0.16285735368728638f,-0.41764265298843384f,-0.4134422838687897f,-0.46370384097099304f,0.298126757144928f,-0.39963799715042114f,-0.06526103615760803f,0.03604122996330261f,-0.7327427268028259f,0.08789367228746414f,-0.30289945006370544f,0.14572061598300934f,-0.19186291098594666f,0.14228378236293793f}, -{-0.42283523082733154f,0.34684696793556213f,0.2423180788755417f,-0.14728012681007385f,-0.37331435084342957f,-0.20102868974208832f,-0.09241300821304321f,-0.04799109697341919f,-0.17356249690055847f,-0.053030580282211304f,-0.15261980891227722f,-0.13276861608028412f,-0.3399311900138855f,0.16978342831134796f,0.14468330144882202f,-0.3575900197029114f}, -{0.2842629551887512f,0.3705138564109802f,-0.010952235199511051f,-0.1726883053779602f,-0.16769343614578247f,-0.27340081334114075f,-0.18842191994190216f,0.35883063077926636f,-0.32441917061805725f,0.3678022027015686f,-0.3899131119251251f,0.3959941864013672f,-0.006959974765777588f,-0.07304153591394424f,0.07103786617517471f,-0.423795610666275f}, -{0.30670469999313354f,0.15568028390407562f,-0.0593489371240139f,-0.24774791300296783f,0.2930166721343994f,-0.5918793678283691f,-0.2875429093837738f,0.34532618522644043f,-0.07908278703689575f,0.264565646648407f,-0.9712560176849365f,-0.3862493932247162f,0.24430310726165771f,0.11583136022090912f,-0.15680170059204102f,-0.21749410033226013f}, -{0.06869709491729736f,0.42972221970558167f,-0.06558702141046524f,-0.3430131673812866f,-0.4249112606048584f,-1.058655023574829f,-0.2120281457901001f,-0.19189448654651642f,0.18253427743911743f,-0.026109665632247925f,-0.4158742129802704f,-0.05672925338149071f,0.24209386110305786f,-0.28700676560401917f,-0.13010510802268982f,-0.2501288056373596f}, + {-0.35735204815864563f,-2.0120394229888916f,-2.093839406967163f,0.07576480507850647f,0.41469141840934753f,-2.199093818664551f,-0.24579298496246338f,0.02284291386604309f,-0.3877490162849426f,0.17370828986167908f,-1.4995439052581787f,-0.2709868252277374f,0.07921501994132996f,-0.12744995951652527f,2.269115686416626f,0.010293110273778439f}, +{-0.23665226995944977f,-0.7177719473838806f,-1.0387173891067505f,-0.29000353813171387f,-0.42037737369537354f,-0.9696995615959167f,-0.3375835716724396f,0.342672199010849f,0.019521623849868774f,0.02559378743171692f,-0.4734799563884735f,-0.34987595677375793f,0.0774562656879425f,0.35824331641197205f,0.9874460101127625f,-0.05785252898931503f}, +{0.05515164136886597f,-0.6749873757362366f,-0.2352294921875f,-0.4059182107448578f,0.38427677750587463f,-0.9802049994468689f,-0.33892711997032166f,-0.21414342522621155f,0.18477019667625427f,-0.15726223587989807f,-0.7241458892822266f,0.28268030285835266f,-0.11085942387580872f,0.12095917016267776f,0.28847527503967285f,0.3022002577781677f}, +{-0.293906033039093f,0.34803834557533264f,-0.2669774293899536f,-0.3599902093410492f,-0.3435198664665222f,0.06436814367771149f,-0.4288424849510193f,0.2546727955341339f,0.41220441460609436f,0.157757967710495f,0.06655163317918777f,-0.24026387929916382f,-0.36544665694236755f,-0.42647603154182434f,-0.3519967198371887f,-0.04412488639354706f}, +{0.2640465199947357f,0.904367208480835f,0.5193630456924438f,-0.38190406560897827f,0.08256778120994568f,0.40447431802749634f,0.3589477241039276f,0.052499860525131226f,0.4019247591495514f,0.3316250741481781f,0.5236570835113525f,-0.2648654580116272f,0.39075466990470886f,0.34046316146850586f,-1.3720402717590332f,0.2527320981025696f}, +{0.07481440901756287f,2.2716588973999023f,2.8302807807922363f,0.22307810187339783f,0.42348000407218933f,2.272399663925171f,0.16381725668907166f,-0.05261331796646118f,0.03706562519073486f,0.31807008385658264f,1.7584786415100098f,0.07445400208234787f,-0.004441112279891968f,0.346279114484787f,-2.3773412704467773f,0.3872787058353424f}, +{-0.18784843385219574f,-0.9034362435340881f,-0.5523645877838135f,0.1102200448513031f,-0.3520759642124176f,-0.21641212701797485f,-0.07993438839912415f,-0.3477243483066559f,-0.07343432307243347f,-0.0942053496837616f,0.5279899835586548f,0.3579176962375641f,0.16083213686943054f,0.24892422556877136f,0.09569017589092255f,0.12257940322160721f}, +{0.34154585003852844f,-0.335442453622818f,-0.04132276028394699f,0.29770025610923767f,-0.25710541009902954f,-0.04430774599313736f,-0.16236284375190735f,-0.16324034333229065f,-0.3948678970336914f,-0.038886457681655884f,0.9114609956741333f,0.06612622737884521f,-0.030775129795074463f,0.03140873461961746f,0.12029732018709183f,-0.3530910313129425f}, +{-0.009080827236175537f,0.1405850350856781f,0.01660717837512493f,-0.2640567421913147f,0.3757037818431854f,0.6386660933494568f,0.06253659725189209f,0.40207985043525696f,-0.011718571186065674f,-0.391109824180603f,0.7676808834075928f,-0.21167980134487152f,-0.3546040654182434f,-0.4745349884033203f,0.2616451680660248f,-0.251031756401062f}, +{-0.23690436780452728f,0.028534289449453354f,0.18085666000843048f,-0.1501888632774353f,-0.15719512104988098f,-0.09556744247674942f,-0.10092943906784058f,0.11112162470817566f,-0.3380192518234253f,0.3309914171695709f,0.07824462652206421f,-0.013350500725209713f,0.025461345911026f,-0.16327187418937683f,-0.20799875259399414f,-0.11351343989372253f}, +{-0.29338788986206055f,0.31110334396362305f,-0.09373106807470322f,0.3643277585506439f,-0.41339731216430664f,-0.26774197816848755f,-0.15025204420089722f,0.12862393260002136f,0.2227536141872406f,0.29028818011283875f,-0.3675321936607361f,0.13465528190135956f,-0.36083322763442993f,-0.06896445155143738f,-0.20208565890789032f,0.29474756121635437f}, +{-0.35457348823547363f,0.2837545871734619f,0.013558747246861458f,-0.09786233305931091f,-0.3524658679962158f,0.20859229564666748f,-0.2525781989097595f,-0.34944450855255127f,-0.20541803538799286f,-0.3180798888206482f,-0.39250877499580383f,-0.11374253034591675f,0.11942306160926819f,0.09776416420936584f,-0.012553866021335125f,-0.2696262001991272f}, +{0.3914450705051422f,0.13063785433769226f,0.006528916303068399f,-0.4241181015968323f,-0.419852614402771f,-0.18112421035766602f,0.3027491271495819f,-0.40583428740501404f,-0.06627288460731506f,0.0366000235080719f,-0.7475209832191467f,0.06403577327728271f,-0.3075958490371704f,0.1415783017873764f,-0.20164917409420013f,0.19146141409873962f}, +{-0.42939120531082153f,0.3477157950401306f,0.0039906916208565235f,-0.14956367015838623f,-0.379102498292923f,0.17808063328266144f,-0.09384587407112122f,-0.04873517155647278f,-0.1762535274028778f,-0.05385279655456543f,-0.12105021625757217f,-0.16004778444766998f,-0.3452017307281494f,0.16584442555904388f,0.19096966087818146f,-0.3307840824127197f}, +{0.2886703908443451f,0.3412364721298218f,-0.24555246531963348f,-0.17536580562591553f,-0.17029348015785217f,0.1320163756608963f,-0.19134336709976196f,0.3643942177295685f,-0.32944923639297485f,0.3735049068927765f,-0.3756035268306732f,0.37796643376350403f,-0.007067888975143433f,-0.08091842383146286f,0.06385673582553864f,-0.4109695255756378f}, +{0.31146004796028137f,0.17528820037841797f,-0.18560504913330078f,-0.25158917903900146f,0.29755982756614685f,-0.1040550172328949f,-0.2920011878013611f,0.3506803810596466f,-0.0803089439868927f,0.26866766810417175f,-0.9237697124481201f,-0.41730308532714844f,0.2480909526348114f,0.11072329431772232f,-0.31992876529693604f,-0.21243035793304443f}, }; const float h2[16][16] = { {-0.055980950593948364f,0.23325034976005554f,0.1310378611087799f,0.3538874685764313f,-0.3786364793777466f,0.3037426769733429f,-0.17743819952011108f,0.03198641538619995f,-0.25820767879486084f,-0.025972992181777954f,-0.1812897026538849f,-0.19700877368450165f,-0.23905162513256073f,0.3336930572986603f,-0.2611466646194458f,-0.14968061447143555f}, -{-0.44800564646720886f,0.3085605204105377f,-2.4579923152923584f,-1.2163007259368896f,-1.6898484230041504f,-0.043496813625097275f,-0.22812658548355103f,-1.5393556356430054f,0.16071566939353943f,0.2273702323436737f,-0.2186730057001114f,-0.09930881857872009f,-1.5238995552062988f,-1.4624199867248535f,-0.21292872726917267f,-1.4912246465682983f}, -{-0.3120139539241791f,0.3188628852367401f,-0.735779881477356f,-1.1049586534500122f,-0.9783118367195129f,0.16471511125564575f,1.0466843843460083f,-0.9424003958702087f,-1.0719295740127563f,0.229490727186203f,-0.29371505975723267f,-0.13699811697006226f,-17.021934509277344f,-2.445385217666626f,0.056768983602523804f,-1.0197019577026367f}, +{-2.1463944911956787f,0.3085605204105377f,-1.5364868640899658f,-1.059834361076355f,-1.3532617092132568f,-0.017979100346565247f,-0.6657243967056274f,-1.2610880136489868f,-0.040404435247182846f,0.2273702323436737f,-0.2186730057001114f,-0.09930881857872009f,-0.9734147191047668f,-0.30929386615753174f,-0.21292872726917267f,-1.084805965423584f}, +{1.1777337789535522f,0.3188628852367401f,-0.8884216547012329f,-1.5668562650680542f,-0.8606882691383362f,0.06576482206583023f,-1.243653416633606f,-0.4017029106616974f,-0.18697510659694672f,0.229490727186203f,-0.29371505975723267f,-0.13699811697006226f,0.384287029504776f,0.02075192518532276f,0.056768983602523804f,-0.6898939609527588f}, {-0.28563398122787476f,0.07789990305900574f,0.40358296036720276f,0.3720850646495819f,-0.03832319378852844f,-0.1494518518447876f,-0.11764177680015564f,0.34294649958610535f,0.054388612508773804f,0.3634087145328522f,0.1569826900959015f,0.28783395886421204f,-0.13846668601036072f,0.12138035893440247f,-0.3007376194000244f,0.12193700671195984f}, {0.1812863051891327f,0.25741907954216003f,-0.005224883556365967f,0.3340524137020111f,0.024127095937728882f,0.11559751629829407f,0.13140985369682312f,-0.02607312798500061f,0.060811251401901245f,0.1730591356754303f,0.4128219783306122f,0.03628826141357422f,-0.040624260902404785f,0.2442089021205902f,-0.39249828457832336f,-0.21546570956707f}, -{0.4620211124420166f,-0.3289546072483063f,-0.7837321758270264f,-0.025280611589550972f,-0.24652062356472015f,-0.4231514632701874f,-0.12136978656053543f,-0.5415066480636597f,0.17245952785015106f,0.17989537119865417f,-0.191977858543396f,0.26149240136146545f,0.3528016209602356f,-0.16127131879329681f,-0.4196912348270416f,-0.5733615756034851f}, +{0.6896087527275085f,-0.3289546072483063f,-0.6547867059707642f,-0.9677802920341492f,-0.295799195766449f,-0.3906203508377075f,-0.4158453345298767f,-0.7322367429733276f,0.000888723589014262f,0.17989537119865417f,-0.191977858543396f,0.26149240136146545f,1.0005666017532349f,0.1274717152118683f,-0.4196912348270416f,-0.693223237991333f}, {0.03675055503845215f,-0.05131736397743225f,-0.2540779709815979f,-0.4151476323604584f,-0.3318796753883362f,0.2645241320133209f,0.06107431650161743f,-0.3474422097206116f,0.4012340009212494f,0.12852928042411804f,0.2119675576686859f,0.39421865344047546f,-0.14612942934036255f,0.4053405821323395f,-0.15860587358474731f,-0.00642770528793335f}, {-0.011466562747955322f,-0.293976753950119f,-0.2703247666358948f,0.13940533995628357f,-0.3086448609828949f,-0.10881850123405457f,-0.18203827738761902f,-0.3606947958469391f,0.05907437205314636f,0.17521318793296814f,0.16556969285011292f,-0.017545759677886963f,0.4063515365123749f,0.1637323796749115f,0.0436977744102478f,0.21962454915046692f}, {0.1453019678592682f,0.31070712208747864f,0.10406997799873352f,-0.34301185607910156f,-0.14203324913978577f,0.1393299400806427f,-0.07359349727630615f,-0.4255761206150055f,-0.24196511507034302f,0.4100019037723541f,-0.2432931661605835f,0.4171271026134491f,0.26163145899772644f,0.24838712811470032f,-0.31029027700424194f,0.24932292103767395f}, {-0.09909564256668091f,-0.22814129292964935f,0.18748918175697327f,-0.08129695057868958f,0.17022588849067688f,0.2918822467327118f,-0.3036908507347107f,-0.09228748083114624f,0.024910658597946167f,-0.4239048957824707f,0.050207048654556274f,-0.4021540582180023f,0.4068380892276764f,-0.20195016264915466f,0.35390153527259827f,0.03321918845176697f}, -{0.43944549560546875f,0.11061021685600281f,-0.3057962954044342f,-0.3156031370162964f,-0.45479869842529297f,-0.053649116307497025f,-0.286143034696579f,-0.34322085976600647f,-0.2617630660533905f,0.08167347311973572f,0.41236647963523865f,-0.19175507128238678f,0.11758091300725937f,0.034750234335660934f,0.2710213363170624f,-0.5949099063873291f}, -{-0.34744709730148315f,-0.39544427394866943f,-0.4057272672653198f,0.0778622031211853f,0.17017926275730133f,-0.011973470449447632f,0.15536633133888245f,0.40981242060661316f,-0.11885038018226624f,0.2575679123401642f,-0.36203885078430176f,0.2510797083377838f,0.17438359558582306f,-0.0008050369215197861f,0.10656675696372986f,-0.07003151625394821f}, +{1.1097264289855957f,0.11061021685600281f,-0.6238017678260803f,0.36240458488464355f,-0.5829976201057434f,-0.12090136855840683f,-1.0479249954223633f,-0.2988470494747162f,-0.43462252616882324f,0.08167347311973572f,0.41236647963523865f,-0.19175507128238678f,-0.6528332829475403f,-0.2299557626247406f,0.2710213363170624f,-0.7960361838340759f}, +{-0.34519389271736145f,-0.39544427394866943f,-0.40249112248420715f,0.08116465061903f,0.17276908457279205f,-0.004713055212050676f,0.15504460036754608f,0.41018518805503845f,-0.11885038018226624f,0.2575679123401642f,-0.36203885078430176f,0.2510797083377838f,0.1733463555574417f,0.00006646246038144454f,0.10656675696372986f,-0.07071559876203537f}, {-0.01594102382659912f,-0.19719429314136505f,0.2015570104122162f,0.23486098647117615f,0.36742570996284485f,0.19432035088539124f,-0.24415965378284454f,0.16870906949043274f,-0.1409781575202942f,-0.15576940774917603f,-0.05214834213256836f,-0.16751256585121155f,0.12201771140098572f,0.031148135662078857f,-0.22613362967967987f,-0.3668502867221832f}, -{-0.05187244713306427f,-0.10105487704277039f,0.37118610739707947f,-0.04725774750113487f,-0.24894168972969055f,-0.253291517496109f,-0.27441465854644775f,-0.35106202960014343f,-0.12683960795402527f,-0.19223688542842865f,-0.13938084244728088f,-0.1388394832611084f,-0.23941120505332947f,-0.0906568095088005f,0.04871204495429993f,0.19558128714561462f}, -{0.24246004223823547f,-0.008572280406951904f,0.8558624982833862f,2.1420047283172607f,0.46652790904045105f,-0.23807457089424133f,-2.045154333114624f,0.25432783365249634f,1.3004506826400757f,0.11613044142723083f,-0.22509463131427765f,-0.3847343325614929f,-24.320430755615234f,-2.067932367324829f,0.06784489750862122f,0.32569828629493713f}, -{0.4314001202583313f,-0.35415053367614746f,-0.8243747353553772f,-0.38929200172424316f,-0.5110880732536316f,0.028057783842086792f,0.32799771428108215f,-0.4928995370864868f,0.1869022399187088f,0.021969109773635864f,-0.42253369092941284f,-0.02782580256462097f,0.12870386242866516f,-0.3325507938861847f,-0.08373728394508362f,0.5626990795135498f}, +{-0.037963882088661194f,-0.10105487704277039f,0.3577341139316559f,-0.060322701930999756f,-0.2615357041358948f,-0.2617179751396179f,-0.2733955383300781f,-0.35561829805374146f,-0.1208827868103981f,-0.19223688542842865f,-0.13938084244728088f,-0.1388394832611084f,-0.23633825778961182f,-0.1022484079003334f,0.04871204495429993f,0.19872865080833435f}, +{-2.564844846725464f,-0.008572280406951904f,0.6003588438034058f,3.0607717037200928f,0.776870608329773f,-0.310710608959198f,-2.187302827835083f,0.48503586649894714f,0.31953272223472595f,0.11613044142723083f,-0.22509463131427765f,-0.3847343325614929f,-2.833681106567383f,-0.33584195375442505f,0.06784489750862122f,0.7165175676345825f}, +{-0.0164337195456028f,-0.35415053367614746f,-0.37155482172966003f,0.0538923554122448f,-0.05211840569972992f,0.028057783842086792f,-0.20561406016349792f,0.00019631125906016678f,0.26847031712532043f,0.021969109773635864f,-0.42253369092941284f,-0.02782580256462097f,-0.2900928854942322f,0.041248150169849396f,-0.08373728394508362f,0.2805810868740082f}, }; const float h3[16][16] = { - {-0.18879708647727966f,-0.14559394121170044f,-0.06966331601142883f,0.2882176339626312f,-0.21907491981983185f,0.6232825517654419f,-0.0018155425786972046f,0.0904630720615387f,-0.22329671680927277f,-0.5925017595291138f,0.39582139253616333f,-0.10159772634506226f,-0.01866203173995018f,0.056479066610336304f,-0.060674071311950684f,-0.40675783157348633f}, + {-1.771646499633789f,-0.14559394121170044f,1.4628738164901733f,2.6977522373199463f,-0.21907491981983185f,0.11600030213594437f,-1.0515238046646118f,0.04651227965950966f,-1.9034440517425537f,-0.1847420185804367f,-0.2102704793214798f,-0.10159772634506226f,-0.25009530782699585f,-0.13627253472805023f,-0.060674071311950684f,2.819528102874756f}, {0.11036357283592224f,-0.3038245439529419f,0.057057321071624756f,0.08777192234992981f,-0.35503754019737244f,-0.29007279872894287f,-0.33918139338493347f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-0.3337714970111847f,-0.37158891558647156f,0.33698758482933044f,0.16647490859031677f,-0.3480874300003052f,-0.2740727365016937f}, -{-0.7437351942062378f,0.003037691116333008f,-0.1919207125902176f,0.8550335168838501f,0.05568113923072815f,0.06482237577438354f,-0.8604972958564758f,-0.08465918898582458f,0.8875115513801575f,-0.02379775047302246f,0.26386815309524536f,0.3004753887653351f,0.26245737075805664f,-0.6394146680831909f,0.08652284741401672f,-0.3352816104888916f}, -{-0.47847747802734375f,-0.38710832595825195f,-0.4291071593761444f,0.566381573677063f,0.08946844935417175f,0.15214984118938446f,-1.0603891611099243f,0.4122363030910492f,0.5083996653556824f,0.16379007697105408f,0.07776153832674026f,0.4110986292362213f,-0.4673307538032532f,-0.37362468242645264f,0.27305224537849426f,-1.1237341165542603f}, -{-0.4165594279766083f,0.40231046080589294f,-0.25313520431518555f,1.678422212600708f,0.036378175020217896f,1.5675896406173706f,-1.7537471055984497f,-0.08570799231529236f,1.440100073814392f,-0.862185537815094f,0.3691120743751526f,-0.4229513108730316f,-0.8029487729072571f,-0.11359894275665283f,-0.2544192671775818f,-1.9663056135177612f}, -{0.36151543259620667f,0.294185608625412f,-0.3519742488861084f,0.2310507744550705f,-0.3015052080154419f,-0.27176108956336975f,-0.27087995409965515f,-0.019414573907852173f,-0.3904707729816437f,0.3504062592983246f,0.04262559115886688f,0.001658409833908081f,-0.204361230134964f,0.3993215262889862f,0.15392538905143738f,-0.21421511471271515f}, -{-0.6778572797775269f,-0.02554568648338318f,-0.41483578085899353f,-4.090725421905518f,-0.38453540205955505f,-1.086576223373413f,1.048987865447998f,0.12387624382972717f,-1.7006561756134033f,0.2509230673313141f,-0.48044317960739136f,-0.32796353101730347f,0.017260095104575157f,-0.21863967180252075f,-0.27088475227355957f,4.220706462860107f}, -{-0.0029379886109381914f,0.33974209427833557f,0.33083590865135193f,0.5799209475517273f,-0.14358049631118774f,2.112962245941162f,-1.0051652193069458f,-0.3003333508968353f,1.0414808988571167f,-3.036134958267212f,1.8724721670150757f,-0.2890920341014862f,-1.8007065057754517f,0.36012205481529236f,0.048003822565078735f,-0.8006166815757751f}, -{-0.7076373100280762f,0.35453304648399353f,-0.2619188725948334f,0.9258419275283813f,0.041274964809417725f,0.22418546676635742f,-1.0241522789001465f,0.0019084513187408447f,0.8420276641845703f,-2.4723517894744873f,-0.05607831850647926f,-0.3197441101074219f,0.025936203077435493f,-0.44141992926597595f,-0.4068881571292877f,-1.219604253768921f}, +{0.5753528475761414f,0.003037691116333008f,-0.061119019985198975f,0.9859564900398254f,0.05568113923072815f,-0.15551023185253143f,-1.0265138149261475f,-0.08465918898582458f,1.1227432489395142f,0.0048825982958078384f,0.3230370283126831f,0.3004753887653351f,0.31284230947494507f,-0.5756801962852478f,0.08652284741401672f,-0.855650007724762f}, +{-0.024826720356941223f,-0.38710832595825195f,-0.14085865020751953f,1.2322874069213867f,0.08946844935417175f,-0.0691494569182396f,-2.135308265686035f,0.3963567912578583f,-0.027629083022475243f,0.2515743374824524f,0.08592427521944046f,0.4110986292362213f,-0.5930200815200806f,-0.5239672660827637f,0.27305224537849426f,-2.8295881748199463f}, +{1.1108759641647339f,0.40231046080589294f,-0.25313520431518555f,1.5314010381698608f,0.036378175020217896f,-0.03187068924307823f,-1.6890592575073242f,-0.08570799231529236f,1.3848036527633667f,-0.5586535930633545f,0.3252018392086029f,-0.4229513108730316f,-0.15799948573112488f,-0.21627092361450195f,-0.2544192671775818f,-1.7995922565460205f}, +{-0.017818210646510124f,0.294185608625412f,-0.3519742488861084f,0.022115010768175125f,-0.3015052080154419f,-0.18821308016777039f,-0.06464698165655136f,-0.019414573907852173f,-0.4239131808280945f,0.4000220000743866f,-0.0970444530248642f,0.001658409833908081f,-0.17532514035701752f,0.3993215262889862f,0.15392538905143738f,-0.17922121286392212f}, +{-3.087456703186035f,-0.02554568648338318f,-0.3260969817638397f,-0.44333475828170776f,-0.38453540205955505f,-0.1815117597579956f,0.9104711413383484f,0.12387624382972717f,-0.7149780988693237f,0.16980008780956268f,-1.1905796527862549f,-0.32796353101730347f,-0.8951786756515503f,0.049302369356155396f,-0.27088475227355957f,0.11074401438236237f}, +{0.5263171792030334f,0.33974209427833557f,0.33083590865135193f,1.1615447998046875f,-0.14358049631118774f,-1.7622140645980835f,-1.6714271306991577f,-0.3003333508968353f,1.7242130041122437f,-1.7911338806152344f,2.1776010990142822f,-0.2890920341014862f,-2.0218605995178223f,0.36012205481529236f,0.048003822565078735f,-1.358321189880371f}, +{-0.25820738077163696f,0.35453304648399353f,-0.11379697918891907f,0.24301044642925262f,0.041274964809417725f,-0.3833408057689667f,-0.23701369762420654f,0.0019084513187408447f,0.17138820886611938f,-0.560668408870697f,0.17645809054374695f,-0.3197441101074219f,-0.34869617223739624f,-0.30194157361984253f,-0.4068881571292877f,-0.33665692806243896f}, {-0.14576366543769836f,0.22098979353904724f,-0.13502129912376404f,0.1006976068019867f,0.12987366318702698f,0.11301741003990173f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.24499371647834778f,0.39862415194511414f,0.3811538517475128f,-0.23332324624061584f,0.011877655982971191f,-0.23860150575637817f}, {-0.2709399461746216f,-0.006022721529006958f,0.0457797646522522f,-0.38090792298316956f,-0.03321319818496704f,-0.4148826003074646f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.20706263184547424f,0.3545852601528168f,-0.3647043704986572f,0.42127421498298645f,-0.39804020524024963f,-0.2870290279388428f}, {0.33538809418678284f,0.3494977056980133f,0.3954955041408539f,0.3170476257801056f,0.0033026933670043945f,0.3035760819911957f,-0.18492193520069122f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,0.3952759802341461f,-0.15237495303153992f,0.0820283591747284f,-0.3793424367904663f,0.2430708110332489f,0.24988999962806702f}, -{-0.5453444123268127f,-0.180922269821167f,-0.3113976716995239f,-0.7183730006217957f,-0.37393757700920105f,0.1522810012102127f,0.20593959093093872f,-0.2947862446308136f,-0.8160192370414734f,0.1806139498949051f,-0.21704530715942383f,-0.2837170362472534f,0.47085094451904297f,-0.20227663218975067f,-0.15901821851730347f,-0.3262941837310791f}, -{-0.228446364402771f,0.26506301760673523f,-0.2018718123435974f,-0.7578633427619934f,0.07545611262321472f,-1.9875282049179077f,0.7327920794487f,-0.21416273713111877f,-1.1424970626831055f,2.6302576065063477f,-1.6244035959243774f,-0.25593626499176025f,-2.994697093963623f,0.27643296122550964f,-0.23556609451770782f,0.6344369649887085f}, +{-1.2291382551193237f,-0.180922269821167f,-0.6075759530067444f,-1.6845953464508057f,-0.37393757700920105f,0.12070825695991516f,-0.02958189696073532f,-0.43799540400505066f,-1.426308512687683f,0.18098291754722595f,-0.21991410851478577f,-0.2837170362472534f,0.2398146092891693f,-0.37816184759140015f,-0.15901821851730347f,2.485809087753296f}, +{0.4588259756565094f,0.26506301760673523f,-0.20059140026569366f,0.10840140283107758f,0.07545611262321472f,-0.009657952934503555f,-0.06502822041511536f,-0.21416273713111877f,-0.3103412985801697f,0.2800082862377167f,0.27845215797424316f,-0.25593626499176025f,-0.127348393201828f,0.27643296122550964f,-0.23556609451770782f,0.005459318403154612f}, {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.5298225283622742f,0.3827712833881378f,0.041083551943302155f,1.0262250900268555f,0.29976895451545715f,0.8656129240989685f,-1.3744128942489624f,0.31089308857917786f,0.7874980568885803f,-0.7267993092536926f,1.067516803741455f,-0.11613789200782776f,-1.2103276252746582f,-0.03868785873055458f,0.22754064202308655f,-1.3016085624694824f}, +{1.1311722993850708f,0.3827712833881378f,0.12081471085548401f,1.728609323501587f,0.29976895451545715f,-0.3225926160812378f,-2.0222890377044678f,0.31089308857917786f,1.532584309577942f,-0.49519553780555725f,1.944858431816101f,-0.11613789200782776f,-0.9402145743370056f,-0.020097048953175545f,0.22754064202308655f,-1.9156906604766846f}, }; -const float hout[16] = { -0.23292464017868042f,-0.17660260200500488f,0.09691864997148514f,-1.1401900053024292f,-0.20271384716033936f,-1.3284354209899902f,1.1631301641464233f,0.4165375232696533f,-0.7068449854850769f,1.1665889024734497f,-0.6449853181838989f,0.5489715337753296f,0.7872403264045715f,0.34426531195640564f,-0.480579137802124f,-0.503042995929718f }; - -const float b1[16] = { -0.31192219257354736f,-0.02815360203385353f,1.2719154357910156f,-0.407010555267334f,-0.8632325530052185f,1.2163810729980469f,-0.8388656973838806f,-0.8200502991676331f,-0.2854437828063965f,-1.6282782554626465f,0.5448050498962402f,-0.13274334371089935f,-1.5856122970581055f,-0.621955931186676f,0.6531851887702942f,-0.39145854115486145f }; - -const float b2[16] = { -0.42555102705955505f,-1.3118138313293457f,-0.15831980109214783f,1.015881896018982f,-0.05047077685594559f,-0.13647101819515228f,0.03206629306077957f,-0.14537771046161652f,-0.25401630997657776f,-1.6486880779266357f,-0.22539173066616058f,-2.15936541557312f,0.30588170886039734f,-0.01354543212801218f,-0.6625781655311584f,-0.1546604484319687f }; - -const float b3[16] = { 0.10032525658607483f,-0.1894310712814331f,0.08000034838914871f,-0.35410434007644653f,-0.4563063681125641f,-0.6629799008369446f,1.2059299945831299f,-0.7025120258331299f,0.42028599977493286f,-0.6067396998405457f,-0.33103999495506287f,-0.7519525289535522f,-0.21555250883102417f,0.0008875157218426466f,-0.45795938372612f,0.7625880241394043f }; - -const float bout[1] = { 0.5003952980041504f }; +const float hout[16] = { -0.8755320906639099f,-0.17660260200500488f,-0.8777269721031189f,-0.9667772054672241f,-0.20271384716033936f,0.04433249682188034f,1.199018955230713f,0.3603998124599457f,-1.0205823183059692f,0.5076796412467957f,-1.132434606552124f,0.5489715337753296f,0.6103102564811707f,0.005986696109175682f,-0.480579137802124f,-0.44109928607940674f }; + +const float b1[16] = { -0.31192219257354736f,0.02977970615029335f,1.1881095170974731f,-0.407010555267334f,-0.8632325530052185f,1.1802211999893188f,-0.8388656973838806f,-0.8200502991676331f,-0.2854437828063965f,-1.6282782554626465f,0.12946973741054535f,-0.15634459257125854f,-1.5856122970581055f,-0.6293735504150391f,0.6503711342811584f,-0.3639060854911804f }; + +const float b2[16] = { -0.5213443636894226f,-1.3118138313293457f,0.4097781181335449f,1.3549435138702393f,0.2654208242893219f,-0.10533243417739868f,0.4010799825191498f,0.17212264239788055f,-0.18781042098999023f,-1.6486880779266357f,-0.22539173066616058f,-2.15936541557312f,0.295309841632843f,-0.06378956139087677f,-0.6625781655311584f,0.2849578261375427f }; + +const float b3[16] = { -0.006179598160088062f,-0.1894310712814331f,-0.38112419843673706f,-0.17881307005882263f,-0.4563063681125641f,-0.761942446231842f,0.7420015335083008f,-0.7311421036720276f,-0.1677386313676834f,-0.6010317206382751f,-0.30912360548973083f,-0.7519525289535522f,-0.39950934052467346f,-0.04798943176865578f,-0.45795938372612f,0.6159868836402893f }; + +const float bout[1] = { -0.04572715237736702f }; float valve_ref_pos_buffer[10] = {0.0f}; @@ -1039,7 +1038,7 @@ // input_NN[ind] = torq.sen / 10000.0f * 8.0f + 0.5f; input_NN[ind] = torq.sen / 10000.0f + 0.5f; ind = ind + 1; - for(int i=0; i<numfuture_f; i++) { + for(int i=1; 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])/10000.0f*8.0f+0.5f;