您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > STM32的PMSM-FOC软件库V4.2培训
基于STM32的+PMSM+FOC软件库培训my参考文档:2.0STM32FOCFWlibraryv2.0新功能(1).pdf基于STM32的+PMSM+FOC软件库培训_1.pdf3.0STM32PMSMFOClibUpdate_SDKV3.0_CHNx.pdfSTM32PMSMFOCSDKV3.2培训课程1.pdf4.0STM32_PMSM_SDK_V4_training_Day1.pdfSTM323phasePMSMMClibraryday1(v4.0).pdf没有下载ST三相电机控制4.2新算法介绍.pdfhands-on_stm32_pmsm-foc-sdk.pdf1.5定子电流被分解成:直轴电流Ids:用于产生磁场,与转子的磁场叠加交轴电流Iqs:用于控制转矩(其作用等同于直流电机的电枢电流)。可进行位置控制(通过瞬时转矩控制)The“MotorProfiler”algorithmwilldeterminethefollowingparameters:•StatorresistanceRs•StatorinductanceLs•BEMFconstantKe•KPandKIofspeedcontroller•Nominalspeedofthemotor一、介绍与应用STM32F100(ValueLine)FOC性能1shunt/sensorless@20kHzPWM,10kHZFOCMotorControlcodesizeis15.82KbMotorControlRAMusageis2.77KbFOCTotalexecutiontimeis65.22us(ADCISR+TIM1UpdateISR)FOCintroducedCPUloadis65.2%TotalCPUloadis~70%(~60%at8kHzFOC)STM32F103FOC性能20.9usecwith3shuntresistor(14.5kBflash;2.5kBRAM)26.1usecwithsingleshuntresistor(16.2kBflash;2.5kBRAM)•3-Shunt:CPUload@10kHzsamplingtime≈25%•1-Shunt:CPUload@10kHzsamplingtime≈30%STM32F103HD,双FOC驱动性能---(1)Motor1,1shunt/sensorless@8kHzPWM/FOC.FluxWeakeningenabledMotor2,1shunt/sensorless@16kHzPWM,8kHZFOC.MotorControlcodesizeis22.3Kb(below1.5timessinglemotorcase)MotorControlRAMusageis4.01KbFOCsintroducedCPUload(includingTIMxUpdateISRs)is44%TotalCPUload~50%STM32F103HD,双FOC驱动性能---(2)Motor1,3shunts/sensorless@16kHzPWM/FOC.MTPAandFluxWeakeningenabledMotor2,1shunt/sensorless@16kHzPWM,8kHZFOC.MotorControlcodesizeis25.5KbMotorControlRAMusageis4.14KbFOCsintroducedCPUload(includingTIMxUpdateISRs)is62.6%TotalCPUload70%FieldOrientedControl:定子电流的幅值和相位相对于转子的磁链独立控制,因此:•必须读取定子的电流(1-shunt/3-shunt/ICS)•必须读取转子的位置及速度(Encoder/Hall/Sensorless算法)•电流的实时控制(PI/D):•不容易控制:高频正弦参考值、幅值的调制及与转子磁链的耦合•通过参考坐标系的转换来简化耦合问题速度及位置检测支持:•Encoder•成本较高,一般适用于伺服控制•Hall•成本较低,一般适用于马达静止或低速下也要求额定扭矩的应用•Sensorless•高频注入算法–HFI•适用于凸极马达(IPMSM,LdLq)•能实现马达转子位置的精确检测,即使在静止或低速下•仅STM32F3和STM32F4系列支持•StateObserver+PLL•基于马达的BEMF,使用相电流及相电压估计马达转子的位置•适用于马达的转速范围:额定转速的5%-100%•StateObserver+CORDIC二、库2.0三、不同库中的不同算法3.0库3.2库中4.0库中4.2库中4.2库中四、电机参数测量PolepairnumberThenumberofpolepairsisusuallyprovidedbythemotorsupplier,butincaseit’snotorifyou’dliketodoublecheckit:•ConnectaDCpowersupplybetweentwo(ofthethree)motorphasesandprovideupto5%oftheexpectednominalDCbusvoltage.(Youmayalsosetcurrentprotectiontonominalmotorcurrent.)•Rotatethemotorwithyourhands,youshouldnoticealittleresistance,otherwise:•Ifyouarenotabletorotatethemotor,decreasetheappliedvoltage.•Ifthemotordoesnotgenerateanyresistance,graduallyincreasetheappliedvoltage.•Thenumberofrotorstablepositionsinonemechanicalturnrepresentsthenumberofpolepairs.Statorresistanceandinductance•Usingthemultimeter,measuretheDCstatorresistancephase-to-phase(Rs)anddivideitbytwo.•ConnecttheDCvoltagebetweentwomotorphases.•Connecttheoscilloscopevoltageandcurrentprobesasshowninthefigure.•Increasethevoltageuptothevaluewherethecurrentequalsthenominalvalue,rotorwithalign.•Don’tmovetherotoranymore.Statorresistanceandinductance•DisablethecurrentprotectionofDCvoltagesource.•Unplugoneterminalofthevoltagesourcecablewithoutswitchingitoff.•Plugthevoltagesourcerapidlyandmonitoronthescopethevoltageandcurrentwaveformuntilyougetsomethingliketheoneshowninthefigure.•ThemeasurementisgoodifthevoltagecanbeassimilatedtoastepandthecurrentincreasesuchasI *(1-e-t*L/R).•Measurethetimerequiredtocurrentwaveformtoriseupto63%.•ThistimeisLd/Rsconstant.MultiplyitbyRsandyou’llgetLdvalue.BackEMFconstantKe•TheBack-EMFconstantrepresentstheproportionalityconstantbetweenthemechanicalmotorspeedandtheamplitudeoftheB-EMFinducedintothemotorphases:•TomeasureKe,itusuallysufficestoturnthemotorwithyourhands(orusingadrilloranothermotormechanicallycoupled)anduseanoscilloscopetolookforthephase-to-phaseinducedvoltage(VBemf)MeasuretheVBemffrequency(fBemf)andthepeak-to-peakamplitude(VBemf–A)•ComputeKeinVRMS/KRPM:五、详细介绍3.2库(STM32PMSMFOClibUpdate_SDKV3.0_CHNx.pdf)3.2库中有视频5.1结构体系:层结构•SDK软件库分为若干个软件层,分别为:MCU标准外设软件库、马达控制库及马达控制应用层•还包含用户界面层及FreeRTOS模块STM32FxxxstandardperipheralslibraryandCMSISlibrary•Motorcontrollibrary•Motorcontrolapplication•Demonstrationuserproject•每一个马达控制软件的workspace包含有2个project:•MCLibraryproject•Userproject(包含MCApplication层):即在V4.0中,Userproject层和MCApplication层被放到了同一层•每个project都需要分别编译,并最终连接生成可执行代码5.2OOP:面向对象编程(ObjectOrientedProgramming)•OOPisaprogrammingstyle;thedataandthefunctionsthatoperateonitarepackedtogether,forminganObject•InstanceMethodsarefunctionsassociatedwithanobject;•Classisthefactoryfromwhichobjectsarecreated.Itisauserdefineddatatype(variables,properties,methods).•AdedicatedCembodimentofOOPhasbeendevelopedforimplementingtheMCLibrary对象(Object)对象是一个数据结构和函数的集合,其函数允许对对象自己的数据进行操作数据结构包含了对象的属性及变量,它描述了对象的状态类(Class)用户自定义的数据类型,包含了变量,属性及方法一个类可以用来产生多个单独的对象方法(Method)方法是唯一的可以改变对象的内部状态的操作,它通过修改对象的变量及属性来实现对象内部变量对于对象的使用者而言是隐藏的:数据的封装及隐藏特性接口(Interface)对象与外界的接口是由其定义的方法来实现通过方法实现对象与外界的接口使得类的使用更严谨•Object•Theobjectisacollectionofdatastructure(members)andfunctions(methods)allowedoperatingonthedatastructureitself.•Datastructurecontainsbothobjectpropertiesandvariablesandcanalsobereferencedasthestateoftheobject•Class•Userdefi
本文标题:STM32的PMSM-FOC软件库V4.2培训
链接地址:https://www.777doc.com/doc-4358359 .html