STM32 PMSM FOC SDK_Part7(共11份)
STM32 PMSM FOC 库的讲解,视频讲义
Agenda 1st day– Afternoon MC Application Interface Tuning Tasks Classes interaction Current regulation Ramp-up Encoder alignment
1
Speed sensors updates: Sensorless algorithm improvement
How to create User Project Interacting with MC Application Dual motor control Resources sharing Supported configurations Code size efficiency
Current reading sensor update
STM32 PMSM FOC SDK v3.2
29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
Dual motor control requirements In present implementation of dual FOC, two advanced timers are required (this limit the feasibility to big piranha) Consider that CPU is shared between the two controls FOC execution (i.e. CPU utilization) related to each of the drives must be synchronous with the related PWM signal Depending on current sensing HW topology, ADC peripherals could also require to be shared (e.g. 2x three shunts)
2
This limit the possible configurations and force to take some design decisions: The two drive must have PWM frequencies multiple one of the other The two drive may have different repetition counters The two timers must be synchronized so that the update events of the timers do not overlap (related to present implementation)STM32 PMSM FOC SDK v3.2 29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
ADC peripherals usage When possible ADCs peripherals have been dedicated to a given drive so that - in its turn - a drive can have dedicated ADC(s) When not possible a mechanism for sharing ADCs between the drive must be put in place
3
Three shunts and ICS current reading HW topology requires two ADCs (so as to perform simultaneous sampling of two currents) Single shunt drive requires only one ADC Motor 1 Motor 2 Three shunts ICS Three shunts ICS ADC1: Three shunt/ICS* ADC2: Three shunt/ICS* ADC3: Single shunt
ADC1: Three shunt/ICS ADC2: Three shunt/ICS ADC3: Single shunt ADC1: Single shunt ADC2: ADC3: Single shuntSTM32 PMSM FOC SDK v3.2 29/03/2013
Single shunt
ADC1: Three shunt/ICS ADC2: Three shunt/ICS ADC3: Single shunt
* Shared resources
STM32 PMSM FOC 库的讲解,视频讲义
ADC peripherals sharing: basics If at least one drive is in single shunt topology no resources sharing is required No limitations occur in this case
4
In case of dual three-shunts, ICS or any combination of them Drives must not require ADCs usage at the same time PWM patterns should be properly shifted each other
There must be a moment where ADCs are re-configured so as to serve a given drive For instance the set of channels to be converted and the triggering event must be re-configured
This moment will be referred as‘context switching’
STM32 PMSM FOC SDK v3.2
29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
ADC peripheral sharing When context switching should be performed? 3 shunts and ICS configurations require ADC conversions to be executed synchronously with PWM
5
More precisely conversions must be performed: With the same occurrence rate of the Update events (i.e. once each 1
, 2, 3,… PWM periods) In case of 3 shunts, conversions must be performed in proximity of the counter crest (where the three low side switches are closed and the related currents accessible) For simplicity, in case of ICS as well current conversions are executed on counter crest
In present implementation it has been decided to perform context switching in the TIMx Update ISR leading by half PWM period the ADC usageTIM1
U
U
ADC1 and ADC2 in use
STM32 PMSM FOC SDK v3.2
29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
TIMx Update ISR: switch context algorithmDrive1 TIM1
6
U
U
U
U
Drive2 TIM8
UDriver1 Trigger range TW2 Driver2 Trigger range
UDriver1 Trigger range Driver2 Trigger range
U
UDriver2 Trigger range TW1 Driver1 Trigger range TW2
Driver1 Trigger range
TW1
TW2
TW1
TW2
Twn is the maximum delay between counter crest and latest conversion in drive nSwitch context algorithm Check ADC1 JSTRT and JEOC bits Check ADC1 JSTRT and JEOC bits JSTRT 1 JEOC 1 JSTRT 1 JEOC 0 JSTRT 0 JEOC 0 Change ADC triggers, channels, sampling time
JSTRT 1 JEOC 1
JSTRT 1 JEOC 0
JSTRT 0 JEOC 0
NIs JEOC set?
Wait maximum delay Twn
N
Is JEOC set?
Y
YSTM32 PMSM FOC SDK v3.2 29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
Example 1, drives have same fPWMDrive1 TIM1
7
U
U
U
U
Drive2 TIM8
UDriver1 Trigger range TW2 Driver2 Trigger range
UDriver1 Trigger range Driver2 Trigger range
U
UDriver2 Trigger range TW1 Driver1 Trigger range TW2
Driver1 Trigger range
TW1
TW2
TW1
TW2
TIM1_CH4
ADC Start
ADC Start
ADC Start
ADC Start
ADC Start TIM8_CH4 Delay ISR TIM8 Up. Delay ISR TIM1 Up. Delay ISR TIM8 Up.
ADC Start
ADC Start
Delay ISR TIM1 Up.
Delay ISR TIM8 Up.
Delay ISR TIM1 Up.
Delay ISR TIM8 Up.
During TIMx Update event ISR, it’s necessary to wait for ADC to finish conversions before switching the contextSTM32 PMSM FOC SDK v3.2 29/03/2013
STM32 PMSM FOC 库的讲解,视频讲义
Example 2 fPWM1= 2*fPWM2 For drive 1 fPWM1/ fFOC1= 2 (FOC executed each 2 PWM cycles) For drive 2 fPWM2/ fFOC2= 1 (FOC executed each PWM cycle)Drive1 TIM1
8
U
U
U
Drive2 TIM8
UDriver1 Trigger range Driver2 Trigger range
UDriver1 Trigger range Driver2 Trigger range
TIM1_CH4
ADC Start
ADC Start
ADC Start TIM8_CH4 Delay ISR TIM8 Up. Delay ISR TIM1 Up. Delay ISR TIM8 Up.
ADC Start
STM32 PMSM FOC SDK v3.2< …… 此处隐藏:6134字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [行业范文]美好的法语句子
- [行业范文]描写露珠的句子
- [行业范文]精彩禅语句子图片
- [行业范文]关于满嘴谎言的句子
- [行业范文]关于安静的句子48句
- [行业范文]关于小河的句子
- [行业范文]描写稻田的句子
- [行业范文]思念好朋友的句子
- [行业范文]赞美雪的句子
- [行业范文]早上激励人心的句子
- [行业范文]失恋忧伤的句子
- [行业范文]努力积极向上的句子
- [行业范文]对工作心灰意冷的句子
- [行业范文]失恋让人心疼的句子
- [行业范文]描写珍惜青春的句子
- [行业范文]表达思念的句子简短
- [行业范文]关于父爱的句子范例
- [行业范文]浪漫的英语句子
- [行业范文]关于周末的句子
- [行业范文]思念牵挂的句子
- 有关感恩班会课件简短(二篇)(感恩班会
- 2025年初二下乡军训心得体会800字(15篇
- 关于新员工培训方案汇编(关于新员工培
- 精选高考生寒假学习计划书(精)(高考生
- 毕业实训报告心得体会(3篇)(实训报告心
- 银行工作感悟及心得范文怎么写(四篇)(
- 精选领导干部个人政治画像报告通用(七
- 精选超市11.11活动促销方案(精品超市品
- 2025年怎么做自我介绍汇总(5篇)(至2025
- 最新企业错峰生产方案(26篇)(山西企业
- 最新暑期三下乡社会实践调研报告范本(
- 最新幼儿园大班教育教学总结怎么写(最
- 最新教师节主持词小学(优秀9篇)(教师节
- 关于小学安全教育教学方案(推荐)(关于
- 员工信模板范文怎么写(五篇)(员工信息
- 最新保险销售离职申请书(十六篇)(最新
- 最新XX小学防校园欺凌工作方案怎么写(2
- 有关特岗教师辞职信范文(推荐)(特岗教
- 精选党的建设工作要点简短(党的建设的
- 如何写安康杯竞赛活动总结汇总(4篇)(安




