ApplicationReportSPRA494DigitalSignalProcessingSolutionsDecember1998ImplementationofVectorControlforPMSMUsingtheTMS320F240DSPMichelPlatnicDigitalSignalProcessorSolutionsAbstractThisdocumentpresentsasolutionforcontrollingapermanentmagnetsynchronousmotorusingtheTexasInstruments(TI )TMS320C24xdigitalsignalprocessor(DSP).ThenewTMS320C24xfamilyofDSPsoffersacost-effectivedesignofintelligentcontrollersforbrushlessmotorsthatcanfulfillenhancedoperationsconsistingoffewersystemcomponents,lowersystemcost,andincreasedperformances.Thecontrolmethodpresentedreliesonthefieldorientatedcontrol(FOC)togetherwithafield-weakeningoperation.Thisalgorithmmaintainsefficiencyinawiderangeofspeeds,abovenominalspeed,andtakesintoconsiderationtorquechangeswithtransientphasesbycontrollingthefluxdirectlyfromtherotorcoordinates.Thisreportdescribesapracticalsolutionandcorrespondingresults.ContentsIntroduction......................................................................................................................................................3ApplicationDescription.....................................................................................................................................4Convention.......................................................................................................................................................9FOCSoftwareOrganization...........................................................................................................................11ParameterAdaptation....................................................................................................................................15FieldWeakening............................................................................................................................................27Results...........................................................................................................................................................31UserInterface................................................................................................................................................36Conclusion.....................................................................................................................................................36References.....................................................................................................................................................37AppendixA.TMS320F240FOCSoftware....................................................................................................37AppendixB.LinkerFile.................................................................................................................................64AppendixC.SinewaveTable........................................................................................................................65AppendixD.QbasicUserInterface...............................................................................................................67FiguresFigure1.Three-PhaseSynchronousMotorwithOnePermanentMagnetPairPoleRotor.......................3Figure2.ThreeBEMFWaveformsat1000rpm.........................................................................................5Figure3.InverterTopology........................................................................................................................5Figure4.TopViewofTMS320F240EVMBoard.......................................................................................6Figure5.ACPM750EwithaMCK240........................................................................................................7Figure6.StatorCurrentandMagnetFluxSpaceVectorsinthed,qRotatingReferenceFrameanditsRelationshipwiththea,b,cStationaryReferenceFrame...........................................................8Figure7.PMSMControlwithFieldOrientation..........................................................................................8Figure8.FormatCorrespondenceDiagram............................................................................................11Figure9.FOCSoftwareInitializationandOperatingSystem...................................................................11Figure10.GeneralSoftwareFlowchart.....................................................................................................12Figure11.ControlAlgorithmTiming..........................................................................................................12Figure12.WaitingLoop/UserInterface.....................................................................................................13Figure13.ControlRoutineBlockDiagram................................................................................................14Figure14.BlockDiagramoftheFOCIncludingClosedLoopFieldWeakeningControl...........................15Figure15.CurrentMeasurementChain....................................................................................................17F