当前位置:网站首页>stm32和電機開發(上比特系統)
stm32和電機開發(上比特系統)
2022-07-02 10:29:00 【嵌入式-老費】
【 聲明:版權所有,歡迎轉載,請勿用於商業用途。 聯系信箱:feixiaoxing @163.com】
電機本身的開發一般都是用PID或者FOC完成的。但是,作為一個系統來說,在stm32之前,一般還會有一個主機系統,這個主機系統一般跑linux系統或者是windows系統。如果是linux系統,那麼一般是各種各樣的soc;如果是windows系統,一般就是pc電腦了。
為了說明電機控制系統和上層是怎麼交互的,我們可以拿寫字機做一個說明。寫字機一般是拿pc當作主機進行處理,對圖像進行預處理後,生成一條一條的控制命令。這些命令,通過串口發送給stm32,經過串口解析、插值、速度規劃、x/y/z控制之後,就可以把對應的圖像通過筆的書寫打印出來。類似的方法還可以用於雕刻、3d打印等場合。
有了上面的說明,我們可以嘗試理解下,一個主機系統需要做哪些動作;
a)掃描圖像;
b)灰度處理;
c)生成控制指令;
d)通過串口將這些指令發送給mcu;
e)接收執行結果,將進展反饋到屏幕上面。
上面說的是寫字機。我們可以換一種場景,比如說機器人。假設有這麼一個三只輪子的機器人,前面是主動輪,它可以前進、後退、左右旋轉,後面是從動輪,沒有任何控制。如果設計目標是讓這個機器人從A點走到B點,那麼它應該怎麼做呢?一般來說,可以分解成這麼幾個步驟來完成,
a)利用搜路算法,搜索一條沒有障礙的路;
b)依據最小轉彎半徑要求將這條路進行分段處理,有最小段距離要求;
c)再根據速度限制條件規劃出每一段的入口速度、出口速度、入口角度、出口角度;
d)將路徑信息、轉彎半徑信息、速度信息、角度信息、分段信息發送mcu;
e)循環接收執行結果,將進展實時通過log打印出來。
通過上面的兩個系統,我們發現上比特系統更偏重於算法的整體布局。等算法這部分做好了,再全部交給mcu來執行。因此,控制才是mcu的强項,算法不是。畢竟,mcu的頻率和性能都在那放著,不能指望mcu做超出它能力的事情。
電機的實際使用範圍非常廣泛,不管是消費領域、工業領域、軍工領域,都發揮著巨大的作用。控制好電機只是第一步,最主要的還是用上比特系統生成控制指令,發送給電機,讓它來正常工作滿足我們的需求,這才是學習電機的根本目的,不能僅僅是為了學習電機而學習電機。不同的場景,控制的要求也不同,比如有的要求更快,有的要求更准,有的要求成本更低,每一種場景都有自己特定的約束條件,這些只能在工作中不斷練習和感受了。
边栏推荐
- Blender multi lens (multi stand) switching
- Blender摄像机环绕运动、动画渲染、视频合成
- What is call / cc- What is call/cc?
- 2021-10-04
- MySQL -- time zone / connector / driver type
- flume 190 INSTALL
- [unity3d] nested use layout group to make scroll view with dynamic sub object height
- webUI自动化学习
- Unreal material editor foundation - how to connect a basic material
- 01安装虚拟机
猜你喜欢
pytest框架实现前后置
[unreal] animation notes of the scene
JS reduce accumulator
Blender体积雾
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
Blender model import UE, collision settings
Allure -- common configuration items
Flink实时计算topN热榜
It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
Edge computing accelerates live video scenes: clearer, smoother, and more real-time
随机推荐
UE illusory engine programmed plant generator setup -- how to quickly generate large forests
Bookmark collection management software suspension reading and data migration between knowledge base and browser bookmarks
A model can do two things: image annotation and image reading Q & A. VQA accuracy is close to human level | demo can be played
Pytest-- test report allure configuration
[illusory] weapon slot: pick up weapons
【虚幻】过场动画笔记
2837xd code generation module learning (3) -- IIC, ECAN, SCI, watchdog, ECAP modules
Spatial interpretation | comprehensive analysis of spatial structure of primary liver cancer
ERROR 1118 (42000): Row size too large (> 8126)
Webui automated learning
2.14 is it Valentine's day or Valentine's day when the mainstream market continues to fluctuate and wait for changes?
【Lua】常见知识点汇总(包含常见面试考点)
Allure -- common configuration items
Postman--使用
sqoop的表的导入
UE5——AI追逐(藍圖、行為樹)
[unity3d] production progress bar - make image have the functions of filled and sliced at the same time
[unity3d] nested use layout group to make scroll view with dynamic sub object height
Determine whether there are duplicate elements in the array
Brief analysis of edgedb architecture