当前位置:网站首页>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做超出它能力的事情。
電機的實際使用範圍非常廣泛,不管是消費領域、工業領域、軍工領域,都發揮著巨大的作用。控制好電機只是第一步,最主要的還是用上比特系統生成控制指令,發送給電機,讓它來正常工作滿足我們的需求,這才是學習電機的根本目的,不能僅僅是為了學習電機而學習電機。不同的場景,控制的要求也不同,比如有的要求更快,有的要求更准,有的要求成本更低,每一種場景都有自己特定的約束條件,這些只能在工作中不斷練習和感受了。
边栏推荐
- Zlib download and use
- Postman--使用
- 【MySQL】连接MySQL时出现异常:Connection must be valid and open
- [unity3d] cannot correctly obtain the attribute value of recttransform, resulting in calculation error
- How much is it to develop a system software in Beijing, and what funds are needed to develop the software
- [illusory] weapon slot: pick up weapons
- Pycaret | a few lines of code to solve machine learning modeling
- Project practice, redis cluster technology learning (11)
- ICLR 2022: how does AI recognize "things I haven't seen"?
- Network real-time video streaming based on OpenCV
猜你喜欢

Allure -- common configuration items
![[Fantasy 4] the transformation from U3D to UE4](/img/bb/665eba3c8cd774c94fe14f169121da.png)
[Fantasy 4] the transformation from U3D to UE4

Remember the use of add method once

Notes de base sur les plans illusoires d'IA (triés en 10 000 mots)

pytest--之测试报告allure配置

UE5——AI追逐(蓝图、行为树)

Introduction and Principle notes of UE4 material

2837xd code generation module learning (3) -- IIC, ECAN, SCI, watchdog, ECAP modules

sqoop创建job出现的一系列问题解决方法

快速做出原型
随机推荐
【虚幻4】UMG组件的简介与使用(更新中...)
2.14 is it Valentine's day or Valentine's day when the mainstream market continues to fluctuate and wait for changes?
Post disaster reconstruction -- Floyd thought
It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
Blender多镜头(多机位)切换
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
02-taildir source
Nonlinear optimization: establishment of slam model
Leetcode -- the nearest common ancestor of 236 binary tree
[ue5] blueprint making simple mine tutorial
Operator exercises
Blender摄像机环绕运动、动画渲染、视频合成
Delivery mode design of Spartacus UI of SAP e-commerce cloud
MySQL -- time zone / connector / driver type
2837xd code generation module learning (2) -- ADC, epwm module, timer0
Webui automated learning
[illusory] weapon slot: pick up weapons
stm32和电机开发(上位系统)
VLAN experiment
MPLS experiment