{"id":114062,"date":"2026-10-08T08:48:58","date_gmt":"2026-10-08T00:48:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/114062.html"},"modified":"2026-10-08T08:48:58","modified_gmt":"2026-10-08T00:48:58","slug":"%e7%9f%a9%e9%98%b5%e4%b9%98%e6%b3%95%e7%9a%84q15%e5%ae%9a%e7%82%b9%e5%ae%9e%e7%8e%b0%ef%bc%8c%e8%ae%a9%e5%8d%a1%e5%b0%94%e6%9b%bc%e6%bb%a4%e6%b3%a2%e4%b8%8d%e5%86%8d%e6%8b%96%e5%90%8e%e8%85%bf","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/114062.html","title":{"rendered":"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f"},"content":{"rendered":"<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u524d\u4e94\u7bc7\u6587\u7ae0\u91cc&#xff0c;\u6211\u7528\u624b\u5199\u5b9a\u70b9\u51fd\u6570\u66ff\u6362\u4e86sinf()\u3001atan2f()\u3001sqrtf()\u3001expf()\u3001logf()\u3002\u4f46\u771f\u6b63\u8ba9\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u5934\u75bc\u7684&#xff0c;\u4e0d\u662f\u5355\u4e2a\u6570\u5b66\u51fd\u6570&#xff0c;\u800c\u662f\u77e9\u9635\u8fd0\u7b97\u2014\u2014\u5361\u5c14\u66fc\u6ee4\u6ce2\u3001\u59ff\u6001\u89e3\u7b97\u3001\u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff0c;\u6838\u5fc3\u90fd\u662f\u77e9\u9635\u4e58\u6cd5\u3002\u4eca\u5929\u6211\u4eec\u6765\u624b\u6495\u77e9\u9635\u4e58\u6cd5\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">01 \u4e3a\u4ec0\u4e48\u662f\u77e9\u9635\u4e58\u6cd5&#xff1f;<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5728\u5d4c\u5165\u5f0f\u5f00\u53d1\u4e2d&#xff0c;\u77e9\u9635\u4e58\u6cd5\u7684\u51fa\u573a\u9891\u7387\u6781\u9ad8&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u5361\u5c14\u66fc\u6ee4\u6ce2&#xff1a;\u9884\u6d4b\u548c\u66f4\u65b0\u6b65\u9aa4\u5168\u662f\u77e9\u9635\u4e58\u6cd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u59ff\u6001\u89e3\u7b97&#xff1a;\u56db\u5143\u6570\u66f4\u65b0\u3001\u65cb\u8f6c\u77e9\u9635\u8ba1\u7b97<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff1a;\u5168\u8fde\u63a5\u5c42\u5c31\u662f\u77e9\u9635\u4e58\u6cd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u6700\u5c0f\u4e8c\u4e58\u62df\u5408&#xff1a;\u6cd5\u65b9\u7a0b\u6c42\u89e3<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u7535\u673aFOC&#xff1a;Clarke\/Park\u53d8\u6362\u672c\u8d28\u662f2\u00d72\u77e9\u9635\u4e58\u6cd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6d6e\u70b9\u77e9\u9635\u4e58\u6cd5\u5728 Cortex-M4 \u4e0a\u867d\u7136\u53ef\u4ee5\u7528 FPU \u52a0\u901f&#xff0c;\u4f46\u77e9\u9635\u7ef4\u5ea6\u8d8a\u5927&#xff0c;\u8fd0\u7b97\u8017\u65f6\u8d8a\u660e\u663e&#xff08;\u8fd0\u7b97\u91cf\u6309 O(N\u00b3) \u589e\u957f&#xff09;&#xff0c;\u4e14\u6267\u884c\u65f6\u95f4\u53d7\u6570\u636e\u5f71\u54cd&#xff08;\u5f02\u5e38\u503c\u3001\u975e\u89c4\u683c\u5316\u6570\u4f1a\u5bfc\u81f4\u6d41\u6c34\u7ebf\u505c\u987f&#xff09;\u3002\u800c\u5b9a\u70b9 mat_mul_q15() \u7528\u7eaf\u6574\u6570\u8fd0\u7b97&#xff0c;\u6267\u884c\u65f6\u95f4\u66f4\u56fa\u5b9a&#xff0c;\u5728\u65e0 FPU \u7684 M0\/M3 \u4e0a\u901f\u5ea6\u4f18\u52bf\u660e\u663e\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u5b9a\u70b9\u8fd0\u7b97\u7684\u7d2f\u79ef\u8bef\u5dee\u901a\u5e38\u6bd4\u6d6e\u70b9\u5927\u3002\u6d6e\u70b9\u7684\u76f8\u5bf9\u8bef\u5dee\u56fa\u5b9a\u5728 1e-7 \u91cf\u7ea7&#xff0c;\u800c\u5b9a\u70b9\u7684\u7edd\u5bf9\u8bef\u5dee\u4f1a\u968f\u7d2f\u52a0\u6b21\u6570\u7ebf\u6027\u589e\u957f\u3002\u56e0\u6b64&#xff0c;\u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5\u9002\u5408\u5bf9\u901f\u5ea6\u3001\u786e\u5b9a\u6027\u8981\u6c42\u9ad8&#xff0c;\u4f46\u5bf9\u7edd\u5bf9\u7cbe\u5ea6\u8981\u6c42\u4e0d\u82db\u523b\u7684\u573a\u666f\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">02 \u77e9\u9635\u4e58\u6cd5\u7684\u7279\u6b8a\u96be\u70b9<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u548c\u5355\u4e2a\u6570\u5b66\u51fd\u6570\u4e0d\u540c&#xff0c;\u77e9\u9635\u4e58\u6cd5\u6709\u4e09\u4e2a\u989d\u5916\u7684\u96be\u70b9&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u96be\u70b9\u4e00&#xff1a;Q\u683c\u5f0f\u4e58\u6cd5\u4f1a\u201c\u653e\u5927\u201d\u4f4d\u5bbd<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e24\u4e2a Q15 \u6570\u76f8\u4e58&#xff0c;\u7ed3\u679c\u662f Q30&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Q15 \u00d7 Q15 \u2192 Q30<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5fc5\u987b\u53f3\u79fb 15 \u4f4d\u624d\u80fd\u56de\u5230 Q15\u3002\u5982\u679c\u5fd8\u4e86\u79fb\u4f4d&#xff0c;\u7ed3\u679c\u4f1a\u5927 32768 \u500d\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u96be\u70b9\u4e8c&#xff1a;\u7d2f\u52a0\u4f1a\u6ea2\u51fa<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u77e9\u9635\u4e58\u6cd5\u7684\u6bcf\u4e2a\u8f93\u51fa\u5143\u7d20\u662f N \u4e2a\u4e58\u79ef\u4e4b\u548c\u3002\u5982\u679c N&#061;8&#xff0c;\u6bcf\u4e2a\u4e58\u79ef\u6700\u5927 32767\u00d732767 \u2248 10\u2079&#xff0c;\u7d2f\u52a0 8 \u6b21\u5c31\u662f 8\u00d710\u2079&#xff0c;\u8fdc\u8d85 int32_t \u7684 2.1\u00d710\u2079\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5fc5\u987b\u7528int64_t \u7d2f\u52a0&#xff0c;\u6216\u8005\u7528 Q15 \u8f93\u5165\u4f46\u4e2d\u95f4\u7d2f\u52a0\u7528 Q30 \u683c\u5f0f\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u96be\u70b9\u4e09&#xff1a;\u6570\u636e\u5e03\u5c40\u5f71\u54cdCache\u547d\u4e2d\u7387<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u77e9\u9635\u4e58\u6cd5\u662f\u5185\u5b58\u8bbf\u95ee\u5bc6\u96c6\u578b\u64cd\u4f5c\u3002\u884c\u4f18\u5148\u548c\u5217\u4f18\u5148\u7684\u8bbf\u95ee\u6a21\u5f0f&#xff0c;\u5728 Cortex-M7 \u7684 Cache \u4e0b\u6027\u80fd\u5dee\u5f02\u53ef\u8fbe\u6570\u500d\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">03 \u6838\u5fc3\u601d\u8def&#xff1a;Q15\u8f93\u5165&#xff0c;Q30\u7d2f\u52a0&#xff0c;Q15\u8f93\u51fa<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5\u7684\u6838\u5fc3\u516c\u5f0f&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">C[i][j] &#061; \u03a3 A[i][k] \u00d7 B[k][j]<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6bcf\u4e00\u6b65&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1. A \u548c B \u7684\u5143\u7d20\u662f Q15<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">2. \u4e58\u79ef\u662f Q30<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">3. \u7d2f\u52a0\u7528 int64_t&#xff08;\u9632\u6b62\u6ea2\u51fa&#xff09;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">4. \u6700\u540e\u53f3\u79fb 15 \u4f4d&#xff0c;\u56de\u5230 Q15<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5173\u952e\u6d1e\u5bdf&#xff1a;\u77e9\u9635\u4e58\u6cd5\u7684\u5b9a\u70b9\u5316\u4e0d\u662f\u201c\u628a\u6d6e\u70b9\u6362\u6210\u5b9a\u70b9\u201d\u90a3\u4e48\u7b80\u5355&#xff0c;\u800c\u662f\u5728\u6bcf\u4e00\u6b65\u90fd\u7cbe\u786e\u63a7\u5236Q\u683c\u5f0f\u7684\u7f29\u653e\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">04 \u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5\u5b9e\u73b0<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u57fa\u7840\u7248\u672c&#xff08;\u901a\u7528&#xff0c;\u4efb\u610f\u7ef4\u5ea6&#xff09;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">#include &lt;stdint.h&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/**<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;brief \u00a0Q15 \u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0A \u00a0M\u00d7K \u77e9\u9635&#xff0c;Q15 \u683c\u5f0f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0B \u00a0K\u00d7N \u77e9\u9635&#xff0c;Q15 \u683c\u5f0f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0C \u00a0M\u00d7N \u8f93\u51fa\u77e9\u9635&#xff0c;Q15 \u683c\u5f0f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0M \u00a0\u884c\u6570<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0K \u00a0\u5185\u7ef4\u5ea6<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0* &#064;param \u00a0N \u00a0\u5217\u6570<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0*\/<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">void mat_mul_q15(const int16_t *A, const int16_t *B, int16_t *C,<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int M, int K, int N) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0for (int i &#061; 0; i &lt; M; i&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int j &#061; 0; j &lt; N; j&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int64_t sum &#061; 0;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int k &#061; 0; k &lt; K; k&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum &#043;&#061; (int32_t)A[i * K &#043; k] * B[k * N &#043; j];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u7d2f\u52a0\u7ed3\u679c\u662f Q30&#xff0c;\u53f3\u79fb 15 \u4f4d\u56de\u5230 Q15<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u52a0 16384 \u5b9e\u73b0\u56db\u820d\u4e94\u5165<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0C[i * N &#043; j] &#061; (int16_t)((sum &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f18\u5316\u7248\u672c\u4e00&#xff1a;\u5faa\u73af\u987a\u5e8f\u4f18\u5316<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e0a\u9762\u7684\u4ee3\u7801\u5728k\u5faa\u73af\u4e2d\u8bbf\u95ee B[k*N&#043;j]&#xff0c;\u8fd9\u662f\u5217\u8bbf\u95ee&#xff0c;\u5728\u884c\u4f18\u5148\u5b58\u50a8\u4e2d\u4e0d\u8fde\u7eed\u3002\u6539\u6210 &#096;i-k-j&#096; \u5faa\u73af\u987a\u5e8f\u53ef\u4ee5\u6539\u5584&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">void mat_mul_q15_ikj(const int16_t *A, const int16_t *B, int16_t *C,<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int M, int K, int N) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\/\/ \u5148\u6e05\u96f6<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0for (int i &#061; 0; i &lt; M * N; i&#043;&#043;) C[i] &#061; 0;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0for (int i &#061; 0; i &lt; M; i&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int k &#061; 0; k &lt; K; k&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int16_t a &#061; A[i * K &#043; k];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int j &#061; 0; j &lt; N; j&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ C[i][j] &#043;&#061; A[i][k] * B[k][j]<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u8fd9\u91cc\u7528 int32_t \u7d2f\u52a0 Q30&#xff0c;\u6ce8\u610f\u6ea2\u51fa<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int32_t prod &#061; (int32_t)a * B[k * N &#043; j];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u9700\u8981\u628a prod \u4ece Q30 \u8f6c\u6210 Q15 \u518d\u7d2f\u52a0<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u4f46\u8fd9\u6837\u4f1a\u635f\u5931\u7cbe\u5ea6&#xff0c;\u66f4\u597d\u7684\u505a\u6cd5\u662f\u7528 int64_t<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0C[i * N &#043; j] &#043;&#061; (int16_t)(prod &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u7248\u672c\u4e3a\u4e86\u51cf\u5c11\u5185\u5b58\u8bbf\u95ee&#xff0c;\u727a\u7272\u4e86\u7cbe\u5ea6&#xff08;\u6bcf\u6b21\u4e58\u79ef\u5148\u8f6cQ15\u518d\u7d2f\u52a0&#xff09;\u3002\u63a8\u8350\u7528\u57fa\u7840\u7248\u672c&#xff0c;\u7cbe\u5ea6\u66f4\u9ad8\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f18\u5316\u7248\u672c\u4e8c&#xff1a;2\u00d72 \u77e9\u9635\u4e13\u7528<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u4e8e FOC \u7684 Clarke\/Park \u53d8\u6362&#xff0c;2\u00d72 \u77e9\u9635\u4e58\u6cd5\u53ef\u4ee5\u5b8c\u5168\u5c55\u5f00&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ [c00 c01] \u00a0\u00a0[a00 a01] \u00a0\u00a0[b00 b01]<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ [c10 c11] &#061; [a10 a11] \u00d7 [b10 b11]<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">void mat_mul_2x2_q15(const int16_t *A, const int16_t *B, int16_t *C) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0int64_t s00 &#061; (int64_t)A[0]*B[0] &#043; (int64_t)A[1]*B[2];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0int64_t s01 &#061; (int64_t)A[0]*B[1] &#043; (int64_t)A[1]*B[3];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0int64_t s10 &#061; (int64_t)A[2]*B[0] &#043; (int64_t)A[3]*B[2];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0int64_t s11 &#061; (int64_t)A[2]*B[1] &#043; (int64_t)A[3]*B[3];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0C[0] &#061; (int16_t)((s00 &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0C[1] &#061; (int16_t)((s01 &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0C[2] &#061; (int16_t)((s10 &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0C[3] &#061; (int16_t)((s11 &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c55\u5f00\u540e\u6ca1\u6709\u5faa\u73af&#xff0c;\u7f16\u8bd1\u5668\u53ef\u4ee5\u505a\u66f4\u597d\u7684\u5bc4\u5b58\u5668\u5206\u914d&#xff0c;\u901f\u5ea6\u6bd4\u901a\u7528\u7248\u672c\u5feb 2~3 \u500d\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f18\u5316\u7248\u672c\u4e09&#xff1a;3\u00d73 \u77e9\u9635\u4e13\u7528&#xff08;\u7528\u4e8e\u5361\u5c14\u66fc\u6ee4\u6ce2&#xff09;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">void mat_mul_3x3_q15(const int16_t *A, const int16_t *B, int16_t *C) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0for (int i &#061; 0; i &lt; 3; i&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int j &#061; 0; j &lt; 3; j&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int64_t sum &#061; 0;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (int k &#061; 0; k &lt; 3; k&#043;&#043;) {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum &#043;&#061; (int32_t)A[i*3&#043;k] * B[k*3&#043;j];<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0C[i*3&#043;j] &#061; (int16_t)((sum &#043; 16384) &gt;&gt; 15);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">3\u00d73 \u77e9\u9635\u662f\u5361\u5c14\u66fc\u6ee4\u6ce2\u7684\u5178\u578b\u7ef4\u5ea6&#xff08;\u72b6\u6001\u5411\u91cf3\u7ef4&#xff09;&#xff0c;\u624b\u5199\u5c55\u5f00\u53ef\u4ee5\u8fdb\u4e00\u6b65\u4f18\u5316\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">05 \u7cbe\u5ea6\u5206\u6790<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5\u7684\u8bef\u5dee\u6765\u6e90&#xff1a;<\/p>\n<table border=\"1\" cellspacing=\"0\" style=\"width:488.1000pt\">\n<tbody>\n<tr>\n<td style=\"vertical-align:top;width:123.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8bef\u5dee\u6765\u6e90<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:106.9000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u91cf\u7ea7<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:258.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8bf4\u660e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:123.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Q15\u8f93\u5165\u91cf\u5316<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:106.9000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">~0.003%<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:258.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6bcf\u4e2a\u5143\u7d20\u7684\u5206\u8fa8\u7387<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:123.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e58\u79ef\u820d\u5165<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:106.9000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">~0.001%<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:258.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6bcf\u6b21\u4e58\u79ef\u7684\u820d\u5165<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:123.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7d2f\u52a0\u820d\u5165<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:106.9000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">~0.001%<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:258.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7d2f\u52a0\u540e\u7684\u79fb\u4f4d\u820d\u5165<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:123.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u603b\u76f8\u5bf9\u8bef\u5dee<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:106.9000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">~0.01%<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:258.1000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u53d6\u51b3\u4e8e\u77e9\u9635\u7ef4\u5ea6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u4e8e\u5361\u5c14\u66fc\u6ee4\u6ce2\u3001\u59ff\u6001\u89e3\u7b97\u3001\u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff0c;0.01% \u7684\u76f8\u5bf9\u8bef\u5dee\u5b8c\u5168\u591f\u7528\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">06 \u6027\u80fd\u5b9e\u6d4b<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6d4b\u8bd5\u5e73\u53f0&#xff1a;GD32F303VGT6 &#064;120MHz&#xff0c;DWT\u5468\u671f\u8ba1\u6570\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6d4b\u8bd5\u6761\u4ef6<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u77e9\u9635\u7ef4\u5ea6&#xff1a;4\u00d74&#xff0c;\u5355\u6b21\u8c03\u7528<\/p>\n<table border=\"1\" cellspacing=\"0\" style=\"width:498.1000pt\">\n<tbody>\n<tr>\n<td style=\"vertical-align:top;width:166.0000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u51fd\u6570<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:166.0500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5f00\u542fFPU&#xff08;\u5468\u671f&#xff09;<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:166.0500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5173\u95edFPU&#xff08;\u5468\u671f&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:166.0000pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15()<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:166.0500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1549<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:166.0500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1549<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8bf4\u660e&#xff1a;mat_mul_q15()\u00a0\u5b8c\u5168\u91c7\u7528\u6574\u6570\u8fd0\u7b97&#xff0c;\u56e0\u6b64\u5f00\u542f\u6216\u5173\u95ed FPU \u5bf9\u5176\u8017\u65f6\u6ca1\u6709\u5f71\u54cd\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">07 \u5e94\u7528\u573a\u666f<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u5361\u5c14\u66fc\u6ee4\u6ce2<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ \u9884\u6d4b\u6b65\u9aa4&#xff1a;x &#061; F\u00b7x<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15(F, x, x_pred, 4, 4, 1);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ \u534f\u65b9\u5dee\u9884\u6d4b&#xff1a;P &#061; F\u00b7P\u00b7F\u1d40 &#043; Q<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15(F, P, FP, 4, 4, 4);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15(FP, F_T, P_pred, 4, 4, 4);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u59ff\u6001\u89e3\u7b97<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ \u56db\u5143\u6570\u66f4\u65b0&#xff1a;q &#061; q &#043; 0.5\u00b7q\u2297\u03c9\u00b7dt<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ \u56db\u5143\u6570\u4e58\u6cd5\u662f4\u00d74\u77e9\u9635\u4e58\u6cd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15(q_matrix, omega, q_dot, 4, 4, 1);<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u795e\u7ecf\u7f51\u7edc\u63a8\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\/\/ \u5168\u8fde\u63a5\u5c42&#xff1a;y &#061; W\u00b7x &#043; b<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15(W, x, y, 1, N, 1);<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">08 \u6e90\u7801\u4e0e\u5de5\u7a0b<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b8c\u6574\u7684Keil\u5de5\u7a0b\u5df2\u4e0a\u4f20Gitee&#xff0c;\u5305\u542b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; GD32F303VGT6\u7684\u5b8c\u6574\u5de5\u7a0b<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; &#096;mat_mul_q15&#096; \u5b8c\u6574\u6e90\u7801&#xff08;\u901a\u7528\u7248 &#043; 2\u00d72 &#043; 3\u00d73 &#043; 4\u00d74&#xff09;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u6027\u80fd\u6d4b\u8bd5\u4ee3\u7801&#xff08;\u4f7f\u7528DWT\u5468\u671f\u8ba1\u6570&#xff09;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#8211; \u7cbe\u5ea6\u6d4b\u8bd5\u4ee3\u7801<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Gitee\u5730\u5740&#xff1a;https:\/\/gitee.com\/jervis_luo\/gd32_mat_mul.git<\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">09 \u603b\u7ed3<\/h2>\n<table border=\"1\" cellspacing=\"0\" style=\"width:288.3000pt\">\n<tbody>\n<tr>\n<td style=\"vertical-align:top;width:163.7500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u6bd4\u7ef4\u5ea6<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:124.5500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">mat_mul_q15()<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:163.7500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5355\u6b214\u00d74\u77e9\u9635\u8017\u65f6\u5468\u671f<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:124.5500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1549<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:163.7500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6700\u5927\u76f8\u5bf9\u8bef\u5dee<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:124.5500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">~0.01%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:163.7500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u662f\u5426\u9700\u8981FPU<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:124.5500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5426<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top;width:163.7500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u9002\u7528\u82af\u7247<\/p>\n<\/td>\n<td style=\"vertical-align:top;width:124.5500pt\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">M0\/M3\/M4\/M7<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e09\u70b9\u6838\u5fc3\u6536\u83b7&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1. \u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5\u7684\u6838\u5fc3\u662fQ\u683c\u5f0f\u7f29\u653e\u2014\u2014Q15\u00d7Q15\u2192Q30&#xff0c;\u7d2f\u52a0\u540e\u53f3\u79fb15\u4f4d\u56de\u5230Q15\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">2. \u7d2f\u52a0\u5fc5\u987b\u7528int64_t\u2014\u2014\u9632\u6b62N\u4e2a\u4e58\u79ef\u4e4b\u548c\u6ea2\u51faint32_t\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">3. \u6267\u884c\u65f6\u95f4\u56fa\u5b9a\u2014\u2014\u6ca1\u6709\u5faa\u73af\u548c\u5206\u652f\u9884\u6d4b\u5931\u8d25&#xff0c;\u5bf9\u5b9e\u65f6\u63a7\u5236\u975e\u5e38\u53cb\u597d\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7cfb\u5217\u6587\u7ae0<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1. fast_sin&#xff1a;\u6bd4\u5b98\u65b9sinf\u5feb14\u500d<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">2. fast_atan2&#xff1a;FOC\u89d2\u5ea6\u8ba1\u7b97\u4f18\u5316&#xff1a;128\u70b9\u67e5\u8868\u6cd5\u8ba9atan2f\u5feb8\u500d<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">3. fast_sqrt&#xff1a;FOC\u77e2\u91cf\u5e45\u503c\u8ba1\u7b97\u4f18\u5316&#xff1a;256\u70b9\u67e5\u8868&#043;\u725b\u987f\u8fed\u4ee3&#xff0c;\u8ba9sqrtf\u5feb2.5\u500d<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">4.fast_exp&#xff1a;\u62c6\u6574\u6570&#043;\u67e5\u8868&#043;\u63d2\u503c&#xff0c;\u5173\u95edFPU\u5feb9\u500d<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">5.fast_log&#xff1a;\u63d0\u53d6\u4e8c\u8fdb\u5236\u6307\u6570&#043;\u67e5\u8868&#xff0c;\u8ba9\u5bf9\u6570\u8fd0\u7b97\u5feb11\u500d<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">6.mat_mul_q15&#xff1a;\u5b9a\u70b9\u77e9\u9635\u4e58\u6cd5&#xff0c;\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f(\u672c\u6587)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u540e\u8bb0&#xff1a;\u5199\u5b8c\u8fd9\u7bc7\u6587\u7ae0\u540e&#xff0c;\u6211\u628a mat_mul_q15()\u00a0\u7528\u5728\u4e86\u81ea\u5df1\u505a\u7684\u5361\u5c14\u66fc\u6ee4\u6ce2\u59ff\u6001\u89e3\u7b97\u91cc\u3002\u539f\u672c\u7528\u6d6e\u70b9\u77e9\u9635\u4e58\u6cd5\u65f6&#xff0c;4\u00d74\u77e9\u9635\u4e58\u6cd5\u6bcf\u4e2a\u5468\u671f\u8981\u82b1\u51e0\u5341\u5fae\u79d2&#xff1b;\u6362\u4e0amat_mul_q15()\u540e&#xff0c;\u76f4\u63a5\u964d\u5230\u51e0\u5fae\u79d2\u3002\u59ff\u6001\u66f4\u65b0\u7387\u4ece1kHz\u63d0\u5347\u5230\u4e865kHz\u3002\u8fd9\u5927\u6982\u5c31\u662f\u4f18\u5316\u7684\u4e50\u8da3\u6240\u5728\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5982\u679c\u4f60\u5bf9\u5b9a\u70b9\u6570\u5b66\u5e93\u611f\u5174\u8da3&#xff0c;\u6b22\u8fce\u5173\u6ce8\u6211\u3002\u8fd9\u4e2a\u7cfb\u5217\u5230\u8fd9\u91cc\u5df2\u7ecf\u8986\u76d6\u4e86 sin()\u3001atan2()\u3001sqrt()\u3001exp()\u3001log()\u00a0\u548c\u77e9\u9635\u4e58\u6cd5&#xff0c;\u57fa\u672c\u8986\u76d6\u4e86\u5d4c\u5165\u5f0f\u4e2d\u6700\u5e38\u7528\u7684\u6570\u5b66\u8fd0\u7b97\u3002\u540e\u7eed\u5982\u679c\u5927\u5bb6\u611f\u5174\u8da3&#xff0c;\u6211\u53ef\u4ee5\u7ee7\u7eed\u5199\u5b9a\u70b9\u77e9\u9635\u6c42\u9006\u3001\u5b9a\u70b9\u5361\u5c14\u66fc\u6ee4\u6ce2\u6216\u8005\u5b9a\u70b9\u795e\u7ecf\u7f51\u7edc\u63a8\u7406\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e94\u7bc7\u6587\u7ae0\u91cc&#xff0c;\u6211\u7528\u624b\u5199\u5b9a\u70b9\u51fd\u6570\u66ff\u6362\u4e86sinf()\u3001atan2f()\u3001sqrtf()\u3001expf()\u3001logf()\u3002\u4f46\u771f\u6b63\u8ba9\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u5934\u75bc\u7684&#xff0c;\u4e0d\u662f\u5355\u4e2a\u6570\u5b66\u51fd\u6570&#xff0c;\u800c\u662f\u77e9\u9635\u8fd0\u7b97\u2014\u2014\u5361\u5c14\u66fc\u6ee4\u6ce2\u3001\u59ff\u6001\u89e3\u7b97\u3001\u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff0c;\u6838\u5fc3\u90fd\u662f\u77e9\u9635\u4e58\u6cd5\u3002\u4eca\u5929\u6211\u4eec\u6765\u624b\u6495\u77e9\u9635\u4e58\u6cd5\u3002<br \/>\n01 \u4e3a\u4ec0\u4e48\u662f\u77e9\u9635\u4e58\u6cd5&#xff1f;<br \/>\n\u5728\u5d4c\u5165\u5f0f\u5f00\u53d1\u4e2d&#xff0c;\u77e9\u9635\u4e58\u6cd5\u7684\u51fa\u573a\u9891\u7387\u6781\u9ad8&#xff1a;<br \/>\n&#8211; \u5361\u5c14\u66fc\u6ee4\u6ce2&#xff1a;\u9884\u6d4b\u548c\u66f4\u65b0\u6b65\u9aa4\u5168\u662f\u77e9\u9635\u4e58<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12972,822,270,1578,1649],"topic":[],"class_list":["post-114062","post","type-post","status-publish","format-standard","hentry","category-server","tag-12972","tag-mcu","tag-270","tag-1578","tag-1649"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/114062.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u4e94\u7bc7\u6587\u7ae0\u91cc&#xff0c;\u6211\u7528\u624b\u5199\u5b9a\u70b9\u51fd\u6570\u66ff\u6362\u4e86sinf()\u3001atan2f()\u3001sqrtf()\u3001expf()\u3001logf()\u3002\u4f46\u771f\u6b63\u8ba9\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u5934\u75bc\u7684&#xff0c;\u4e0d\u662f\u5355\u4e2a\u6570\u5b66\u51fd\u6570&#xff0c;\u800c\u662f\u77e9\u9635\u8fd0\u7b97\u2014\u2014\u5361\u5c14\u66fc\u6ee4\u6ce2\u3001\u59ff\u6001\u89e3\u7b97\u3001\u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff0c;\u6838\u5fc3\u90fd\u662f\u77e9\u9635\u4e58\u6cd5\u3002\u4eca\u5929\u6211\u4eec\u6765\u624b\u6495\u77e9\u9635\u4e58\u6cd5\u3002 01 \u4e3a\u4ec0\u4e48\u662f\u77e9\u9635\u4e58\u6cd5&#xff1f; \u5728\u5d4c\u5165\u5f0f\u5f00\u53d1\u4e2d&#xff0c;\u77e9\u9635\u4e58\u6cd5\u7684\u51fa\u573a\u9891\u7387\u6781\u9ad8&#xff1a; - \u5361\u5c14\u66fc\u6ee4\u6ce2&#xff1a;\u9884\u6d4b\u548c\u66f4\u65b0\u6b65\u9aa4\u5168\u662f\u77e9\u9635\u4e58\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/114062.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-08T00:48:58+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114062.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/114062.html\",\"name\":\"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-08T00:48:58+00:00\",\"dateModified\":\"2026-10-08T00:48:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/114062.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/114062.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114062.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/114062.html","og_locale":"zh_CN","og_type":"article","og_title":"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u4e94\u7bc7\u6587\u7ae0\u91cc&#xff0c;\u6211\u7528\u624b\u5199\u5b9a\u70b9\u51fd\u6570\u66ff\u6362\u4e86sinf()\u3001atan2f()\u3001sqrtf()\u3001expf()\u3001logf()\u3002\u4f46\u771f\u6b63\u8ba9\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u5934\u75bc\u7684&#xff0c;\u4e0d\u662f\u5355\u4e2a\u6570\u5b66\u51fd\u6570&#xff0c;\u800c\u662f\u77e9\u9635\u8fd0\u7b97\u2014\u2014\u5361\u5c14\u66fc\u6ee4\u6ce2\u3001\u59ff\u6001\u89e3\u7b97\u3001\u795e\u7ecf\u7f51\u7edc\u63a8\u7406&#xff0c;\u6838\u5fc3\u90fd\u662f\u77e9\u9635\u4e58\u6cd5\u3002\u4eca\u5929\u6211\u4eec\u6765\u624b\u6495\u77e9\u9635\u4e58\u6cd5\u3002 01 \u4e3a\u4ec0\u4e48\u662f\u77e9\u9635\u4e58\u6cd5&#xff1f; \u5728\u5d4c\u5165\u5f0f\u5f00\u53d1\u4e2d&#xff0c;\u77e9\u9635\u4e58\u6cd5\u7684\u51fa\u573a\u9891\u7387\u6781\u9ad8&#xff1a; - \u5361\u5c14\u66fc\u6ee4\u6ce2&#xff1a;\u9884\u6d4b\u548c\u66f4\u65b0\u6b65\u9aa4\u5168\u662f\u77e9\u9635\u4e58","og_url":"https:\/\/www.wsisp.com\/helps\/114062.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-08T00:48:58+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/114062.html","url":"https:\/\/www.wsisp.com\/helps\/114062.html","name":"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-08T00:48:58+00:00","dateModified":"2026-10-08T00:48:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/114062.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/114062.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/114062.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u77e9\u9635\u4e58\u6cd5\u7684Q15\u5b9a\u70b9\u5b9e\u73b0\uff0c\u8ba9\u5361\u5c14\u66fc\u6ee4\u6ce2\u4e0d\u518d\u62d6\u540e\u817f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=114062"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114062\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=114062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=114062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=114062"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=114062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}