Yeseong Jeong
/
HydraulicControlBoard_Start
20210203
Diff: main.cpp
- Revision:
- 118:af86e883dcb4
- Parent:
- 117:7141c0517b82
- Child:
- 119:8ade52d4bb25
diff -r 7141c0517b82 -r af86e883dcb4 main.cpp --- a/main.cpp Mon Sep 14 01:01:10 2020 +0000 +++ b/main.cpp Mon Sep 14 02:06:21 2020 +0000 @@ -1,4 +1,4 @@ -//200914-1 +//200914-2 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -193,77 +193,77 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-0.12142807245254517f,0.24139092862606049f,0.12024858593940735f,0.3085154592990875f,0.04829372093081474f,1.2526969909667969f,-0.1628284603357315f,0.6061364412307739f,-0.267910897731781f,-0.04973986744880676f,-0.1911298632621765f,-0.38887158036231995f,0.49988213181495667f,-1.4229333400726318f,-0.2396446317434311f,-0.5116663575172424f}, -{-0.26787224411964417f,1.0337470769882202f,-0.36603355407714844f,0.021422112360596657f,-0.5014011859893799f,1.0771880149841309f,-0.3777896761894226f,0.7346654534339905f,-0.0761999636888504f,0.18274518847465515f,-0.22543500363826752f,-0.3866732716560364f,0.26192963123321533f,-1.8653318881988525f,-0.1953967958688736f,-0.35824012756347656f}, -{-0.3649199903011322f,2.0039474964141846f,0.33912619948387146f,-0.30286991596221924f,-1.0894238948822021f,1.1758075952529907f,0.2676515281200409f,1.2353745698928833f,-0.15223653614521027f,0.18469227850437164f,-0.29429805278778076f,-0.5365757346153259f,-0.8037145733833313f,-1.295980453491211f,0.05209478735923767f,-0.708729088306427f}, -{-0.3271692097187042f,2.511580467224121f,0.3703531324863434f,0.3181683123111725f,-1.4615027904510498f,0.5149326324462891f,-0.10795548558235168f,1.5526634454727173f,0.018989790230989456f,0.30758431553840637f,0.11929067969322205f,-0.261160671710968f,-1.5794665813446045f,-1.3073738813400269f,-0.27597576379776f,-0.5264142751693726f}, -{0.10502064228057861f,2.7060790061950684f,-0.004794687032699585f,0.2715914845466614f,-0.8253547549247742f,-0.07427322119474411f,0.12058994174003601f,0.5760945677757263f,0.024899134412407875f,0.13290812075138092f,0.3540651500225067f,-0.5691083669662476f,-1.4506694078445435f,-0.8716362118721008f,-0.36018112301826477f,-0.9119640588760376f}, -{0.28711169958114624f,0.16192179918289185f,0.20290347933769226f,0.2649897634983063f,1.4738454818725586f,-1.9167444705963135f,0.15389427542686462f,-1.7687873840332031f,0.02790655568242073f,0.13918225467205048f,-0.20093469321727753f,-0.27243372797966003f,0.5523987412452698f,0.346793532371521f,-0.38513508439064026f,-0.9214916825294495f}, -{-0.02851574495434761f,-0.014920441433787346f,-0.2331579178571701f,-0.5698776245117188f,-2.577265977859497f,0.45763489603996277f,0.05604562163352966f,-0.49591881036758423f,0.33566102385520935f,0.09226415306329727f,0.16943834722042084f,0.4347386062145233f,-0.5178766250610352f,1.6317278146743774f,-0.14554673433303833f,0.05279579013586044f}, -{-0.06717606633901596f,-0.465599924325943f,-0.24806702136993408f,-0.0450650155544281f,-0.4540198743343353f,0.20081306993961334f,-0.16704979538917542f,-0.4852621257305145f,0.021747436374425888f,0.1351155936717987f,0.12686355412006378f,0.13332262635231018f,-0.08178181201219559f,0.5466933250427246f,0.04009982943534851f,0.20104773342609406f}, -{0.08353191614151001f,0.12965288758277893f,0.09550115466117859f,-0.48718148469924927f,-1.8902322053909302f,0.7541316151618958f,-0.06753402948379517f,-1.4779480695724487f,-0.2544040381908417f,0.3505818843841553f,-0.24833375215530396f,0.5380479097366333f,0.4294835925102234f,1.3326560258865356f,-0.2847418785095215f,0.03970760479569435f}, -{-0.13981781899929047f,-0.10625024139881134f,0.17205187678337097f,-0.23249271512031555f,-1.3487147092819214f,0.9142757058143616f,-0.2786858379840851f,-3.229158878326416f,-0.009385904297232628f,-0.4146665930747986f,0.02100091427564621f,-0.46436652541160583f,0.6732892990112305f,0.5609415769577026f,0.3247623145580292f,-0.4142717719078064f}, -{0.3393472135066986f,0.09702804684638977f,0.34649983048439026f,0.23857329785823822f,2.73547625541687f,-0.39907553791999817f,-0.1895401030778885f,-3.792252540588379f,-0.39965906739234924f,0.049281008541584015f,0.35334426164627075f,-0.6411969065666199f,1.0794868469238281f,-2.0020651817321777f,0.24870619177818298f,-1.115993857383728f}, -{-0.3748171627521515f,0.8643252849578857f,-0.3757385015487671f,0.08618200570344925f,2.734257936477661f,-2.6498494148254395f,0.1429324448108673f,0.49203571677207947f,-0.141113743185997f,0.21069662272930145f,-0.35729312896728516f,-0.6838535666465759f,0.9633643627166748f,-2.497065544128418f,0.09779238700866699f,-1.7793989181518555f}, -{-0.022903213277459145f,-2.7539546489715576f,0.18496140837669373f,-0.186996728181839f,2.6914727687835693f,0.6746928691864014f,-0.22405625879764557f,3.047576904296875f,-0.15934859216213226f,-0.16894760727882385f,-0.07238681614398956f,0.543024480342865f,3.1693813800811768f,0.987379789352417f,-0.2075144499540329f,-0.014834086410701275f}, -{-0.07786494493484497f,-2.749415874481201f,0.38466766476631165f,-0.5341544151306152f,2.2433578968048096f,-0.4204481542110443f,-0.2982172966003418f,1.2824292182922363f,-0.1096724197268486f,-0.20240478217601776f,-0.15225042402744293f,0.8682804703712463f,3.3924448490142822f,0.9276437163352966f,0.04470124840736389f,0.6958062648773193f}, -{0.21788664162158966f,-1.5945311784744263f,0.18900898098945618f,-0.30088552832603455f,-0.28530609607696533f,-0.5853589177131653f,0.03916636109352112f,-0.056540921330451965f,0.2995314598083496f,0.0805741474032402f,-0.2307186722755432f,0.10170888155698776f,1.192001461982727f,0.5563984513282776f,0.062258750200271606f,0.5885801315307617f}, -{-0.011959882453083992f,-1.4559258222579956f,-0.37685394287109375f,-0.3159298598766327f,-2.126816511154175f,-1.454686164855957f,-0.14507901668548584f,-0.7106530666351318f,0.204612597823143f,-0.00584053760394454f,-0.41173696517944336f,-0.2119022011756897f,-0.15877820551395416f,1.5904607772827148f,-0.07684260606765747f,0.2788740396499634f}, -{-0.058610737323760986f,-0.7144426107406616f,0.15568438172340393f,-0.05651647597551346f,-1.4518353939056396f,-1.8445557355880737f,-0.03859376907348633f,-0.4637455940246582f,-0.0419379398226738f,0.07706453651189804f,-0.2995336353778839f,-0.21969130635261536f,-0.523263156414032f,2.2020812034606934f,0.2742314636707306f,0.00965691078454256f}, -{-0.11517839878797531f,-0.6906574964523315f,0.19490453600883484f,-0.29120585322380066f,-1.7446191310882568f,-1.1567761898040771f,-0.336474746465683f,-0.2423131763935089f,-0.3621788024902344f,-0.1193293035030365f,-0.12502431869506836f,-0.26203998923301697f,-0.1624835580587387f,1.081715703010559f,-0.2561379373073578f,0.20621202886104584f}, -{-0.36884963512420654f,-0.44937410950660706f,-0.2776013910770416f,0.09900062531232834f,-0.7989715933799744f,-0.9809821248054504f,0.25546005368232727f,-0.32631823420524597f,-0.3580111265182495f,0.021169280633330345f,-0.36572232842445374f,-0.19767117500305176f,-0.47695401310920715f,1.1555695533752441f,-0.30415377020835876f,-0.09012894332408905f}, -{0.25071007013320923f,-0.1952599585056305f,0.1420871913433075f,-0.3285190165042877f,-0.38145145773887634f,-0.5928182005882263f,-0.13263443112373352f,-0.0661313459277153f,-0.14517231285572052f,0.03796457499265671f,0.1304253190755844f,-0.050921618938446045f,-0.16814474761486053f,1.151236653327942f,0.13351169228553772f,0.41475313901901245f}, -{-0.2756868302822113f,-0.14520925283432007f,-0.07561364769935608f,0.13735783100128174f,0.4525263011455536f,-0.6115483641624451f,0.14428457617759705f,0.3623800277709961f,-0.34202030301094055f,-0.29383227229118347f,-0.3528982698917389f,-0.7736446857452393f,-0.2914334535598755f,1.0565694570541382f,0.019461065530776978f,0.1852876842021942f}, -{-0.33870723843574524f,0.5342617034912109f,0.2631795108318329f,-0.43553003668785095f,0.8691019415855408f,-1.4027477502822876f,0.27224990725517273f,-1.0150458812713623f,-0.05062070116400719f,0.09060279279947281f,0.06758313626050949f,-1.1949976682662964f,-0.4903649687767029f,1.6692051887512207f,0.06011766195297241f,-0.23359167575836182f}, + {-0.9922683835029602f,0.8460232019424438f,0.12024858593940735f,0.42971673607826233f,-0.7831948399543762f,0.9466757774353027f,-0.1628284603357315f,0.8786351084709167f,-0.2666258215904236f,-0.07533060014247894f,-0.1956915706396103f,-0.12716156244277954f,-0.9979654550552368f,-0.24919171631336212f,-0.2396446317434311f,-0.7646004557609558f}, +{-1.0745341777801514f,0.8116288781166077f,-0.36603355407714844f,0.11917760968208313f,-0.7929401397705078f,0.7322802543640137f,-0.3777896761894226f,0.6243390440940857f,-0.0749230682849884f,0.1571505218744278f,-0.23001240193843842f,-0.2895985245704651f,-0.4654836356639862f,-0.7147734761238098f,-0.1953967958688736f,-0.526853084564209f}, +{-1.0916802883148193f,0.6941514015197754f,0.33912619948387146f,-0.23350191116333008f,-0.49327319860458374f,0.77676922082901f,0.2676515281200409f,0.6104924082756042f,-0.15097439289093018f,0.15909519791603088f,-0.29889100790023804f,-0.5846660733222961f,-0.5838217735290527f,-0.22375208139419556f,0.05209478735923767f,-0.7551524639129639f}, +{-0.9782484173774719f,0.31113147735595703f,0.3703531324863434f,0.35380131006240845f,-0.3702634572982788f,0.2814937233924866f,-0.10795548558235168f,0.6389802694320679f,0.020238667726516724f,0.2819874584674835f,0.11468183249235153f,-0.4511280059814453f,-0.5932655930519104f,-0.259999543428421f,-0.27597576379776f,-0.4377490282058716f}, +{-0.456306517124176f,0.24705632030963898f,-0.004794687032699585f,0.27283531427383423f,-0.2491397112607956f,0.36148759722709656f,0.12058994174003601f,0.014295617118477821f,0.026135817170143127f,0.10731380432844162f,0.3494521677494049f,-0.8916900157928467f,-0.2646500766277313f,-0.07438575476408005f,-0.36018112301826477f,-0.6685306429862976f}, +{-0.14345301687717438f,-0.6141415238380432f,0.20290347933769226f,0.255454957485199f,0.07266472280025482f,-0.17502927780151367f,0.15389427542686462f,-0.6482041478157043f,0.02910737134516239f,0.11359100788831711f,-0.20555031299591064f,-0.838413655757904f,-0.06824104487895966f,0.1409512758255005f,-0.38513508439064026f,-0.5575804710388184f}, +{-0.12874425947666168f,0.15096040070056915f,-0.2331579178571701f,-0.6160153150558472f,-0.3254242539405823f,0.14485986530780792f,0.05604562163352966f,-0.9803144335746765f,0.33852580189704895f,0.06457266211509705f,0.16518302261829376f,0.5692259073257446f,0.14356370270252228f,0.17044077813625336f,-0.14554673433303833f,0.004071855451911688f}, +{-0.14650265872478485f,-0.1280912607908249f,-0.24806702136993408f,-0.10933416336774826f,-0.30412396788597107f,-0.22102442383766174f,-0.16704979538917542f,-0.9642120599746704f,0.02454073168337345f,0.10739956796169281f,0.12258263677358627f,0.18821772933006287f,0.6021031737327576f,-0.02402644231915474f,0.04009982943534851f,0.19188940525054932f}, +{0.07880011945962906f,0.24555817246437073f,0.09550115466117859f,-0.5748773813247681f,-0.11726641654968262f,-0.09445475786924362f,-0.06753402948379517f,-1.1256269216537476f,-0.25171300768852234f,0.3228546679019928f,-0.2527022659778595f,0.5302071571350098f,0.5802300572395325f,0.13589775562286377f,-0.2847418785095215f,0.2381889373064041f}, +{-0.3524811267852783f,-0.27957043051719666f,0.17205187678337097f,-0.353553831577301f,0.15921594202518463f,0.16370359063148499f,-0.2786858379840851f,-0.6992180347442627f,-0.006810380611568689f,-0.44237667322158813f,0.016535434871912003f,-0.5385427474975586f,0.6526777744293213f,-0.2621651887893677f,0.3247623145580292f,-0.05272668972611427f}, +{-0.3432121276855469f,-0.1163753941655159f,0.34649983048439026f,-0.005047006532549858f,0.018827319145202637f,0.0882120430469513f,-0.1895401030778885f,-0.47850292921066284f,-0.39709779620170593f,0.02158806100487709f,0.34884387254714966f,-0.8406322598457336f,0.28447356820106506f,-0.11396709084510803f,0.24870619177818298f,-0.48489615321159363f}, +{-1.4658772945404053f,-0.9025406241416931f,-0.3757385015487671f,-0.27221575379371643f,0.09630811959505081f,0.007997093722224236f,0.1429324448108673f,-0.08122667670249939f,-0.13873571157455444f,0.183034747838974f,-0.36179932951927185f,-1.096313714981079f,0.6890646815299988f,-0.15136075019836426f,0.09779238700866699f,-0.33199232816696167f}, +{0.3255842328071594f,-0.13240604102611542f,0.18496140837669373f,0.1490352302789688f,0.22719809412956238f,0.3432508409023285f,-0.22405625879764557f,0.5712770819664001f,-0.1590391844511032f,-0.19357538223266602f,-0.0771421566605568f,0.4437602460384369f,-0.03669879585504532f,-0.38094064593315125f,-0.2075144499540329f,-0.5344372987747192f}, +{0.08733686059713364f,-0.5590197443962097f,0.38466766476631165f,-0.1221768856048584f,-0.18919458985328674f,-0.3587653934955597f,-0.2982172966003418f,0.07945907860994339f,-0.10940439254045486f,-0.22700423002243042f,-0.15709635615348816f,1.2706669569015503f,0.156779482960701f,-0.5185052156448364f,0.04470124840736389f,0.15615953505039215f}, +{0.403360515832901f,-0.7128850817680359f,0.18900898098945618f,-0.0196603462100029f,0.4677486717700958f,-0.48132121562957764f,0.03916636109352112f,0.48491209745407104f,0.2998749315738678f,0.05602376163005829f,-0.2355746030807495f,1.1661030054092407f,0.77826327085495f,-0.4945463538169861f,0.062258750200271606f,0.383340448141098f}, +{0.2593289613723755f,-0.9854602813720703f,-0.37685394287109375f,-0.18413859605789185f,0.012465625070035458f,-0.441338449716568f,-0.14507901668548584f,0.16470235586166382f,0.20499226450920105f,-0.030375521630048752f,-0.41661128401756287f,1.224860429763794f,0.43210548162460327f,-0.29650601744651794f,-0.07684260606765747f,0.46413087844848633f}, +{0.2933506667613983f,-0.6391526460647583f,0.15568438172340393f,-0.011705679818987846f,0.09584854543209076f,-0.6565345525741577f,-0.03859376907348633f,0.19194769859313965f,-0.04179299250245094f,0.05253047123551369f,-0.304436057806015f,1.0240694284439087f,0.5564665198326111f,0.17602147161960602f,0.2742314636707306f,0.2318839579820633f}, +{0.3379058837890625f,-0.29977551102638245f,0.19490453600883484f,-0.25027701258659363f,-0.3285960257053375f,-0.5744139552116394f,-0.336474746465683f,0.17858105897903442f,-0.36251819133758545f,-0.14384283125400543f,-0.12994831800460815f,0.2926623821258545f,0.5316202044487f,-0.030442986637353897f,-0.2561379373073578f,0.10979076474905014f}, +{0.17658555507659912f,-0.04404517263174057f,-0.2776013910770416f,0.1309312880039215f,0.3232283294200897f,-0.6174668669700623f,0.25546005368232727f,-0.2918916940689087f,-0.358376681804657f,-0.003287365660071373f,-0.37069639563560486f,-0.19753798842430115f,0.15488097071647644f,0.48237356543540955f,-0.30415377020835876f,-0.44348135590553284f}, +{0.8231086730957031f,0.2649248540401459f,0.1420871913433075f,-0.3401312530040741f,-0.2660701274871826f,-0.43393203616142273f,-0.13263443112373352f,-0.39492422342300415f,-0.14558611810207367f,0.013515380211174488f,0.1254778802394867f,-0.21490269899368286f,0.19694817066192627f,0.8114207983016968f,0.13351169228553772f,0.08890828490257263f}, +{0.40884125232696533f,-0.2336285412311554f,-0.07561364769935608f,0.02270103618502617f,-0.2815033197402954f,-0.73646479845047f,0.14428457617759705f,-0.20181608200073242f,-0.3427658975124359f,-0.31821179389953613f,-0.3578360378742218f,-1.0267835855484009f,-0.3186191916465759f,1.050688624382019f,0.019461065530776978f,0.23086552321910858f}, +{0.7475125193595886f,-0.665755569934845f,0.2631795108318329f,-0.724714457988739f,0.36547961831092834f,-1.258718490600586f,0.27224990725517273f,-0.8995881676673889f,-0.05133276432752609f,0.06621639430522919f,0.06264594197273254f,-1.6783150434494019f,0.43630486726760864f,1.1044129133224487f,0.06011766195297241f,0.3640836179256439f}, }; const float h2[16][16] = { - {-0.21827097237110138f,-0.13970035314559937f,-0.06966331601142883f,0.0015037156408652663f,-0.21907491981983185f,0.4042361080646515f,0.2356909215450287f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,0.12119956314563751f,-0.10159772634506226f,0.05038901045918465f,0.03739463537931442f,-0.048593394458293915f,-0.18448428809642792f}, -{-0.08718865364789963f,-1.5594444274902344f,0.057057321071624756f,-0.062059227377176285f,-0.35503754019737244f,-0.8636124134063721f,-0.5395830273628235f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-1.4903104305267334f,-0.6796953678131104f,0.13265176117420197f,0.6360052227973938f,0.49924367666244507f,-0.3841065466403961f}, + {-1.995652437210083f,-0.2068829983472824f,-0.06966331601142883f,0.3350852131843567f,-0.21907491981983185f,0.5111141204833984f,0.1577049195766449f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,1.2805067300796509f,-0.10159772634506226f,0.037286918610334396f,-1.4427478313446045f,-2.208937168121338f,-0.9961128234863281f}, +{0.5792762637138367f,-3.808340311050415f,0.057057321071624756f,2.2043418884277344f,-0.35503754019737244f,-2.3927183151245117f,-0.5222805738449097f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,0.6989365220069885f,-0.6684925556182861f,0.20035608112812042f,1.3771828413009644f,-0.020792467519640923f,-2.3830668926239014f}, {-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.013872272334992886f,-0.286335289478302f,-0.2894435524940491f,-0.4396398365497589f,0.08946844935417175f,0.1368589848279953f,-0.39876824617385864f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.10356922447681427f,0.2551405131816864f,-0.46428048610687256f,-0.11253073066473007f,0.2100202888250351f,-0.05202929303050041f}, -{-0.3711865544319153f,0.0395328551530838f,-0.25313520431518555f,2.4243388175964355f,0.036378175020217896f,0.4793085753917694f,-0.43615788221359253f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,0.05504565313458443f,-0.7131367921829224f,-0.09243116527795792f,-1.353367805480957f,-0.3743823170661926f,-0.9255486726760864f}, -{0.20110809803009033f,0.9441751837730408f,-0.3519742488861084f,0.6424571871757507f,-0.3015052080154419f,-3.0812039375305176f,-0.5597283244132996f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,0.32879066467285156f,-0.18484677374362946f,-0.27172166109085083f,-0.8081245422363281f,1.513680100440979f,1.4421181678771973f}, +{0.21807445585727692f,-0.4128798544406891f,-0.2894435524940491f,-0.38070401549339294f,0.08946844935417175f,0.17335492372512817f,-0.49148330092430115f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.14064599573612213f,0.30993807315826416f,-0.4346889555454254f,0.24925482273101807f,0.23362866044044495f,0.04363977164030075f}, +{-0.0690189003944397f,0.44633859395980835f,-0.25313520431518555f,0.18370237946510315f,0.036378175020217896f,0.261993944644928f,-0.41914331912994385f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-0.29010462760925293f,-0.7198570966720581f,-0.008628766983747482f,-0.44645318388938904f,-0.32042133808135986f,-0.3557409346103668f}, +{1.0781077146530151f,-0.3735578656196594f,-0.3519742488861084f,-0.48898035287857056f,-0.3015052080154419f,-0.1435472071170807f,-0.7045096158981323f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-1.2321500778198242f,-0.3002046048641205f,-0.41085922718048096f,0.12980346381664276f,1.1767032146453857f,-1.2447152137756348f}, {-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.04716520383954048f,1.1007870435714722f,0.33083590865135193f,-2.550760507583618f,-0.14358049631118774f,-2.0957565307617188f,-0.2204645574092865f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,1.2944395542144775f,-0.4285059869289398f,-0.3938278257846832f,1.3150156736373901f,1.507408618927002f,-1.0644478797912598f}, -{-0.22358468174934387f,0.319063276052475f,-0.11379697918891907f,0.09797302633523941f,0.041274964809417725f,-0.3698168098926544f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.03371793404221535f,-0.3197441101074219f,-0.37024784088134766f,-0.26758185029029846f,-0.37222927808761597f,-0.2432849407196045f}, -{-0.14576366543769836f,0.19868183135986328f,-0.13502129912376404f,0.09569330513477325f,0.12987366318702698f,0.09705229103565216f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.21950477361679077f,0.39862415194511414f,0.3811538517475128f,-0.2120383083820343f,0.03948197886347771f,-0.2580723166465759f}, -{-0.2600649297237396f,-0.025024279952049255f,0.0457797646522522f,-0.38467252254486084f,-0.03321319818496704f,-0.4283318817615509f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.22829373180866241f,0.3545852601528168f,-0.3647043704986572f,0.43810027837753296f,-0.3747478723526001f,-0.30320504307746887f}, -{0.2563563287258148f,0.2848908305168152f,0.3954955041408539f,0.5324105024337769f,0.0033026933670043945f,0.013189428485929966f,-0.264487624168396f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-0.11690916121006012f,-0.30937525629997253f,-0.04322272539138794f,-0.09333206713199615f,0.3114027976989746f,0.3084369897842407f}, -{-0.3773934841156006f,-1.9424090385437012f,-0.15798500180244446f,0.4459758698940277f,-0.37393757700920105f,0.23002059757709503f,-0.13675209879875183f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,2.0886294841766357f,-0.5884778499603271f,0.17326043546199799f,-0.4907274544239044f,-1.3809216022491455f,2.0673558712005615f}, -{-0.276047021150589f,0.06292802840471268f,-0.2018718123435974f,-1.2890863418579102f,0.07545611262321472f,1.7266753911972046f,-0.2156267762184143f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.4809088706970215f,-0.5366932153701782f,-0.285448282957077f,1.6154465675354004f,-0.1917727142572403f,-0.47671204805374146f}, +{1.2469984292984009f,-0.8763218522071838f,0.33083590865135193f,1.7530616521835327f,-0.14358049631118774f,0.010533415712416172f,-0.2712770700454712f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,-0.6503188610076904f,-0.2890920341014862f,-0.5379235148429871f,2.585930109024048f,2.265061378479004f,0.35780707001686096f}, +{-0.25576791167259216f,0.3400726914405823f,-0.11379697918891907f,0.11029995232820511f,0.041274964809417725f,-0.3380604088306427f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.05663437396287918f,-0.3197441101074219f,-0.37024784088134766f,-0.28747454285621643f,-0.38662344217300415f,-0.22054927051067352f}, +{-0.14576366543769836f,0.2205791175365448f,-0.13502129912376404f,0.10068279504776001f,0.12987366318702698f,0.11282801628112793f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.24429087340831757f,0.39862415194511414f,0.3811538517475128f,-0.23295477032661438f,0.013144334778189659f,-0.23888015747070312f}, +{-0.2562062442302704f,-0.035001546144485474f,0.0457797646522522f,-0.3986908793449402f,-0.03321319818496704f,-0.44217926263809204f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.23657932877540588f,0.3545852601528168f,-0.3647043704986572f,0.4500863254070282f,-0.36821234226226807f,-0.31535226106643677f}, +{0.8102825284004211f,1.294549584388733f,0.3954955041408539f,1.102267861366272f,0.0033026933670043945f,0.1643415242433548f,-0.47370150685310364f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-0.05037403851747513f,-0.4392281174659729f,-0.06405176222324371f,-1.6827234029769897f,0.5400660634040833f,0.17927005887031555f}, +{-0.6686052083969116f,1.1986757516860962f,-0.15798500180244446f,-0.8824228048324585f,-0.37393757700920105f,0.8962071537971497f,-0.20785248279571533f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,0.15467706322669983f,-0.551661491394043f,0.23710069060325623f,-0.6682615280151367f,-0.11948293447494507f,-0.022243276238441467f}, +{-0.3220524489879608f,-0.39394599199295044f,-0.2018718123435974f,-0.1575627624988556f,0.07545611262321472f,0.04054655879735947f,-0.24003709852695465f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.6880089044570923f,-0.3674003779888153f,-0.27380242943763733f,0.5272713303565979f,-1.119949460029602f,-0.36922433972358704f}, {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.4368991553783417f,0.7573152184486389f,0.12081471085548401f,1.7409113645553589f,0.29976895451545715f,0.646031379699707f,-0.0614682137966156f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.36895906925201416f,-0.2702392637729645f,-0.2760795056819916f,0.030236508697271347f,0.5722708702087402f,0.1181602030992508f}, +{-0.07192385941743851f,0.6766030788421631f,0.12081471085548401f,0.4383029639720917f,0.29976895451545715f,-0.06717150658369064f,-0.2861359417438507f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.13777963817119598f,-0.41539883613586426f,-0.3014349937438965f,-0.4090578556060791f,-0.350934773683548f,-0.28625383973121643f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.09681249409914017f,-0.06886705011129379f,-0.37561914324760437f,-0.17487698793411255f,0.030626926571130753f,0.3332441747188568f,0.3036012351512909f,-0.2405819296836853f,0.04891335964202881f,-0.11870327591896057f,0.4001283347606659f,0.028686009347438812f,0.29298722743988037f,-0.3218167722225189f,0.16941024363040924f}, -{0.047732532024383545f,1.5079025030136108f,-3.3142080307006836f,0.8478264212608337f,-0.08954807370901108f,-0.7384523153305054f,-0.3198729455471039f,-0.17536860704421997f,0.5750792622566223f,-0.10279136896133423f,0.1338483840227127f,-0.4699574112892151f,0.2974906265735626f,0.7808670997619629f,-3.7773680686950684f,-3.7739908695220947f}, + {-0.36079341173171997f,1.479121208190918f,1.0192432403564453f,-0.9422738552093506f,0.32734206318855286f,0.17215792834758759f,0.20715229213237762f,0.3036012351512909f,-0.2405819296836853f,-0.21890388429164886f,-0.11870327591896057f,0.395515114068985f,1.847967267036438f,1.3426859378814697f,-1.3596293926239014f,0.3992917239665985f}, +{0.047732532024383545f,-1.6215876340866089f,-1.8046064376831055f,-0.7025291323661804f,-0.15545719861984253f,1.4906500577926636f,-0.3198729455471039f,-0.09108348190784454f,0.1135697066783905f,-0.18822181224822998f,0.3120075464248657f,-0.5053715705871582f,-0.741367757320404f,0.7732160091400146f,-0.3683539628982544f,-1.4823510646820068f}, {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,-1.8846914768218994f,1.4357497692108154f,-2.2687408924102783f,-0.08508370071649551f,0.01649381034076214f,0.11703731119632721f,0.20383602380752563f,0.20294490456581116f,-0.4526219666004181f,-0.2107127159833908f,0.11071392893791199f,-0.6029598712921143f,0.27189773321151733f,-5.278013706207275f,-0.3804920017719269f}, +{-0.30922991037368774f,-3.549856185913086f,0.13726386427879333f,-0.44734057784080505f,-0.2542110085487366f,0.23402708768844604f,0.06395658850669861f,-0.08765485882759094f,-0.41971299052238464f,-0.8101474642753601f,0.03246985375881195f,0.176767498254776f,-1.846853256225586f,0.15457327663898468f,0.134054034948349f,-0.4904846251010895f}, {-0.39607733488082886f,-0.05481579899787903f,0.1976260244846344f,0.022423356771469116f,0.16892847418785095f,-0.27518749237060547f,0.16012099385261536f,0.3626593053340912f,-0.08640444278717041f,-0.11053556203842163f,-0.10529157519340515f,-0.31317979097366333f,-0.1530032455921173f,-0.1336749792098999f,0.22959044575691223f,0.19986507296562195f}, -{-0.37449589371681213f,-1.0763341188430786f,-0.11021927744150162f,-0.6735435724258423f,0.033705513924360275f,0.6293330788612366f,-0.18732719123363495f,0.14435407519340515f,-8.565055847167969f,-0.37189292907714844f,-0.2574214041233063f,0.0323423407971859f,-0.14697636663913727f,-0.36265456676483154f,-1.209601640701294f,-0.48256534337997437f}, -{0.4110594093799591f,0.12632869184017181f,-0.12601256370544434f,0.37246426939964294f,0.3083249628543854f,-0.18501847982406616f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.38588830828666687f,-0.06421742588281631f,0.22114509344100952f,-0.13609033823013306f}, +{-0.37449589371681213f,0.18573783338069916f,0.017728952690958977f,-0.07189998775720596f,0.17248819768428802f,0.4640998840332031f,-0.18732719123363495f,0.06746524572372437f,-0.5911464691162109f,-0.29338914155960083f,-0.19333311915397644f,-0.055196281522512436f,0.0703820064663887f,1.1699786186218262f,1.3546981811523438f,-1.3225988149642944f}, +{0.4110594093799591f,0.3527141213417053f,-0.08545524626970291f,0.37246426939964294f,0.3150569200515747f,-0.06213608384132385f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.21239498257637024f,0.030630826950073242f,0.28824782371520996f,-0.3391006588935852f}, {-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.05221118777990341f,-3.4609317779541016f,-1.1260892152786255f,-0.3033522963523865f,0.25513994693756104f,-0.08742031455039978f,-0.1338864266872406f,0.5661523342132568f,-0.6477752923965454f,-0.17419999837875366f,-0.46206751465797424f,-2.14351224899292f,1.0253784656524658f,0.3438001275062561f,0.7085472345352173f}, -{-0.408692330121994f,-0.2623419165611267f,0.11236652731895447f,-0.022254934534430504f,0.023289965465664864f,-0.3169271647930145f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.38538986444473267f,-0.3014340400695801f,-0.3794373869895935f,0.30830731987953186f}, -{-0.2991822361946106f,0.12731163203716278f,0.1439894586801529f,0.017815517261624336f,0.3019440472126007f,0.0008402852108702064f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.22834965586662292f,-0.36900195479393005f,0.054683245718479156f,-0.12663790583610535f}, -{-0.2675279378890991f,0.1015474945306778f,1.2082805633544922f,-2.285543203353882f,0.06655023247003555f,0.43086856603622437f,-0.32875844836235046f,-0.5921741127967834f,-4.847797393798828f,-0.8969767689704895f,-0.6669066548347473f,-0.5687218904495239f,1.579176902770996f,-1.244149923324585f,0.1905020922422409f,0.179339200258255f}, -{-0.015470266342163086f,-1.4506276845932007f,0.38140514492988586f,1.8742892742156982f,-0.20687851309776306f,-0.14581704139709473f,-0.048190340399742126f,-0.09006329625844955f,0.937150239944458f,-0.3993879556655884f,-0.1511162966489792f,-0.39490216970443726f,0.37505999207496643f,-0.8093558549880981f,-0.3594619333744049f,1.3950458765029907f}, -{0.1863725483417511f,0.20969092845916748f,-1.3113279342651367f,-7.250408172607422f,-0.08607593923807144f,0.08639548718929291f,-0.024447815492749214f,0.026327338069677353f,-6.564481258392334f,-0.14472565054893494f,-0.703682005405426f,-0.10230952501296997f,-0.3622373938560486f,0.11915751546621323f,-4.42966365814209f,-0.6299999952316284f}, +{0.15459725260734558f,0.6321741342544556f,0.26077648997306824f,-0.12497477233409882f,-0.43533703684806824f,0.23836490511894226f,-0.15885387361049652f,-0.09889163821935654f,-0.23798367381095886f,-0.5303645133972168f,0.018210796639323235f,-0.5869696736335754f,0.16812960803508759f,-0.41072049736976624f,0.2991606295108795f,1.451149582862854f}, +{-0.408692330121994f,-0.18435567617416382f,0.1490521878004074f,0.08683107048273087f,0.0728057473897934f,-0.2463478446006775f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.4888150095939636f,-0.34697550535202026f,-0.3648682236671448f,0.20380957424640656f}, +{-0.2991822361946106f,0.14224176108837128f,0.15648812055587769f,-0.05932474136352539f,0.3219054937362671f,0.019387593492865562f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.2699495255947113f,-0.3697388768196106f,0.13241605460643768f,-0.16869547963142395f}, +{-0.2675279378890991f,-0.3864639103412628f,-0.36360350251197815f,0.058223359286785126f,0.01259082742035389f,-0.2988627254962921f,-0.45500972867012024f,-0.31893211603164673f,-0.47506827116012573f,-0.6956400275230408f,-0.4926331639289856f,-1.2168147563934326f,-0.21805618703365326f,-1.7307584285736084f,0.4814468324184418f,1.5982202291488647f}, +{-0.015470266342163086f,0.46531155705451965f,0.37467139959335327f,-0.028886189684271812f,-0.3300264775753021f,-0.26294541358947754f,-0.07256490737199783f,-0.008358269929885864f,-0.4880097210407257f,-0.7111483812332153f,0.029397042468190193f,-0.27496859431266785f,0.9506001472473145f,0.7077613472938538f,0.653728723526001f,-1.284180760383606f}, +{0.1863725483417511f,0.44253242015838623f,-0.8895649313926697f,-0.6261106133460999f,0.09252321720123291f,0.16897612810134888f,-0.03161505609750748f,0.024137338623404503f,-0.22729304432868958f,0.04278842732310295f,-0.5097978115081787f,-0.10846980661153793f,0.8339581489562988f,-0.7852450609207153f,-0.021044977009296417f,-0.29810839891433716f}, }; -const float hout[16] = { 0.45773375034332275f,0.10493728518486023f,-0.22224140167236328f,-0.1621534526348114f,0.02623613551259041f,0.1514434814453125f,-0.11126204580068588f,0.2194291055202484f,-0.24774053692817688f,0.1170450821518898f,-0.060366179794073105f,-0.06208733841776848f,-0.10628174990415573f,0.12339625507593155f,0.037204861640930176f,-0.17489881813526154f }; +const float hout[16] = { 0.45773375034332275f,0.31911107897758484f,-0.1796216368675232f,0.02225276455283165f,0.00775682320818305f,0.2153143286705017f,-0.13896840810775757f,0.04725155979394913f,-0.09814572334289551f,-0.07557471096515656f,0.09471917152404785f,-0.2356099635362625f,-0.25121569633483887f,0.20179446041584015f,0.07052961736917496f,-0.4867629110813141f }; -const float b1[16] = { 0.624637246131897f,1.356380820274353f,-1.7145336866378784f,0.24004428088665009f,2.8009581565856934f,3.6041359901428223f,-0.058932315558195114f,2.2639424800872803f,0.5300702452659607f,-0.8932367563247681f,0.6044619679450989f,1.6490927934646606f,-2.2505152225494385f,-2.303412914276123f,-1.087764859199524f,1.356432318687439f }; +const float b1[16] = { 1.6242481470108032f,1.5025521516799927f,-1.7145336866378784f,0.372548371553421f,1.024824857711792f,1.274719476699829f,-0.058932315558195114f,1.2145178318023682f,0.530387818813324f,-0.9235196709632874f,0.6003308892250061f,1.8733751773834229f,-0.9162682890892029f,-1.0943491458892822f,-1.087764859199524f,0.8950626850128174f }; -const float b2[16] = { -0.3033750653266907f,1.9101306200027466f,-1.4564176797866821f,-2.948333978652954f,-0.6939148902893066f,0.5749675035476685f,0.20706336200237274f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.3175031244754791f,0.4167090356349945f,-0.3413408398628235f,1.905746340751648f,0.9618608355522156f,1.0804579257965088f }; +const float b2[16] = { -0.48244044184684753f,-1.4596377611160278f,-1.4564176797866821f,-0.6742430925369263f,-0.6939148902893066f,0.03679073601961136f,0.10448678582906723f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.34773075580596924f,0.42268237471580505f,-0.27405646443367004f,1.7226717472076416f,-0.2819717824459076f,0.8814951777458191f }; -const float b3[16] = { -1.963319182395935f,1.2081444263458252f,-1.2923985719680786f,-1.374611496925354f,-0.256678968667984f,0.47946909070014954f,-0.5220568180084229f,-0.9044259190559387f,-0.5331991314888f,0.005888623651117086f,-0.442954957485199f,-0.25120648741722107f,-2.3471124172210693f,1.2962863445281982f,-0.05743084475398064f,-0.5033670663833618f }; +const float b3[16] = { -1.963319182395935f,-0.08225324749946594f,0.3287607431411743f,-0.12232505530118942f,-0.11128173768520355f,0.6797776818275452f,-0.5726286768913269f,-0.8121526837348938f,0.29713916778564453f,0.1593162715435028f,-0.25677886605262756f,-0.3984224200248718f,-0.38557979464530945f,-0.26475387811660767f,-1.1123615503311157f,-0.4025505483150482f }; -const float bout[1] = { -0.25130224227905273f }; +const float bout[1] = { -0.17530457675457f }; float VALVE_POS_RAW_NN = 0.0f; @@ -382,30 +382,30 @@ int ind = 0; for(int i=0; i<numpast_u; i++) { - input_NN[ind] = u_past[2*i]; + input_NN[ind] = u_past[time_interval*i]; ind = ind + 1; } for(int i=0; i<numpast_x; i++) { - input_NN[ind] = x_past[2*i] / 60.0f; + input_NN[ind] = x_past[time_interval*i] / 60.0f; ind = ind + 1; } input_NN[ind] = (pos.sen / ENC_PULSE_PER_POSITION) / 60.0f; ind = ind + 1; // for(int i=0;i<numfuture_x;i++){ -// input_NN[ind] = x_future[2*i+2] / 60.0f; +// input_NN[ind] = x_future[time_interval*i+time_interval] / 60.0f; // ind = ind + 1; // } for(int i=0; i<numpast_f; i++) { - input_NN[ind] = f_past[2*i] / 10000.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 + 0.5f; ind = ind + 1; for(int i=0; i<numfuture_f; i++) { - input_NN[ind] = (f_future[2*i+2] - torq.sen)/10000.0f+0.5f; -// input_NN[ind] = (f_future[2*i+2])/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+0.5f; ind = ind + 1; }