• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: BLDC sine wave generation by PIC16
#10
版主
版主


查看用戶資訊
同意 edwardlee 的說法,
很奇怪的是你要使用 Sine PWM for BLDC 馬達,但卻指定要用 PIC16F 的元件? 是不是使用的 BLDC 只是一般的散熱風扇,只要用 PWM 的 Duty 就可以控制轉速;還是真正的三相式的 BLDC 馬達所要用的 Sine-Wave PWM? 這兩種控制方式差很多恨多。

在 Microchip 所提供的 Sin( ) 函數所計算出的值為浮點數,MCU 處理浮點數只能用一個字形容就是慢啊! 所以要轉成整數/分數(Q15) 格式的表格來計算。

發表於: 2008/4/14 10:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#9
資深會員
資深會員


查看用戶資訊
C_H_M老大哥說的一點都沒錯, 加一票.

題外話一問, BLDC一般不是三相, 除非是電腦FAN那種?
PIC16能夠輸出3組PWM?
看來用DSP太久, 不知PIC16的進展了.
網路規格寫3 -CCP就是嗎?
互補由外部硬體延伸?
雖然我現在做的是SVPWM, 沒有DSP, 會算不完, 但是好奇一問, 歹勢.

發表於: 2008/4/14 8:23
Thanks,
Edward Lee
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#8
中級會員
中級會員


查看用戶資訊
看來你是有點搞混了,

建立 sin 表格為的是節省執行時間, 它的公式就是 sin()

--------------------------------------------------------------------
在建立 sin 表格時需額外注意的事項是 sin() 傳回值範圍

-1.0 <= sin <= 1.0

而既然已經是為了節省執行時間, 沒有理由建成浮點數型式的表格

所以呢! 絕大部分的情形會以 sin() * 1000 這類的方式來建立 sin 表格

在使用到表格運算的時候, 記得要將 倍率比 考慮到喔!

然後再一項是角度的解析度問題, 當然是看你自己的使用情形而訂

如以下例子: 0-90 度, 分為 10 段 (90/10 = 9度), 倍率 1000

sin(0)*1000sin(9)*1000sin(18)*1000sin(27)*1000sin(36)*1000sin(45)*1000
[color=CC0000]     0          156             309          454          588          707[/color]
sin(54)*1000sin(63)*1000sin(72)*1000sin(81)*1000sin(90)*1000

[color=CC0000]      809          891          951          988          1000[/color]

以上是我所知道的, 希望對你有幫助 !!!

----------------------------------------------
最後, 你所貼上來的表格
我想它所表示的意思為,

這一個表格內容為 sin(0) 到 sin(60),
角度分切的桯度為 1024代表 360度,
那麼 60度的表格 , 60/360 * 1024 = 171 個分段(項),
加上 sin(0) 這一項則為 172 項

那麼 0 的下一項應該就是 sin(60/171)*K
sin(0.3508...) * K = 201
K = 32822
因為該值應該會經四捨五入的處理, 以及整數 正/負數範圍為 -32768 ~ +32767 的條件來考慮
所以, 原本的實際 倍率值 應該極可能為 32767 吧!

發表於: 2008/4/12 23:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#7
新會員
新會員


查看用戶資訊
// electrical cycle -- 1024*(60/360) = 171)
// The table covers 60 degrees of the sine function.

const int sinetable[] =
{0,201,401,602,803,1003,1204,1404,1605,1805...}


他有172正弦數值

請問201這個數值是如何帶出來的!!
感謝!!

小弟想了很久帶不出來
請前輩幫幫忙~~感謝!

發表於: 2008/4/12 17:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#6
資深會員
資深會員


查看用戶資訊
公式??
不懂您意思
是指不知道sin30度 sinxx度 怎麼算嗎??
還是pwm?

發表於: 2008/4/12 17:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#5
新會員
新會員


查看用戶資訊
我也想用計算機算阿!
但是不知道是如何代公式出來的所以想要寮解如何帶出
sine wave表!!

請前輩指教~~謝謝!!

發表於: 2008/4/12 17:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#4
資深會員
資深會員


查看用戶資訊
當然是自己用計算機一個個慢慢按阿,
然後把數值填到source code去
粉辛苦,但是也只辛苦一次啦

懶的用計算機慢慢按的話,用excel也是不錯

發表於: 2008/4/12 16:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#3
新會員
新會員


查看用戶資訊
請問版主Sine-Wave Table昰如何建表的呢??
請問有公式可以帶出SIN TABLE嗎??

發表於: 2008/4/12 15:25
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: BLDC sine wave generation by PIC16
#2
版主
版主


查看用戶資訊
假設每三度漸一個 Sine-Wave Table 表,當Sin 0 時就查就查 sin=0 的表,此時第二輸出為sin120 就步進 120/3=40 就查第40個表就可以了。因為各個PWM輸出只有角度差別,所以就索引到其角度差的表格就可以了。

發表於: 2008/1/28 18:38
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


BLDC sine wave generation by PIC16
#1
初級會員
初級會員


查看用戶資訊
請教各位前輩 小弟想把目前BLDC驅動方式從梯形波改成正弦波 找了很多資料
但我目前想用PIC16配合周邊電路 先用OPEN LOOP方式產生適當的PWM驅動INVERTER 產生SINE WAVE於馬達三相
看了許多資料 但卻找不到 120度 SINE WAVE驅動時 MCU端應該送出的PWM的時序圖之類的資料 目前小弟想先從實做著手
請教各位前輩能否有相關清楚的資料提供 謝謝


發表於: 2008/1/28 18:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------