You are on page 1of 8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

SimulateVariableSpeedMotorControl
Introduction
Inthissectionyou

UseelectricalmachinesandpowerelectronicstosimulateasimpleACmotordrivewithvariablespeedcontrol

LearnhowtousetheUniversalBridgeblock

Discretizeyourmodelandcomparevariablestepandfixedstepsimulationmethods

LearnhowtousetheMultimeterblock

LearnhowtousetheFFTtool

VariablespeedcontrolofACelectricalmachinesmakesuseofforcedcommutatedelectronicswitchessuchasIGBTs,
MOSFETs,andGTOs.Asynchronousmachinesfedbypulsewidthmodulation(PWM)voltagesourcedconverters(VSC)
arenowadaysgraduallyreplacingtheDCmotorsandthyristorbridges.WithPWM,combinedwithmoderncontrol
techniquessuchasfieldorientedcontrolordirecttorquecontrol,youcanobtainthesameflexibilityinspeedandtorque
controlaswithDCmachines.ThissectionshowshowtobuildasimpleopenloopACdrivecontrollinganasynchronous
machine.Chapter4willintroduceyoutoaspecializedlibrarycontainingmodelsofDCandACdrives.These"readyto
use"modelswillenableyoutosimulateelectricdrivesystemswithouttheneedtobuildthosecomplexsystemsyourself.
TheMachineslibrarycontainsfourofthemostcommonlyusedthreephasemachines:simplifiedandcomplete
synchronousmachines,asynchronousmachine,andpermanentmagnetsynchronousmachine.Eachmachinecanbe
usedeitheringeneratorormotormode.Combinedwithlinearandnonlinearelementssuchastransformers,lines,loads,
breakers,etc.,theycanbeusedtosimulateelectromechanicaltransientsinanelectricalnetwork.Theycanalsobe
combinedwithpowerelectronicdevicestosimulatedrives.
ThePowerElectronicslibrarycontainsblocksallowingyoutosimulatediodes,thyristors,GTOthyristors,MOSFETs,and
IGBTdevices.Youcouldinterconnectseveralblockstogethertobuildathreephasebridge.Forexample,anIGBT
inverterbridgewouldrequiresixIGBTsandsixantiparalleldiodes.
Tofacilitateimplementationofbridges,theUniversalBridgeblockautomaticallyperformstheseinterconnectionsforyou.
PWMControlofanInductionMotor

https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

1/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

BuildingandSimulatingthePWMMotorDrive
FollowthesestepstobuildaPWMcontrolledmotor.
AssemblingandConfiguringtheModel
1.Openanewwindowandsaveitaspower_PWMmotor.
2.OpenthePowerElectronicslibraryandcopytheUniversalBridgeblockintoyourmodel.
3.OpentheUniversalBridgedialogboxandsetitsparametersasfollows:
IGBT/Diodes

Powerelectronicdevice
Snubber

Rs

1e5

Cs

inf

Ron

1e3

Vf

0V

Vfd

0V

Tf

1e6s

Tt

1e6s

Forwardvoltages

Tail

NoticethatthesnubbercircuitisintegraltotheUniversalBridgedialogbox.AstheCscapacitorvalueofthesnubber
issettoInf(shortcircuit),weareusingapurelyresistivesnubber.Generally,IGBTbridgesdonotusesnubbers
however,becauseeachnonlinearelementinSimscapePowerSystemssoftwareismodeledasacurrentsource,
https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

2/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

youhavetoprovideaparallelpathacrosseachIGBTtoallowconnectiontoaninductivecircuit(statorofthe
asynchronousmachine).Thehighresistancevalueofthesnubberdoesnotaffectthecircuitperformance.
4.OpentheMachineslibrary.CopytheAsynchronousMachineSIUnitsblockintoyourmodel.
5.OpentheAsynchronousMachinedialogboxandsetitsparametersasfollows:
Nominalpower,voltage(lineline),andfrequency

[3*746,220,60]

Statorresistanceandinductance

[1.1150.005974]

Rotorresistanceandinductance

[1.0830.005974]

Mutualinductance

0.2037

Inertiaconstant,frictionfactor,andpolepairs

[0.020.0057522]

Settingthenominalpowerto3*746VAandthenominallinetolinevoltageVnto220Vrmsimplementsa3HP,60Hz
machinewithtwopairsofpoles.Itsnominalspeedisthereforeslightlylowerthanthesynchronousspeedof1800
rpm,orws=188.5rad/s.
6.NoticethattheRotortypeparameterissettoSquirrelcage,andthereforethethreerotorterminalsa,b,andcare
notaccessible,becauseduringnormalmotoroperationtheseterminalsshouldbeshortcircuitedtogether.
7.ConnectaBusSelectorblockatthemeasurementoutputofthemachine.Whenthisblockisconnectedtoamachine
measurementoutput,itallowsyoutoaccessspecificinternalsignalsofthemachine.Selectthefollowingsignals:
Statormeasurements.Statorcurrentis_a(A),Mechanical.Rotorspeed(wm),andMechanical.Electromagnetictroque
Te(N*m).
LoadingandDrivingtheMotor
Younowimplementthetorquespeedcharacteristicofthemotorload.Assumeaquadratictorquespeedcharacteristic(fan
orpumptypeload).ThetorqueTisthenproportionaltothesquareofthespeed.

T = k 2
Thenominaltorqueofthemotoris

Tn = 3 746 = 11.87Nm
188.5
Therefore,theconstantkshouldbe

k =

Tn
11.87
=
= 3.34 104
2

188.52

1.OpentheUserDefinedFunctionslibraryofSimulink andcopytheFcnblockintoyourmodel.Opentheblockmenu
andentertheexpressionoftorqueasafunctionofspeed:3.34e4*u^2.
2.ConnecttheinputoftheFcnblocktothetorqueinputofthemotor,labeledTm.
3.OpentheElectricalSourceslibraryandcopytheDCVoltageSourceblockintoyourmodel.Opentheblockmenuand
setthevoltageto400V.
4.OpentheMeasurementslibraryandcopyaVoltageMeasurementblockintoyourmodel.Changetheblocknameto
Vab.
5.UsingaGroundblockfromtheElementslibrary,completethepowerelementsandvoltagesensorinterconnectionsas
showninPWMControlofanInductionMotor.
ControllingtheInverterBridgewithaPulseGenerator
Tocontrolyourinverterbridge,youneedapulsegenerator.SuchageneratorisavailableintheControland
Measurements/Measurementslibrary:
1.OpentheControlandMeasurements/Pulse&SignalGeneratorsblockslibraryandcopythePWMGenerator(2Level)
blockintoyourmodel.Theconverteroperatesinanopenloop,andthethreePWMmodulatingsignalsaregenerated
internally.ConnectthePoutputtothepulsesinputoftheUniversalBridgeblock
2.OpenthePWMGenerator(2Level)blockdialogboxandsettheparametersasfollows.
https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

3/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

Generatortype

Threephasebridge(6pulses)

Modeofoperation

Unsynchronized

Carrierfrequency

18*60Hz(1080Hz)

InitialPhase

0degrees

Minumumandmaximumvalues

[1,1]

Samplingtechnique

Natural

Internalgenerationofreference

selected

Modulationindex

0.9

Referencesignalfrequency

60Hz

Referencesignalphase

0degrees

Sampletime

10e6s

3.Theblockhasbeendiscretizedsothatthepulseschangeatmultiplesofthespecifiedtimestep.Atimestepof10s
correspondsto+/0.54%oftheswitchingperiodat1080Hz.
OnecommonmethodofgeneratingthePWMpulsesusescomparisonoftheoutputvoltagetosynthesize(60Hzin
thiscase)withatriangularwaveattheswitchingfrequency(1080Hzinthiscase).ThelinetolineRMSoutputvoltage
isafunctionoftheDCinputvoltageandofthemodulationindexmasgivenbythefollowingequation:

G
VLLrms = m 3 Vdc = m 0.612 VDC
2 G2
Therefore,aDCvoltageof400Vandamodulationfactorof0.90yieldthe220Vrmsoutputlinetolinevoltage,which
isthenominalvoltageoftheasynchronousmotor.
DisplayingSignalsandMeasuringFundamentalVoltageandCurrent
1.Younowaddblocksmeasuringthefundamentalcomponent(60Hz)embeddedinthechoppedVabvoltageandinthe
phaseAcurrent.OpentheControlandMeasurementslibraryofthesimscapepowersystems_STlibraryandcopythe
Fourierblockintoyourmodel.
OpentheFourierblockdialogboxandcheckthattheparametersaresetasfollows:
Fundamentalfrequency

60Hz

Harmonicn

Initialinput

[00]

Sampletime

10e6s

ConnectthisblocktotheoutputoftheVabvoltagesensor.
2.DuplicatetheFourierblock.TomeasurethephaseAcurrent,youconnectthisblocktotheStatorcurrentis_aoutput
oftheBusselectorblock.
3.StreamthesesignalstotheSimulationDataInspector:theTe,ias,andwsignalsofthemeasurementoutputofthe
AsynchronousMachineblock,andtheVABvoltage.
SimulatingthePWMMotorDrivewithContinuousIntegrationAlgorithm
OpentheSimulation>ConfigurationParametersdialogbox.Selecttheode23tbintegrationalgorithm.Settherelative
toleranceto1e4,theabsolutetoleranceandtheMaxstepsizetoauto,andthestoptimeto1s.OpentheSimulation
DataInspectorandlookatthesignals.
Themotorstartsandreachesitssteadystatespeedof181rad/s(1728rpm)after0.5s.Atstarting,themagnitudeofthe
60Hzcurrentreaches90Apeak(64ARMS)whereasitssteadystatevalueis10.5A(7.4ARMS).Asexpected,the
magnitudeofthe60Hzvoltagecontainedinthechoppedwavestaysat

220 G2 = 311V
https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

4/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

Alsonoticestrongoscillationsoftheelectromagnetictorqueatstarting.Ifyouzoominonthetorqueinsteadystate,you
shouldobserveanoisysignalwithameanvalueof11.9N.m,correspondingtotheloadtorqueatnominalspeed.
Ifyouzoominonthethreemotorcurrents,youcanseethatalltheharmonics(multiplesofthe1080Hzswitching
frequency)arefilteredbythestatorinductance,sothatthe60Hzcomponentisdominant.
PWMMotorDriveSimulationResultsforMotorStartingatFullVoltage

UsingtheMultimeterBlock
TheUniversalBridgeblockisnotaconventionalsubsystemwhereallthesixindividualswitchesareaccessible.Ifyou
wanttomeasuretheswitchvoltagesandcurrents,youmustusetheMultimeterblock,whichgivesaccesstothebridge
internalsignals:
1.OpentheUniversalBridgedialogboxandsettheMeasurementparametertoDevicecurrents.
2.CopytheMultimeterblockfromtheMeasurementslibraryintoyourcircuit.DoubleclicktheMultimeterblock.A
windowshowingthesixswitchcurrentsappears.
3.SelectthetwocurrentsofthebridgearmconnectedtophaseA.Theyareidentifiedas
https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

5/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

iSw1

UniversalBridge

iSw2

UniversalBridge

4.ClickClose.Thenumberofsignals(2)isdisplayedintheMultimetericon.
5.SendthesignalfromtheMultimeterblocktotheSimulationDataInspector.
6.Restartthesimulation.Thewaveformsobtainedforthefirst20msareshowninthisplot.
CurrentsinIGBT/DiodeSwitches1and2

Asexpected,thecurrentsinswitches1and2arecomplementary.Apositivecurrentindicatesacurrentflowinginthe
IGBT,whereasanegativecurrentindicatesacurrentintheantiparalleldiode.
NoteMultimeterblockuseisnotlimitedtotheUniversalBridgeblock.ManyblocksoftheElectricalSourcesandElements
librarieshaveaMeasurementparameterwhereyoucanselectvoltages,currents,orsaturabletransformerfluxes.Ajudicious
useoftheMultimeterblockreducesthenumberofcurrentandvoltagesensorsinyourcircuit,makingiteasiertofollow.

DiscretizingthePWMMotorDrive
Youmighthavenoticedthatthesimulationusingavariablestepintegrationalgorithmisrelativelylong.Dependingonyour
computer,itmighttaketensofsecondstosimulateonesecond.Toshortenthesimulationtime,youcandiscretizeyour
circuitandsimulateatfixedsimulationtimesteps.
OpenthePowergui,clickConfigureParameters,andinthePowerguiblockparametersdialogboxsetSimulationtype
toDiscrete.SettheSampletimeto10e6s.Whenyourestartthesimulation,thepowersystem,includingthe
asynchronousmachine,isdiscretizedata10ssampletime.

https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

6/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

Astherearenomorecontinuousstatesintheelectricalsystem,youdonotneedavariablestepintegrationmethodto
solvethissystem.IntheSimulation>ConfigurationParameters>Solverdialogboxpane,selecttheFixedstepand
Discrete(nocontinuousstates)options.
Startthesimulation.Observethatthesimulationisnowfasterthanwiththecontinuoussystem.Resultscomparewell
withthecontinuoussystem.

PerformingHarmonicAnalysisUsingtheFFTTool
ThetwoFourierblocksallowcomputationofthefundamentalcomponentofvoltageandcurrentwhilesimulationis
running.IfyouwouldliketoobserveharmoniccomponentsalsoyouwouldneedaFourierblockforeachharmonic.This
approachisnotconvenient.
NowusetheFFTtoolofPowerguitodisplaythefrequencyspectrumofvoltageandcurrentwaveforms.Thesesignalsare
storedinyourworkspaceintheASMstructurewithtimevariablegeneratedbytheScopeblock.Becauseyourmodelis
discretized,thesignalsavedinthisstructureissampledatafixedstepandconsequentlysatisfiestheFFTtool
requirements.
OpenthePowerguiandselectFFTAnalysis.Anewwindowopens.Settheparametersspecifyingtheanalyzedsignal,
thetimewindow,andthefrequencyrangeasfollows:
Structure

ASM

Input

Vab

Signalnumber

Starttime

0.7s

Numberofcycles

(pulldownmenu)

DisplayFFTwindow

Fundamentalfrequency

60Hz

MaxFrequency

5000Hz

Frequencyaxis

Harmonicorder

Displaystyle

Bar(relativetoFundorDC)

Theanalyzedsignalisdisplayedintheupperwindow.ClickDisplay.Thefrequencyspectrumisdisplayedinthebottom
window,asshowninthenextfigure.
FFTAnalysisoftheMotorLinetoLineVoltage

https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

7/8

12/24/2016

SimulateVariableSpeedMotorControlMATLAB&SimulinkMathWorksIndia

Thefundamentalcomponentandtotalharmonicdistortion(THD)oftheVabvoltagearedisplayedabovethespectrum
window.Themagnitudeofthefundamentaloftheinvertervoltage(312V)compareswellwiththetheoreticalvalue(311V
form=0.9).
Harmonicsaredisplayedinpercentofthefundamentalcomponent.Asexpected,harmonicsoccuraroundmultiplesof
carrierfrequency(n*18+k).Highestharmonics(30%)appearat16thharmonic(182)and20thharmonic(18+2).
Finally,selectinputIainsteadofVabanddisplayitscurrentspectrum.

https://in.mathworks.com/help/physmod/sps/powersys/ug/simulatingvariablespeedmotorcontrol.htmljsessionid=1c955ce83c4e788222fcf1ce3150

8/8

You might also like