您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > 如何在matlab中使用NXP-MCU的工具箱和数学函数库以及其他调试工具
ExternalUseTMHands-OnWorkshop:MotorControlToolboxforMagniV-MATLAB/SimulinkModelingandCodeGenerationAMF-ACC-T1114SEPT.2015MikeDoidge|MCDToolboxManagerJohnH.Floros|FieldApplicationEngineerTMExternalUse1Agenda•Overview:20minutes−IntroductionandObjectives−MotorControlDevelopmentToolbox:Libraryblocks,FreeMASTER,andBootloader•Hands-OnDemo:50minutes−MotorKit(DescribeFreescale3-PhaseMotorKit)−ConvertsimplemodeltorunonMotorKitwithMCDToolboxanduseFreeMASTER•ModelBasedDesign:10minutes−ModelBasedDesignSteps:Simulation,SIL,PILandISO26262−SIL/PILHands-OnDemoStep2&3ofMBD•MotorControl:20minutes−FOCSensor-lesscontrolandhowtouseittoturnamotor•MotorControlHands-OnDemo:80minutes−ImplementFOCSensor-lessMotorControlonMotorKit−RunsoftwarefromthemodelanduseFreeMASTERtomonitor•SummaryandQ&A:10minutesTMExternalUse2Introduction:WhatDoWeDo?•OneoftheAutomotiveToolsEnablement&Engineeringgroup’sobjectivesistodevelopsoftwareenablementtoolstoassistourcustomerswithrapidprototypingandacceleratealgorithmdevelopmentontheirtargetFreescaleMCU•ThisincludessoftwaretoolsthatautomaticallygenerateperipheralinitializationcodethroughGUIconfiguration,togeneratingperipheraldrivercodefromaModelBasedDesignenvironmentlikeSimulink™TMExternalUse3Introduction:ModelBasedDesign(MBD)•ModelBasedDesignisbecomingmorecommonduringthenormalcourseofsoftwaredevelopmenttoexplainandimplementthedesiredbehaviorofasystem.Thechallengeistotakeadvantageofthisapproachandgetanexecutablethatcanbesimulatedandimplementeddirectlyfromthemodeltohelpyougettheproducttomarketinlesstimeandwithhigherquality.Thisisespeciallytrueforelectricmotorcontrolsdevelopmentinthisageofhybrid/electricvehiclesandtheindustrialmotorcontrolapplicationspace.•Manycompaniesmodeltheircontrolleralgorithmandthetargetmotororplantsotheycanuseasimulationenvironmenttoacceleratetheiralgorithmdevelopment.•ThefinalstageofthistypeofdevelopmentistheintegrationofthecontrolalgorithmsoftwarewithtargetMCUhardware.Thisisoftendoneusinghandcodeoramixofhandcodeandmodel-generatedcode.MotorControlDevelopmentToolboxallowsthisstageofthedevelopmenttogenerate100%ofthecodefromthemodel.TMExternalUse4Introduction:MotorControlDevelopmentToolbox•TheMotorControlDevelopmentToolboxincludesanembeddedtargetsupportingFreescaleMCUsandSimulink™plug-inlibrarieswhichprovideengineerswithanintegratedenvironmentandtoolchainforconfiguringandgeneratingthenecessarysoftware,includinginitializationroutines,devicedrivers,andareal-timeschedulertoexecutealgorithmsspecificallyforcontrollingmotors.•ThetoolboxalsoincludesanextensiveAutomotiveMathandMotorControlFunctionLibrarydevelopedbyFreescale’srenownedMotorControlCenterofExcellence.ThelibraryprovidesdozensofblocksoptimizedforfastexecutiononFreescaleMCUswithbit-accurateresultscomparedtoSimulink™simulationusingsingle-precisionmath.•Thetoolboxprovidesbuilt-insupportforSoftwareandProcessor-in-the-Loop(SILandPIL),whichenablesdirectcomparisonandplottingofnumericalresults.MathWorksproductsrequiredforMCToolbox:−MATLAB(32-Bitor64-Bit)*−Simulink−MATLABCoder−SimulinkCoder−EmbeddedCoder*Earlierreleasedproductsonlysupport32-bitTMExternalUse5Introduction:ReduceDevelopmentTimeWithMBDandMCToolboxSystemRequirementsModeling/SimulationRapidPrototypeTargetMCUImplementationHILTestingFunctionalTestingTimeUsesoftware-basedmodelvs.paper-basedmethod,andstarttestingatveryearlieststage.ConvertmodeltoSILandnowcantestANSI-generatedsoftware.CanalsouseMClibrarywithSILtesting.WithMClibraryandMCToolbox,testModelusingtargetMCUandcompilerthroughPILtesting.WithMCToolbox,auto-generatecodefordirectinterfaceofperipheralsfortargethardwarewithoutanymanualhandcode.Nowthatmoretestingontargethasoccurredearlierintheprocess,HILtestingtimeisreduced.Fewerdefectsfoundinthisphaseoftesting,wherefindingdefectsisexpensive.UsingFreescale’sMotorControlDevelopmentToolboxwithModelBasedDesignandyoucanreducedevelopmenttimefromthis.ReduceTimefromThis...TMExternalUse6Introduction:ReduceDevelopmentTimeWithMBDandMCToolboxSystemRequirementsModeling/SimulationRapidPrototypeTargetMCUImplementationHILTestingFunctionalTestingTimeToThis!TMExternalUse7Objectives•AfterthisHands-OnWorkshop,youwillbeableto:−UsetheMotorControlDevelopmentToolboxtoauto-generateandbuildsoftwarefortheMCUdirectlyfromtheMATLAB™/Simulink™environment.−ConfiguretheMCUperipheralsrequiredtoimplementthreephasemotorcontrolusingtheMCUandthelow-voltageThreePhaseMotorControlKit.−ImplementFOCMotorControlfromamodelbaseddesignenvironmentandautogeneratethecodetorunthebrushlessDCMotorprovidedwiththeMotorKit.−KnowhowMotorControlToolboxcanhelpwithyourmotorcontroldevelopmentprojectsandFreescaleMCUs.TMExternalUse8Objectives•ExposuretoFreescale’shardware/softwareenablementSignalVisualizationandDataAcquisitionToolModel-baseddesignDriverconfigurationAssignmenttopinsInitializationsetupMotorControlDevelopmentToolboxwithSimulink™MTRCKTSBNZVM128BLDCMotorControlDevKitTMExternalUse9Agenda•Overview:20minutes−IntroductionandObjectives−MotorControlDevelopmentToolbox:Libraryblocks,FreeMASTER,andBootloader•Hands-OnDemo:50minutes−MotorKit(De
本文标题:如何在matlab中使用NXP-MCU的工具箱和数学函数库以及其他调试工具
链接地址:https://www.777doc.com/doc-6873577 .html