![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: main.cpp
- Revision:
- 208:408f9f15c486
- Parent:
- 207:c70c5a9f17dd
- Child:
- 209:ebc69d6ee6f1
--- a/main.cpp Tue Dec 22 03:13:38 2020 +0000 +++ b/main.cpp Tue Dec 22 04:55:59 2020 +0000 @@ -1,4 +1,4 @@ -//201221_6 +//201222_1 #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] = { - {-1.7807048559188843f,1.6689459085464478f,0.12903714179992676f,2.0055220127105713f,-1.8267242908477783f,1.2847471237182617f,1.0337109565734863f,1.8014789819717407f,-2.1881930828094482f,-1.2942607402801514f,-1.6340450048446655f,-1.9838756322860718f,-0.9214537143707275f,-1.5120413303375244f,-0.2571594715118408f,-1.0778447389602661f}, -{-1.1523692607879639f,0.9744340777397156f,-0.3927857577800751f,0.8196455240249634f,-1.1302025318145752f,0.7565463781356812f,-0.2672702372074127f,0.8042606711387634f,-1.0011622905731201f,-0.5117377042770386f,-1.6575663089752197f,-1.3885278701782227f,0.4483588635921478f,-1.218485713005066f,-0.20967772603034973f,-1.125075340270996f}, -{-1.2220433950424194f,1.048271894454956f,0.36391180753707886f,-0.29188844561576843f,-0.8578075766563416f,1.17359459400177f,0.293302059173584f,0.9377530217170715f,-0.8471015095710754f,-0.2110806405544281f,-0.7737365961074829f,-1.22345769405365f,0.8639165163040161f,-0.7474794387817383f,0.05590221285820007f,-1.6320104598999023f}, -{-0.7830098867416382f,0.557135283946991f,0.39742106199264526f,-0.5443631410598755f,-0.4207443594932556f,0.6247298121452332f,0.1912810355424881f,0.8550886511802673f,-0.15828193724155426f,0.2846245765686035f,1.2633171081542969f,0.030062289908528328f,0.5917699337005615f,-0.5886715054512024f,-0.2961459457874298f,-0.5372797250747681f}, -{1.034437656402588f,-0.5486003756523132f,-0.0051451027393341064f,-1.101850152015686f,0.9744883179664612f,-0.30943065881729126f,0.16204890608787537f,-0.8015485405921936f,1.0945266485214233f,0.7327287793159485f,2.313215732574463f,1.263038992881775f,0.03287762403488159f,0.7425644993782043f,-0.3865056037902832f,0.6784502863883972f}, -{3.701443910598755f,-3.7397303581237793f,0.21773302555084229f,-0.7896745204925537f,3.7201805114746094f,-3.1940155029296875f,-1.4316298961639404f,-3.5664565563201904f,3.2542521953582764f,1.7260537147521973f,0.4765399098396301f,3.269768238067627f,-1.1067615747451782f,3.3516292572021484f,-0.4132833778858185f,1.683417558670044f}, -{-0.06830067187547684f,0.04210755601525307f,-0.2501986622810364f,-4.3639726638793945f,-0.28858399391174316f,1.153104543685913f,0.006025615613907576f,-0.27903494238853455f,0.16336610913276672f,-0.17656497657299042f,6.054398536682129f,0.18550580739974976f,-0.05897205322980881f,0.5009920001029968f,-0.15618428587913513f,0.24028104543685913f}, -{-0.24243921041488647f,-0.3259289562702179f,-0.26619744300842285f,4.218647480010986f,-1.4108608961105347f,-1.9161746501922607f,3.456289291381836f,0.06387022137641907f,2.338621139526367f,0.11661907285451889f,2.5753769874572754f,2.91559100151062f,-0.08889052271842957f,0.9202753901481628f,0.04303058981895447f,-1.99177086353302f}, -{0.10272776335477829f,-0.0051670861430466175f,0.10248100757598877f,0.5276259183883667f,-0.09526387602090836f,-0.05263286828994751f,-9.120331764221191f,-0.9846327304840088f,-1.4346109628677368f,0.3423337936401367f,-1.4380583763122559f,-2.192056655883789f,5.739664554595947f,0.9945151805877686f,-0.30555272102355957f,-0.9550818800926208f}, -{-0.1298130452632904f,-0.844933032989502f,0.18462657928466797f,-2.0697882175445557f,0.3367975950241089f,-0.7679920792579651f,5.008863925933838f,0.6838765144348145f,0.9928942322731018f,-0.380719393491745f,-0.3328202962875366f,-1.3550094366073608f,0.7970038056373596f,0.38919582962989807f,0.3484981060028076f,0.40652960538864136f}, -{0.10495489835739136f,-0.15649040043354034f,0.37182438373565674f,-0.5165225863456726f,-0.030094584450125694f,0.27722814679145813f,0.7723641991615295f,0.1589910387992859f,0.10829687118530273f,0.01703939028084278f,-0.4294162094593048f,-0.8883196711540222f,-0.6225217580795288f,0.10884921252727509f,0.26688337326049805f,0.08329744637012482f}, -{-0.20337620377540588f,-0.09397348016500473f,-0.40320003032684326f,0.049671273678541183f,0.2552013695240021f,0.11166784167289734f,-0.18708603084087372f,-0.3583597242832184f,0.03445921465754509f,0.3062646687030792f,-0.052852533757686615f,-0.04729709401726723f,-0.7603814005851746f,0.011429191567003727f,0.10493969917297363f,-0.376788467168808f}, -{-0.02498585171997547f,0.028086746111512184f,0.19847965240478516f,0.2456793189048767f,0.05428092181682587f,0.2613365054130554f,-0.268947958946228f,-0.08100102096796036f,0.10430614650249481f,-0.1923302263021469f,-0.2395259290933609f,-0.04933980852365494f,-0.3201068937778473f,0.07187950611114502f,-0.22268100082874298f,-0.007916470989584923f}, -{-0.014006747864186764f,-0.08647304028272629f,0.4127817749977112f,0.05004005506634712f,-0.18516305088996887f,-0.08793098479509354f,0.14798147976398468f,-0.28873950242996216f,-0.25092774629592896f,-0.0990142896771431f,-0.10142865031957626f,0.012985054403543472f,-0.5933491587638855f,-0.08747518062591553f,0.0479682981967926f,-0.011664015240967274f}, -{-0.010867358185350895f,0.06461263447999954f,0.20282304286956787f,-0.10735680162906647f,0.10550501942634583f,-0.27693039178848267f,-0.2836221754550934f,0.0728113129734993f,-0.20681768655776978f,-0.03470535948872566f,-0.09182877838611603f,-0.08869069069623947f,-0.21124303340911865f,0.14233484864234924f,0.0668090283870697f,-0.4361487329006195f}, -{0.014389474876224995f,-0.04808990657329559f,-0.40439701080322266f,-0.05400414019823074f,-0.10591600090265274f,-0.501040518283844f,-0.07977351546287537f,-0.16353163123130798f,-0.2610345184803009f,-0.06855349242687225f,-0.12435207515954971f,0.10868765413761139f,-0.03643392398953438f,-0.19367268681526184f,-0.08245879411697388f,-0.14660458266735077f}, -{-0.01534365490078926f,-0.03290284425020218f,0.16706281900405884f,0.221749410033226f,-0.05399798974394798f,-1.1545442342758179f,0.09171648323535919f,-0.03219394013285637f,-0.860437273979187f,0.023272309452295303f,0.1099458560347557f,-0.08201001584529877f,-0.3159564137458801f,0.20682013034820557f,0.29427415132522583f,0.6272814273834229f}, + {-1.531315803527832f,1.2212283611297607f,0.12903714179992676f,0.033053863793611526f,-1.9360125064849854f,1.1332967281341553f,-0.17472904920578003f,1.3420113325119019f,-1.7463396787643433f,-0.5584802031517029f,-0.23686346411705017f,-0.5168386697769165f,-0.26205670833587646f,-0.4597594439983368f,-0.2571594715118408f,-0.39345231652259827f}, +{-0.9951635599136353f,0.6018988490104675f,-0.3927857577800751f,-0.20766094326972961f,-1.3627490997314453f,0.46893689036369324f,-0.4054011106491089f,0.4332157373428345f,-1.3325988054275513f,0.20551945269107819f,-0.27367573976516724f,-0.2924371659755707f,0.2375551164150238f,-0.7413603663444519f,-0.20967772603034973f,-0.06330179423093796f}, +{-1.0328309535980225f,0.7385027408599854f,0.36391180753707886f,-0.4938513934612274f,-0.930567741394043f,0.6501141786575317f,0.2872133255004883f,0.6771348118782043f,-1.2069311141967773f,-0.23835322260856628f,-0.34757405519485474f,-0.21662749350070953f,-0.0006922125467099249f,-0.08951175212860107f,0.05590221285820007f,-0.25968170166015625f}, +{-0.6548565030097961f,0.546489417552948f,0.39742106199264526f,0.23345571756362915f,-0.29420894384384155f,0.2337246835231781f,-0.11584559082984924f,0.9318102598190308f,-0.0883297249674797f,-0.6616360545158386f,0.09624255448579788f,0.3126813471317291f,-0.16282400488853455f,-0.017444096505641937f,-0.2961459457874298f,0.11506715416908264f}, +{0.9441654086112976f,-0.10412901639938354f,-0.0051451027393341064f,0.26189932227134705f,1.0599961280822754f,-0.13313990831375122f,0.1294034719467163f,-0.30942144989967346f,1.4052238464355469f,-0.5124068260192871f,0.34818795323371887f,0.18164508044719696f,-0.06639711558818817f,0.37773770093917847f,-0.3865056037902832f,-0.12323042005300522f}, +{3.354203939437866f,-3.036414384841919f,0.21773302555084229f,0.3865581452846527f,3.330247640609741f,-2.271965503692627f,0.16514194011688232f,-3.0577595233917236f,2.928663492202759f,1.7984576225280762f,-0.24734951555728912f,0.5408426523208618f,-0.2629496455192566f,0.958703875541687f,-0.4132833778858185f,-0.027743525803089142f}, +{-0.5307519435882568f,-0.06301706284284592f,-0.2501986622810364f,-0.6607210636138916f,-0.8369278311729431f,6.047488212585449f,0.06014183163642883f,-0.7298669815063477f,1.9458750486373901f,-5.044135570526123f,0.150299072265625f,0.15599359571933746f,-0.1737729012966156f,0.3276987075805664f,-0.15618428587913513f,-0.6801899075508118f}, +{-0.7901907563209534f,0.8988741636276245f,-0.26619744300842285f,0.025165753439068794f,-0.9365068674087524f,1.2295559644699097f,-0.17925891280174255f,0.7470439076423645f,-0.416498064994812f,-0.8755210638046265f,0.10463108122348785f,-0.5030022263526917f,0.3709419369697571f,-0.0012537387665361166f,0.04303058981895447f,-0.0186854749917984f}, +{0.6941404342651367f,-1.2099668979644775f,0.10248100757598877f,-0.4085768461227417f,-0.12387870997190475f,-1.1924992799758911f,-0.07246989011764526f,-1.665202021598816f,-1.7817565202713013f,2.3899729251861572f,-0.2979821562767029f,-0.18418405950069427f,0.2288188338279724f,0.5329566597938538f,-0.30555272102355957f,0.16609734296798706f}, +{-0.0660996288061142f,-1.2423714399337769f,0.18462657928466797f,-0.1813543140888214f,-0.2947060763835907f,-1.5129367113113403f,-0.2990540862083435f,-0.6701622605323792f,-1.3908182382583618f,1.1899564266204834f,-0.008929966948926449f,-1.0560450553894043f,0.3720368444919586f,0.07663324475288391f,0.3484981060028076f,-0.012029101140797138f}, +{0.28911903500556946f,-0.4749276638031006f,0.37182438373565674f,0.1734911948442459f,-0.4653550684452057f,-1.7457287311553955f,-0.20339298248291016f,-0.26837489008903503f,-1.042394757270813f,1.0918513536453247f,0.3477185070514679f,-0.7686545252799988f,-0.06686156243085861f,0.17347773909568787f,0.26688337326049805f,-0.3890383839607239f}, +{-0.28575125336647034f,-0.6693267226219177f,-0.40320003032684326f,-0.08735401183366776f,0.007286196108907461f,-1.8315372467041016f,0.1533789038658142f,0.022309979423880577f,-0.09538807719945908f,1.0808922052383423f,-0.41482847929000854f,-0.11989966779947281f,0.14430087804794312f,0.10769995301961899f,0.10493969917297363f,-0.21339687705039978f}, +{-0.10142430663108826f,-0.15534204244613647f,0.19847965240478516f,0.07757232338190079f,0.2527172267436981f,-1.3158543109893799f,-0.2404318004846573f,-0.01686050556600094f,0.036769624799489975f,0.4244236648082733f,-0.10963847488164902f,-0.3532784879207611f,0.09164450317621231f,0.0926702693104744f,-0.22268100082874298f,-0.5550960302352905f}, +{-0.23490804433822632f,0.05692242085933685f,0.4127817749977112f,-0.1364835798740387f,-0.17221158742904663f,-1.303916096687317f,-0.32001304626464844f,-0.298613041639328f,0.009885499253869057f,0.18572311103343964f,-0.1955135613679886f,-0.24695760011672974f,-0.31312841176986694f,-0.030824929475784302f,0.0479682981967926f,-0.07853478193283081f}, +{0.0065980833023786545f,0.021907925605773926f,0.20282304286956787f,0.04053569957613945f,0.3040331304073334f,-0.883127748966217f,0.04202890396118164f,0.18883246183395386f,0.227486252784729f,0.4307411313056946f,-0.27989521622657776f,-0.530148983001709f,0.10311337560415268f,-0.05951927602291107f,0.0668090283870697f,0.023457825183868408f}, +{-0.1333623081445694f,-0.27137404680252075f,-0.40439701080322266f,-0.10286334156990051f,-0.0770445168018341f,-0.4851205348968506f,-0.15568238496780396f,0.0012438585981726646f,0.2879120707511902f,0.1734604686498642f,-0.4743227958679199f,-0.2902921438217163f,-0.27164894342422485f,-0.008808882907032967f,-0.08245879411697388f,0.11585502326488495f}, +{-0.2022102028131485f,-0.27882087230682373f,0.16706281900405884f,0.07617825269699097f,-0.07703878730535507f,-0.6978834867477417f,-0.041414469480514526f,0.021906333044171333f,0.3641758859157562f,0.34097692370414734f,-0.35401779413223267f,-0.0123513825237751f,0.11138944327831268f,0.3358703553676605f,0.29427415132522583f,-0.004698142409324646f}, }; const float h2[16][16] = { - {0.7309545874595642f,2.151273012161255f,-0.06966331601142883f,3.99920654296875f,-0.21907491981983185f,0.9820910096168518f,-0.321774959564209f,-0.1541939675807953f,-0.6056634783744812f,-0.31396952271461487f,-5.851577281951904f,-0.4920310080051422f,0.07214775681495667f,-5.805349349975586f,-1.6171064376831055f,-9.397863388061523f}, -{2.0131070613861084f,-0.7731248736381531f,0.057057321071624756f,0.2953585386276245f,-0.35503754019737244f,-0.20023292303085327f,-0.8265648484230042f,-0.38386690616607666f,-0.5089491605758667f,0.24221304059028625f,-2.799264907836914f,-0.633624792098999f,0.24585041403770447f,3.1690449714660645f,0.28463271260261536f,2.2423183917999268f}, + {-2.799281358718872f,0.16712452471256256f,-0.06966331601142883f,1.4672540426254272f,-0.21907491981983185f,1.5811668634414673f,-0.053468767553567886f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,-0.12140687555074692f,-2.6124908924102783f,-0.0548873208463192f,-4.641530513763428f,-0.8119884133338928f,-2.656848669052124f}, +{0.29130902886390686f,-0.44502395391464233f,0.057057321071624756f,-0.4548104703426361f,-0.35503754019737244f,-2.724472999572754f,-0.7551739811897278f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-1.4328194856643677f,-1.4679527282714844f,0.2138679027557373f,-1.4188612699508667f,-0.4723600447177887f,-1.7820600271224976f}, {-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.48315155506134033f,-0.4596182107925415f,-0.2894435524940491f,0.0005396368214860559f,0.08946844935417175f,0.8561189770698547f,-0.20108729600906372f,0.14678244292736053f,0.13011200726032257f,0.21811752021312714f,0.3669376075267792f,-0.05784331262111664f,-0.6287853717803955f,0.02621796727180481f,0.7304993271827698f,-0.23172836005687714f}, -{0.7272628545761108f,3.0807886123657227f,-0.25313520431518555f,2.347088098526001f,0.036378175020217896f,0.5192092657089233f,-0.7328973412513733f,-0.3538326025009155f,-0.1975555270910263f,-0.5459282398223877f,-2.4163146018981934f,-0.8545426726341248f,-0.11603832989931107f,-1.5216647386550903f,0.5095298886299133f,0.1498836874961853f}, -{-0.37124961614608765f,-0.014504355378448963f,-0.3519742488861084f,0.03143687918782234f,-0.3015052080154419f,0.36655113101005554f,-0.8719632625579834f,-0.051551785320043564f,-0.37846317887306213f,0.3579089343547821f,0.07659144699573517f,-0.2013002187013626f,-0.3928574025630951f,0.14929711818695068f,-0.10681967437267303f,-0.5804470777511597f}, -{-0.24781104922294617f,-2.008772373199463f,-0.3260969817638397f,0.9649527072906494f,-0.38453540205955505f,0.19253592193126678f,0.21375620365142822f,0.05278942734003067f,-0.27344658970832825f,-0.044374242424964905f,1.1179603338241577f,-0.5158692002296448f,-0.33838868141174316f,0.3787102997303009f,0.10057923197746277f,-4.920621871948242f}, -{1.331210970878601f,0.6711344718933105f,0.33083590865135193f,-2.427623987197876f,-0.14358049631118774f,0.3254135847091675f,-0.5694573521614075f,-0.5514112710952759f,0.08220036327838898f,-0.5410969853401184f,0.5523853898048401f,-0.6491090655326843f,-0.5427494645118713f,0.6210233569145203f,1.4435174465179443f,3.0532093048095703f}, -{0.6923806071281433f,0.14226312935352325f,-0.11379697918891907f,-0.213966503739357f,0.041274964809417725f,-0.26083076000213623f,-0.43745747208595276f,-0.03160077705979347f,-0.055766090750694275f,-0.5995153784751892f,0.6991217732429504f,-0.6461898684501648f,-0.5607666969299316f,-0.3602465093135834f,-0.4945257604122162f,-0.3155979812145233f}, -{-0.012218165211379528f,0.41092512011528015f,-0.13502129912376404f,0.19783270359039307f,0.12987366318702698f,0.5547798275947571f,0.04467938840389252f,-0.5653203725814819f,-0.13619378209114075f,0.16938945651054382f,1.05582594871521f,0.029812706634402275f,0.11738216876983643f,-0.5045449137687683f,0.07079683244228363f,-0.23086929321289062f}, -{-0.8900190591812134f,0.13081036508083344f,0.0457797646522522f,0.05137140303850174f,-0.03321319818496704f,-1.834595799446106f,-0.07800599187612534f,-0.20421427488327026f,-0.050184011459350586f,-0.02981780469417572f,-0.6498560905456543f,0.10084924101829529f,-0.6784595251083374f,-0.00616350956261158f,0.03268835321068764f,-2.2103617191314697f}, -{1.1047340631484985f,-0.4461626708507538f,0.3954955041408539f,-0.18519015610218048f,0.0033026933670043945f,-0.568597137928009f,-0.6717859506607056f,-0.37041208148002625f,0.17378418147563934f,-0.532118558883667f,1.9197595119476318f,-0.5332373976707458f,0.0061597698368132114f,-1.0825083255767822f,1.2936487197875977f,-1.5592758655548096f}, -{0.5075520277023315f,-1.9176207780838013f,-0.15798500180244446f,0.5718668699264526f,-0.37393757700920105f,0.04280955716967583f,-0.07716835290193558f,-0.38613834977149963f,-0.30612289905548096f,0.24769547581672668f,-0.07304560393095016f,-0.5915866494178772f,0.25011423230171204f,0.2782946825027466f,-0.4410281479358673f,-0.37290114164352417f}, -{-1.362764596939087f,-0.09321783483028412f,-0.2018718123435974f,0.05907825008034706f,0.07545611262321472f,-0.21409748494625092f,-0.5371257662773132f,-0.29936912655830383f,-0.2887822687625885f,0.143598735332489f,2.3939638137817383f,-0.6236295104026794f,-0.5248929262161255f,-1.1398392915725708f,-0.633877158164978f,-1.280221700668335f}, +{0.04097104072570801f,-0.3449876606464386f,-0.2894435524940491f,0.29498887062072754f,0.08946844935417175f,0.24791251122951508f,-0.3380562663078308f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.24438774585723877f,0.33562910556793213f,-0.5284942984580994f,-0.1639743596315384f,0.2636021077632904f,0.10835816711187363f}, +{-1.542779564857483f,0.5664149522781372f,-0.25313520431518555f,1.1262837648391724f,0.036378175020217896f,0.7033790349960327f,-0.5617905259132385f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-0.3923259973526001f,-2.222499132156372f,-0.11098752915859222f,-3.194650650024414f,-0.8124714493751526f,-4.139412879943848f}, +{0.22803305089473724f,0.16566713154315948f,-0.3519742488861084f,-0.3744398057460785f,-0.3015052080154419f,0.008913038298487663f,-0.6454094052314758f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,0.0011918706586584449f,0.1011725664138794f,-0.33286166191101074f,0.27339494228363037f,0.10018529742956161f,-2.3298583030700684f}, +{-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}, +{2.628514289855957f,-0.2776978015899658f,0.33083590865135193f,0.8097639679908752f,-0.14358049631118774f,-3.2291982173919678f,-0.2805100381374359f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,-0.19844326376914978f,-4.452375888824463f,-0.45537886023521423f,-2.5229427814483643f,0.28838008642196655f,0.604862630367279f}, +{-1.270782232284546f,0.6037241220474243f,-0.11379697918891907f,3.171149253845215f,0.041274964809417725f,0.7873656153678894f,-0.34019649028778076f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-3.5276150703430176f,1.4744601249694824f,-0.49409180879592896f,-0.061534080654382706f,-1.2860485315322876f,-3.6122732162475586f}, +{-0.3107764720916748f,0.3795167803764343f,-0.13502129912376404f,-6.376976013183594f,0.12987366318702698f,0.16281241178512573f,-0.22298330068588257f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,-0.35801035165786743f,-0.2300788313150406f,0.1270095258951187f,0.2384432852268219f,-0.4074200689792633f,-0.6243495941162109f}, +{-0.2787967026233673f,-0.001280608936212957f,0.0457797646522522f,-0.3553522527217865f,-0.03321319818496704f,-0.4252603352069855f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.21523112058639526f,0.3545852601528168f,-0.3647043704986572f,0.411028116941452f,-0.3983408212661743f,-0.2770851254463196f}, +{0.3964467942714691f,0.35733214020729065f,0.3954955041408539f,0.3909227252006531f,0.0033026933670043945f,0.11897452175617218f,-0.4904947280883789f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-0.16489219665527344f,-0.33246710896492004f,-0.04149547591805458f,-0.6514362692832947f,0.22790876030921936f,-0.1729116290807724f}, +{-0.2808303236961365f,-0.21577134728431702f,-0.15798500180244446f,0.3731594383716583f,-0.37393757700920105f,0.36395198106765747f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.11440901458263397f,-0.2837170362472534f,0.41839322447776794f,-0.011972751468420029f,-0.12294908612966537f,0.10422277450561523f}, +{-0.5422749519348145f,0.41037851572036743f,-0.2018718123435974f,0.09328148514032364f,0.07545611262321472f,0.2041396200656891f,-0.4444405138492584f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.06249627470970154f,-0.6804867386817932f,-0.29067087173461914f,-0.441444456577301f,-0.3149453103542328f,-0.46726182103157043f}, {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.06504782289266586f,0.6117428541183472f,0.12081471085548401f,0.10449739545583725f,0.29976895451545715f,-0.11395322531461716f,-0.5163652896881104f,0.10284116864204407f,-0.4943521022796631f,-0.20044124126434326f,0.06053680181503296f,-0.23671367764472961f,-0.20789912343025208f,0.13695281744003296f,0.36073845624923706f,0.7399912476539612f}, +{-0.20526202023029327f,0.25847819447517395f,0.12081471085548401f,-0.2155798226594925f,0.29976895451545715f,-0.04457804560661316f,-0.12792883813381195f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.26056283712387085f,-0.17489492893218994f,-0.32397574186325073f,0.021401749923825264f,0.303682804107666f,-0.07271138578653336f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-1.5740747451782227f,-0.323828786611557f,-0.5008583664894104f,0.17446325719356537f,-0.09201639890670776f,0.1418231576681137f,0.2528802454471588f,-1.6159125566482544f,-0.26451337337493896f,-0.3563109040260315f,0.23585517704486847f,0.15575222671031952f,-0.19184747338294983f,-0.7520464658737183f,0.1434362381696701f}, -{0.047732532024383545f,-0.3546774983406067f,-1.0392972230911255f,-0.3922642469406128f,-0.21302993595600128f,0.7482725381851196f,-0.45127004384994507f,-0.04979252815246582f,1.8785374164581299f,-0.11562127619981766f,0.5300207138061523f,0.37874656915664673f,0.9194919466972351f,0.23528820276260376f,1.6635736227035522f,-0.017451908439397812f}, + {-0.36079341173171997f,-0.6086024641990662f,2.179344654083252f,-0.5495796799659729f,-0.139645516872406f,-0.42361360788345337f,0.3332441747188568f,0.3036012351512909f,-0.5051015019416809f,2.4959444999694824f,-0.1488727182149887f,1.460726261138916f,0.32145416736602783f,-0.73075270652771f,0.10370074957609177f,0.023498691618442535f}, +{0.047732532024383545f,0.26677238941192627f,-0.09477218240499496f,-0.2789490222930908f,-0.23424319922924042f,0.029373519122600555f,-0.3198729455471039f,0.06247803568840027f,0.29579290747642517f,-0.1780138611793518f,0.4144817292690277f,-0.3128277659416199f,-0.32693424820899963f,0.39209941029548645f,-0.4388388395309448f,-0.5931907892227173f}, {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.5094926357269287f,0.8742960095405579f,-0.5943590998649597f,-1.4194984436035156f,0.38033169507980347f,0.04597592353820801f,-0.08955316245555878f,-0.7320433259010315f,-0.5997412204742432f,-1.8656071424484253f,1.0169402360916138f,1.6738009452819824f,1.0390515327453613f,-0.166262686252594f,0.3006783425807953f}, +{-0.30922991037368774f,-1.0693680047988892f,-0.9863292574882507f,-0.5392837524414062f,-1.6881351470947266f,-0.9114060997962952f,0.20021501183509827f,0.07002416253089905f,-0.5644193887710571f,0.34156420826911926f,0.04209338501095772f,1.9385147094726562f,-2.372239828109741f,-0.04623681306838989f,0.16066716611385345f,-2.871879816055298f}, {-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.6622586846351624f,-1.0194721221923828f,-0.05452714487910271f,0.44912827014923096f,0.7577368021011353f,-0.23262421786785126f,-0.0025911128614097834f,0.3207937479019165f,-0.3428647220134735f,-0.08751271665096283f,-0.8736635446548462f,0.03225252777338028f,-0.28729477524757385f,-0.20754165947437286f,-1.7328381538391113f}, -{0.4110594093799591f,0.12106796354055405f,-0.13195820152759552f,0.37246426939964294f,0.10733360052108765f,-0.17651203274726868f,-0.08670487999916077f,-0.25336313247680664f,-0.5406959056854248f,-0.06259563565254211f,-0.1344406008720398f,0.16596482694149017f,0.33039313554763794f,-0.19485843181610107f,0.2149786353111267f,-0.36324015259742737f}, -{-0.40892091393470764f,0.07406841963529587f,-0.3659348487854004f,0.22920988500118256f,0.3122047781944275f,0.050250452011823654f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,0.08005775511264801f,-0.32234156131744385f,-0.26005738973617554f,0.17401346564292908f,-0.023042351007461548f}, -{0.10697010159492493f,-0.12228584289550781f,-0.5411396622657776f,0.21184906363487244f,-0.39521756768226624f,0.06677637994289398f,-0.1382003128528595f,0.3493293821811676f,-0.360889196395874f,-0.3875247836112976f,0.42142823338508606f,-0.17219778895378113f,-0.15024897456169128f,0.08757764101028442f,0.3412953019142151f,-0.06898030638694763f}, -{0.2847062647342682f,0.04198870062828064f,0.2324065864086151f,0.36562982201576233f,0.1762201339006424f,0.386137455701828f,0.2430230677127838f,0.2909286320209503f,-0.5064769387245178f,0.18043199181556702f,0.46689876914024353f,-0.37689411640167236f,0.08963057398796082f,-0.01978110894560814f,0.13965728878974915f,0.09183362871408463f}, -{0.15459725260734558f,0.32663199305534363f,-0.43264493346214294f,-0.25717872381210327f,-0.30865761637687683f,1.1349443197250366f,-0.09015364944934845f,-0.284537672996521f,1.3302375078201294f,-0.4318275451660156f,1.0774149894714355f,-0.8313512206077576f,-0.18751198053359985f,-0.5230942964553833f,1.275456428527832f,0.7793862819671631f}, -{-0.408692330121994f,0.2269023060798645f,0.09413175284862518f,0.0553261861205101f,0.0745026022195816f,-0.1746007651090622f,0.03285527229309082f,0.38763079047203064f,-0.3476070761680603f,-0.25883403420448303f,0.12809070944786072f,0.15931619703769684f,-0.5422877073287964f,-0.23907442390918732f,-0.2036581188440323f,0.08299102634191513f}, -{-0.2991822361946106f,0.31300684809684753f,-0.06969411671161652f,-0.05932474136352539f,0.1076110452413559f,0.1017603948712349f,-0.11253207921981812f,0.34576353430747986f,0.21113571524620056f,-0.35770976543426514f,-0.044228196144104004f,-0.2926151156425476f,0.14566898345947266f,-0.1921490579843521f,0.21915902197360992f,-0.0008085406152531505f}, -{-0.2675279378890991f,0.7427994012832642f,0.6347403526306152f,-0.1958807110786438f,1.2644003629684448f,0.8112095594406128f,-0.34373316168785095f,-0.6245776414871216f,0.7729313373565674f,-0.863515317440033f,-4.969630718231201f,-3.0855796337127686f,0.6991016268730164f,-2.170722007751465f,1.4726535081863403f,0.4425199329853058f}, -{-0.015470266342163086f,-0.6235769391059875f,1.1404080390930176f,-0.001713637262582779f,-0.5860978960990906f,-0.9973914623260498f,-0.134099543094635f,-0.16727054119110107f,-1.2199089527130127f,-0.5800305604934692f,0.6144692897796631f,0.8666657209396362f,-0.06915939599275589f,0.4561276137828827f,-0.6159982681274414f,-0.5167397856712341f}, -{0.1863725483417511f,0.8390569686889648f,0.3526930809020996f,-0.5944302678108215f,-0.08186009526252747f,1.2177678346633911f,0.04860696196556091f,0.18485434353351593f,1.054297924041748f,0.3378079831600189f,-1.4593759775161743f,1.966334581375122f,-0.048501357436180115f,0.6259897947311401f,-1.0965923070907593f,-0.9554581046104431f}, +{-0.37449589371681213f,-2.4325759410858154f,-0.9931590557098389f,-0.044506754726171494f,-0.3293914198875427f,0.49045220017433167f,-0.18732719123363495f,0.22384825348854065f,-0.8132121562957764f,-0.7270507216453552f,-0.12444746494293213f,-3.9139862060546875f,-0.33186227083206177f,0.6893238425254822f,1.089476466178894f,-0.2878223657608032f}, +{0.4110594093799591f,0.06593003123998642f,-0.10276640951633453f,0.37246426939964294f,0.24670250713825226f,-0.24950674176216125f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.3990647792816162f,-0.06628382951021194f,0.04818518087267876f,-0.1465446799993515f}, +{-0.40892091393470764f,0.043769627809524536f,-0.3867315948009491f,0.25968697667121887f,0.3424709737300873f,-0.051169753074645996f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.2742875814437866f,-0.36560842394828796f,0.07994696497917175f,0.005298197269439697f}, +{0.10697010159492493f,-0.12228584289550781f,-0.37870171666145325f,0.21184906363487244f,-0.37222859263420105f,-0.17138728499412537f,-0.1382003128528595f,0.3493293821811676f,-0.360889196395874f,-0.3875247836112976f,0.42142823338508606f,-0.3482915461063385f,-0.3289247751235962f,-0.2186824083328247f,0.09620395302772522f,-0.06898030638694763f}, +{0.2847062647342682f,0.018552124500274658f,0.11435768008232117f,0.36562982201576233f,-0.047046810388565063f,0.30447837710380554f,0.2430230677127838f,0.2909286320209503f,-0.2802048921585083f,0.18043199181556702f,0.41849127411842346f,-0.287167489528656f,0.24394884705543518f,-0.14084559679031372f,-0.10168051719665527f,0.010465055704116821f}, +{0.15459725260734558f,0.3019735515117645f,-0.09361782670021057f,-0.31664907932281494f,-0.57173752784729f,0.012515033595263958f,-0.08742031455039978f,0.05785742402076721f,-0.027446074411273003f,-0.2233911156654358f,0.1268840730190277f,-0.30447322130203247f,0.2713693380355835f,-0.5980722308158875f,0.432270348072052f,0.3365720510482788f}, +{-0.408692330121994f,-1.0179634094238281f,0.9107185006141663f,0.0922636091709137f,-0.218761146068573f,-0.7093446850776672f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,0.016747837886214256f,0.04190991446375847f,-0.6101645827293396f,-0.7766126394271851f,-0.607116162776947f,1.0755422115325928f,0.1505926102399826f}, +{-0.2991822361946106f,0.2430352121591568f,0.07094341516494751f,-0.05932474136352539f,0.22252558171749115f,0.09018097072839737f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.15250977873802185f,-0.2781256139278412f,0.21565958857536316f,-0.032620642334222794f}, +{-0.2675279378890991f,2.295318365097046f,0.6247335076332092f,-0.09322933852672577f,-0.1486014425754547f,0.2098596841096878f,-0.32875844836235046f,-0.31893211603164673f,-0.8386218547821045f,-3.31750750541687f,-0.6547098159790039f,-0.7874006628990173f,-0.16551893949508667f,-0.09824063628911972f,1.3998380899429321f,0.12306978553533554f}, +{-0.015470266342163086f,0.2835947275161743f,0.23104417324066162f,0.20350171625614166f,0.1442382037639618f,-0.4490983188152313f,0.05196094512939453f,-0.008358269929885864f,-0.4102620780467987f,-0.3847755491733551f,0.13179203867912292f,-0.11511552333831787f,0.58179771900177f,-1.130089282989502f,1.005839467048645f,0.20838046073913574f}, +{0.1863725483417511f,-0.3666064739227295f,-1.1749751567840576f,-0.6089721322059631f,0.098382867872715f,0.8263962864875793f,0.04860696196556091f,0.17769548296928406f,-0.017368249595165253f,-1.8929333686828613f,-0.3929237127304077f,-9.379828453063965f,0.45098361372947693f,-1.4723246097564697f,-1.9610977172851562f,-0.027309749275445938f}, }; -const float hout[16] = { 0.45773375034332275f,0.15879979729652405f,-0.15007324516773224f,0.08761820942163467f,-0.1611965000629425f,0.16267047822475433f,-0.06551695615053177f,0.03275502473115921f,-0.15672892332077026f,-0.04369736090302467f,-0.10987479984760284f,-0.15064367651939392f,-0.1091320589184761f,0.20960037410259247f,0.15906164050102234f,-0.14601188898086548f }; - -const float b1[16] = { 0.5291942954063416f,0.8617457151412964f,-1.7145336866378784f,0.9322654604911804f,0.8106487393379211f,0.682939887046814f,0.13172881305217743f,0.8984912633895874f,-0.38992229104042053f,-0.7498130798339844f,-2.8195302486419678f,1.0033252239227295f,-1.7225804328918457f,-1.1827361583709717f,-1.087764859199524f,2.699277400970459f }; - -const float b2[16] = { -0.5746859908103943f,-0.9516815543174744f,-1.4564176797866821f,-0.4528921842575073f,-0.6939148902893066f,0.13526339828968048f,-0.04827849194407463f,-0.5930274128913879f,-1.3676362037658691f,-2.043384313583374f,0.7014528512954712f,0.2180779129266739f,-0.2795608341693878f,1.8895725011825562f,0.23002779483795166f,0.8182846903800964f }; - -const float b3[16] = { -1.963319182395935f,0.9186627268791199f,-0.7716829776763916f,-0.32962435483932495f,0.8113220930099487f,0.06901621073484421f,-0.6259682178497314f,-0.8682839870452881f,-0.9259135127067566f,0.08148693293333054f,-0.23981264233589172f,-0.9112514853477478f,-1.277915596961975f,0.45877891778945923f,-1.3907086849212646f,0.797217607498169f }; - -const float bout[1] = { -0.11752435564994812f }; +const float hout[16] = { 0.45773375034332275f,0.2291797697544098f,-0.3173103332519531f,-0.04260948672890663f,-0.02334880642592907f,0.4189964234828949f,0.0030125975608825684f,0.15066689252853394f,-0.2544001638889313f,0.1269427388906479f,0.15506184101104736f,-0.25900861620903015f,-0.398495078086853f,0.18022006750106812f,0.21481767296791077f,-0.42234814167022705f }; + +const float b1[16] = { 0.7194389700889587f,1.7438278198242188f,-1.7145336866378784f,0.31947922706604004f,1.4380247592926025f,1.8047207593917847f,-0.058932315558195114f,1.4295762777328491f,1.0237047672271729f,-0.6756473779678345f,0.5715821385383606f,1.474446177482605f,-0.37206971645355225f,-0.9106371402740479f,-1.087764859199524f,0.8449752330780029f }; + +const float b2[16] = { 0.35840335488319397f,-0.8230704069137573f,-1.4564176797866821f,-0.08832063525915146f,-0.6939148902893066f,0.45191285014152527f,-0.030644390732049942f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,-0.1477353721857071f,0.8669278025627136f,-0.33790263533592224f,1.75452721118927f,-0.16518579423427582f,1.1603200435638428f }; + +const float b3[16] = { -1.963319182395935f,-0.6351005434989929f,0.45000067353248596f,-0.2284822016954422f,-0.28700459003448486f,1.1167820692062378f,-0.45353031158447266f,-0.6562485098838806f,-0.03606545552611351f,0.0329035222530365f,-0.18756742775440216f,-1.2942627668380737f,-1.1204206943511963f,0.4729367792606354f,-1.0672776699066162f,-0.5879763960838318f }; + +const float bout[1] = { -0.4794664680957794f }; /////////////////////////////////////////////////////////////////////////////////////////////RL float input_RL[num_input_RL] = { 0.0f }; @@ -1032,13 +1032,16 @@ // } for(int i=0; i<numpast_f; i++) { - input_NN[ind] = f_past[time_interval*i] / 10000.0f * 8.0f + 0.5f; +// input_NN[ind] = f_past[time_interval*i] / 10000.0f * 8.0f + 0.5f; + input_NN[ind] = f_past[time_interval*i] / 10000.0f + 0.5f; ind = ind + 1; } - input_NN[ind] = torq.sen / 10000.0f * 8.0f + 0.5f; +// 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++) { - 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 * 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; ind = ind + 1; }