Sunteți pe pagina 1din 12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

ModelingDegreesofFreedom
AboutJoints
ASimscapeMultibodyjointrepresentsthedegreesoffreedom(DoF)thatonebody(thefollower)hasrelative
toanotherbody(thebase).Thebasebodycanbeamovablerigidbodyoraground.Unlikeaphysicaljoint,a
SimscapeMultibodyjointhasnomass,althoughsomejointshavespatialextension(seeModelingMassless
Connectors).
ASimscapeMultibodyjointdoesnotnecessarilyimplyaphysicalconnectionbetweentwobodies.Forexample,a
SimscapeMultibodySixDoFjointallowsthefollower,e.g.,anairplane,unconstrainedmovementrelativetothe
base,e.g.,ground,anddoesnotrequirethatthefollowerevercomeintocontactwiththebase.
SimscapeMultibodyjointsonlyadddegreesoffreedomtoamachine,becausetheBodyblockscarrynodegrees
offreedom.Contrastthiswithphysicaljoints,whichbothaddDoFs(withaxesofmotion)andremoveDoFs(by
connectingbodies).Formoreinformation,seeCountingModelDegreesofFreedom.
TheSimscapeMultibodyJointslibraryprovidesanextensiveselectionofblocksformodelingvarioustypesof
joints.Thissectionexplainshowtousetheseblocks.
Note:ASimscapeMultibodyjointrepresentstherelativedegreesoffreedomofonebodyrelativetoanotherbody.
Onlyifajointisconnectedononesidetoagroundandontheothertoabodydoesthejointrepresentanabsolute
DoFofthebodywithrespecttoWorld.

ModelingJoints
ModelingwithJointblocksrequiresanunderstandingofthefollowingkeyconcepts:

Jointprimitives

Jointtypes

Jointaxes

Jointdirectionality

Assemblyrestrictions

JointPrimitives
EachJointblockbundlestogetheroneormorejointprimitivesthattogetherspecifythedegreesoffreedomthata
followerbodyhasrelativetothebasebody.Thefollowingtablesummarizesthejointprimitivesfoundsinglyor
multiplyinJointblocks.
PrimitiveType

Symbol

DegreesofFreedom

Prismatic

Onedegreeoftranslationalfreedomalongaprismaticaxis

Revolute

Onedegreeofrotationalfreedomaboutarevoluteaxis

Spherical

Threedegreesofrotationalfreedomaboutapivotpoint

Weld

Zerodegreesoffreedom

JointTypes
TheblocksintheSimscapeMultibodyJointslibraryfallintothefollowingcategories:

Primitivejoints

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

1/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

Eachoftheseblockscontainsasinglejointprimitive.Forexample,theRevoluteblockcontainsarevolute
jointprimitive.

Compositejoints
Theseblockscontaincombinationsofjointprimitives,enablingyoutospecifymultiplerotationaland
translationaldegreesoffreedomofonebodyrelativetoanother.Somemodelidealizedrealjoints,forexample,
theGimbalandBearingjoints.

Othersspecifyabstractcombinationsofdegreesoffreedom.Forexample,theSixDoFblockspecifies
unlimitedmotionofthefollowerrelativetothebase.
TheCustomJointallowsyoutocreatejointswithanydesiredcombinationofrotationalandtranslational
degreesoffreedom,inanyorder.TheprefabricatedcompositeJointsoftheJointslibraryhavethetypeand
orderoftheirprimitivesfixed.SeeAxisOrder.

Masslessconnectors

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

2/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

Theseblocksrepresentextendedjointswithspatiallyseparatedjointprimitiveaxes,forexample,aRevolute
RevoluteMasslessConnector.

Disassembledjoints
Theseblocksrepresentjointsnotassembleduntilsimulationstartsforexample,aDisassembledPrismatic.

SeeAssemblyRestrictionsandModelingDisassembledJoints.
JointAxes
Jointblocksdefineoneormoreaxesoftranslationorrotationalongwhichoraroundwhichafollowerblockcan
moveinrelationtothebaseblock.TheaxesofaJointblockaretheaxesdefinedbyitscomponentprimitives:

Aprismaticprimitivedefinesanaxisoftranslation.

Arevoluteprimitivedefinesanaxisofrevolution.

Asphericalprimitivedefinesapivotpointforaxisanglerotation.

Forexample,aPlanarJointblockcombinestwoprismaticaxesandhencedefinestwoaxesoftranslation.
AxisDirection.Bydefaulttheaxesofprismaticandrevoluteprimitivespointinthesamedirectionasthezaxis
oftheWorldcoordinatesystem(CS).AJointblock'sdialogboxallowsyoutopointitsprismaticandrevoluteaxes
inanyotherdirection(seeDirectingJointAxes).
AxisOrder.CompositeSimscapeMultibodyJointsexecutetheirmotiononejointprimitiveatatime.Ajointthat
definesmorethanoneaxisofmotionalsodefinestheorderinwhichthefollowerbodymovesalongeachaxisor
aboutapivot.Theorderinwhichtheaxesand/orpivotappearintheJointblock'sdialogboxistheorderinwhich
thefollowerbodymoves.
Differentprimitiveexecutionordersarephysicallyequivalent,unlessthejointincludesonesphericalorthree
revoluteprimitives.Puretranslationsandpuretwodimensionalrotationsareindependentofprimitiveordering.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

3/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

AxisSpan.Thespanoftheprimitiveaxesisthecompletespacespannedbytheircombination.Forexample,
oneprimitiveaxisdefinesaline,andtwoprimitiveaxesdefineaplane.
JointDirectionality
Directionalityisapropertyofajointthatdeterminesthedependenceofthejointonthesignofforcesortorques
appliedtoit.Ajoint'sdirectionalityalsodeterminesthesignofsignalsoutputbysensorsattachedtothejoint.
EverySimscapeMultibodyjointinyourmodelhasadirectionality.Youmustbeabletodeterminethedirectionality
ofajointinordertoactuateitcorrectlyandtointerprettheoutputofsensorsattachedtoit.
Ajoint'sfollowermovesrelativetothejoint'sbase.Thejoint'sdirectionalitytakesintoaccountthejointtypeand
thedirectionofthejoint'saxis,asfollows.
DirectionalityofaPrismaticJoint.Ifthejointisprismatic,apositiveforceappliedtothejointmovesthe
followerinthepositivedirectionalongtheaxisoftranslation.Asensorattachedtothejointoutputsapositive
signalifthefollowermovesinapositivedirectionalongthejoint'saxisoftranslationrelativetothebase.

DirectionalityofaRevoluteJoint.Ifthejointisrevolute,apositivetorqueappliedtothejointrotatesthe
followerbyapositiveanglearoundthejoint'saxisofrotation,asdeterminedbytherighthandrule.Asensor
attachedtotherevolutejointoutputsapositivesignalifthefollowerrotatesbyapositiveanglearoundthejoint's
axisofrevolution,asdeterminedbytherighthandrule.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

4/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

DirectionalityofaSphericalJoint.Sphericaljointdirectionalitymeansthepositivesenseofrotationofthethree
rotationalDoFs.Pickarotationaxis,rotatingusingtherighthandrulefromthebaseBodyCSaxes.Thenrotate
thefollowerBodyaboutthataxisintherighthandedsense.
DirectionalityandOrderingofCompositeJointPrimitives.Eachjointprimitiveseparatelyhasitsown
directionality,basedontheprimitive'stypeandthedirectionofitsaxisoftranslationorrotation.Ineachcase,the
followerbodyofthecompositejointmovesalongoraroundthejointprimitive'saxisrelativetothebasebody.
TheorderofprimitivesinthecompositeJoint'sdialogdeterminesthespatialconstructionofthejoint.
Thefirstlistedprimitiveisattachedtothebase,thesecondtothefirst,andsoon,downtothefollower,whichis
attachedtothelastprimitive.

Movingthefirstlistedprimitivemovesthesubsequentprimitivesinthelist,includingthefollower,relativeto
thebase.

Movinganyprimitivemovestheprimitivesbelowitinthelist(butnotthoseaboveit),aswellasthefollower.

Movingthelastlistedprimitivemovesonlythefollower.

ChangingtheDirectionalityofaJoint.Youcanchangethedirectionalityofajointbyeither

ReversingandreconnectingtheJointblocktoreversetherolesofthebaseandfollowerbodies.

Reversingthesign(direction)ofthejointaxis.

AssemblyRestrictions
Manyjointsimposeoneormorerestrictions,calledassemblyrestrictions,ontheplacementofthebodiesthat
theyjoin.Theconjoinedbodiesmustsatisfytheserestrictionsatthebeginningofsimulationandthereafterwithin
assemblytolerancesthatyoucanspecify(seeControllingMachineAssembly).Forexample,theBodyCSs
attachedtorevoluteandsphericaljointsmustcoincidewithinassemblytolerancestheBodyCSsattachedtoa
PrismaticjointmustlieontheprismaticaxiswithinassemblytolerancestheBodyCSsattachedtoaPlanarjoint
mustbecoplanarwithPlanarprimitives,etc.Compositejoints,e.g.,theSixDoFjoint,imposeassembly
restrictionsequaltothemostrestrictiveofitsjointprimitives.SeetheblockreferenceforeachJointfor
informationontheassemblyrestrictions,ifany,thatitimposes.
Positioningbodiessothattheysatisfyajoint'sassemblyrestrictionsiscalledassemblingthejoint.
AllSimscapeMultibodyJointsexceptblocksintheDisassembledJointssublibraryrequiremanualassembly.
Manualassemblyentailsyoursettingtheinitialpositionsofconjoinedbodiestovalidlocations(seeAssembling
Joints).Thesimulationassemblesdisassembledjointsduringthemodelinitializationphase.Itassumesthatyou
havealreadyassembledallotherjointsbeforethestartofsimulation.Hencejointsthatrequiremanualassembly
arecalledassembledjoints.Duringmodelinitializationandateachtimestep,thesimulationalsochecksto
ensurethatyourmodel'sbodiessatisfyallassemblyrestrictions.Ifanyofyourmodelbodiesfailstosatisfy
assemblyrestrictions,thesimulationstopsanddisplaysanerrormessage.

CreatingaJoint
Ajointmustconnectexactlytwobodies.Tocreateajointbetweentwobodies:
1.SelecttheJointfromtheSimscapeMultibodyJointslibrarythatbestrepresentsthedegreesoffreedomofthe
followerbodyrelativetothebasebody.
2.ConnectthebaseconnectorportoftheJointblock(labeledB)totheBodyCSoriginonthebaseblockthat
servesasthepointofreferenceforspecifyingthedegreesoffreedomofthefollowerblock.
3.ConnectthefollowerconnectorportoftheJointblock(labeledF)totheBodyCSoriginonthefollowerblock
thatservesasthepointofreferenceforspecifyingthedegreesoffreedomofthebaseblock.
4.Specifythedirectionsofthejoint'saxes(seeDirectingJointAxes).

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

5/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

5.IfyouplantoattachSensorsorActuatorstotheJoint,createanadditionalportforeachSensorandActuator
(seeCreatingActuatorandSensorPortsonaJoint).
6.Ifthejointisanassembledjoint,assemblethebodiesjoinedbythejoint(seeAssemblingJoints).
DirectingJointAxes
BydefaulttheprismaticandrevoluteaxesofajointpointinthesamedirectionasthezaxisoftheWorld
coordinatesystem.Tochangethedirectionoftheaxisofajointprimitive:
1.Openthejoint'sdialogboxandselectareferencecoordinatesystemforspecifyingtheaxisdirectionfromthe
coordinatesystemlistassociatedwiththeaxisprimitive.
TheoptionsaretheWorldcoordinatesystemorthelocalcoordinatesystemsofthebaseorfollower
attachmentpoint.Choosethecoordinatesystemthatismostconvenient.

2.Enterintheprimitive'saxisdirectionfieldavectorthatpointsinthedesireddirectionoftheaxisinthe
selectedcoordinatesystem.
CreatingActuatorandSensorPortsonaJoint
TocreateadditionalconnectorportsonaJointforActuatorsandSensors,opentheJoint'sdialogboxandsetthe
Numberofsensor/actuatorportstothenumberofActuatorsandSensorsyouplantoattachtotheJoint.

ApplythesettingbyclickingOKorApply.
AssemblingJoints
Youmustmanuallyassembleallassembledjointsinyourmodel.Assemblingajointrequiressettingtheinitial
positionsofitsattachedbaseandfollowerBodyCSssuchthattheysatisfytheassemblyrestrictionsimposedby
thejoint(seeAssemblyRestrictions).Consider,forexample,theModelandSimulateaClosedLoopMachine.
Thismodelcomprisesthreebarsconnectedbyrevolutejointstoeachotherandtotwogroundpoints.Themodel
collocatestheCSoriginsoftheBodyCSportsconnectedtoeachJoint,therebysatisfyingtheassembly
restrictionsimposedbytherevolutejoints.
AssembledRevoluteJointintheFourBarMechanism

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

6/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

ModelingMasslessConnectors
Masslessconnectorssimplifythemodelingofmachinesthatusearelativelylightbodytoconnecttworelatively
massivebodies.Forexample,youcoulduseaBodyblocktomodelsuchaconnector.Buttheresultingequations
ofmotionmightbeillconditioned,becausethatconnectingbody'smassissmall,andthesimulationcanbeslow
orpronetofailure.AmasslessconnectoralsoavoidsglobalinconsistenciesthatcanariseifyouuseaConstraint
blocktomodeltheconnector.
Amasslessconnectorconsistsofapairofjointslocatedafixeddistanceapart.Thinkofamasslessconnector
asamasslessrodwithajointprimitiveaffixedateachend.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

7/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

Theinitialorientationandlengthofthemasslessconnectoraredefinedbyavectordrawnfromthebase
attachmentpointtothefollowerattachmentpoint.Duringsimulation,theorientationofthemasslessconnector
canchangebutnotitslength.Inotherwords,themasslessconnectorpreservestheinitialseparationofthebase
andfollowerbodiesduringmachinemotion.
NoteYoucannotactuateorsenseamasslessconnector.

TheSimscapeMultibodyJoints/MasslessConnectorssublibrarycontainstheseMasslessConnectors:

Tworevoluteprimitives(RevoluteRevolute)

Arevoluteprimitiveandasphericalprimitive(RevoluteSpherical)

Twosphericalprimitives(SphericalSpherical)

CreatingaMasslessConnector
Tocreateamasslessconnectorbetweentwobodies:
1.DraganinstanceofaMasslessConnectorblockfromtheMasslessConnectorssublibraryintoyourmodel
andconnectittothebaseandfollowerblocks.
Youcansetthedirectionoftheaxesofrevoluteprimitives.Ifnecessary,pointtheaxesoftheconnector's
revolutejointsinthedirectionrequiredbythedynamicsofthemachineyouaremodeling.
2.Assembletheconnectorbysettingtheinitialpositionsofthebaseandfollowerbodyattachmentpointstothe
initialpositionsrequiredbyyourmachine'sstructure.
Duringsimulation,themasslessconnectormaintainstheinitialseparationbetweenthebodiesthoughnot
necessarilytheinitialrelativeorientation.
MasslessConnectorExample:TriplePendulum
Consideratriplependulumcomprisingmassiveupperandlowerbodiesandamiddlebodyofnegligiblemass.The
followingmodelusesaRevoluteRevolutemasslessconnectortomodelsuchapendulum.

Inthismodel,thejointaxesoftheRevoluteRevoluteconnectorhavetheirdefaultorientationalongtheWorldz
axis.Asaresult,thelowerarm(Body1)rotatesparalleltotheWorld'sxyplane.
MasslessConnectorExample:FourBarMechanism
Thefollowingmodelreplacesoneofthebars(Bar2)inthemech_four_barmodelwithaRevoluteRevolute
masslessconnector.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

8/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

ThismodelchangestheBodyCSoriginsofBar3tothefollowingvalues.
Name

Originpositionvector

Translatedfromoriginof

CG

[0.0270.0480]

CS1

CS1

[0.0540.0960]

CS2

CS2

[000]

ADJOINING(Ground_2)

ThiscreatesaseparationbetweenBar3andBar1equaltothelengthofBar2intheoriginalmodel.
Simulateboththeoriginalandthemodifiedmodel.Noticethatthemasslessconnectorversionmovesdifferently,
becauseyoueliminatedthemassofBar2fromthemodel.Noticealsothatthemasslessbardoesnotappearin
thevisualizationofthemodifiedmodel,butitiscalledoutinthisfigureforclarity.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

9/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

ModelingDisassembledJoints
TheSimscapeMultibodyJoints/DisassembledJointssublibrarycontainsasetofjointsautomaticallyassembled
atthestartofsimulationthatis,thesimulationpositionsthejointssuchthattheysatisfytheassembly
restrictionsimposedbythetypeofjoint,e.g.,prismaticorrevolute.Usingthesejointseliminatestheneedforyou
toassemblethejointsyourself.
Disassembledjointsdifferfromassembledjointsinsignificantways.Anassembledjointprimitivehasonlyone
axisoftranslationorrevolutionoronesphericalpivotpoint.Adisassembledprismaticorrevoluteprimitivehastwo
axesoftranslationorrotation,oneforthebaseandoneforthefollowerbody.Adisassembledsphericalprimitive
similarlyhastwopivotpoints.
CautionDisassembledjointscanappearonlyinclosedloops.Eachclosedloopcancontainatmostone
disassembledjoint.

Thedialogboxforadisassembledjointallowsyoutospecifythedirectionofeachaxis.

Duringmodelassembly,thesimulationdeterminesacommonaxisofrevolutionortranslationthatsatisfiesmodel
assemblyrestrictions,andalignsthebaseandfolloweraxesalongthecommonaxis.
ControllingAutomaticAssemblyandtheAssembledConfiguration
IfyourmachinecontainsJointInitialConditionActuator(JICA)blocks,themachineismovedfromitshometoits
initialconfigurationbyapplyingtheinitialconditioninformationtothemachine'sjointsfirst.Thenany
disassembledjointsareassembled,leadingtotheassembledconfiguration.
http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

10/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

Duringmodelassembly,thesimulationmightmovebodiesconnectedbyassembledjointsfromtheirinitial
positionsinordertoassemblethedisassembledjoints.TheSimscapeMultibodysolutiontotheassemblyproblem
cannotbepredictedbeforehand,exceptinsimplecases.Ifyoudonotwantbodiestomoveduringmodel
assembly,useJICAblockstospecifytheinitialpositionsofbodieswhosepositionsyouwanttoremainfixed
duringtheassemblyprocess.TheresultingassemblywillsatisfytheinitialconditionsspecifiedbytheJICA
blocks.
DisassembledJointExample:FourBarMechanism
Thisexamplecreatesandrunsamodelofadisassembledfourbarmachine.

Refertothetutorial,ModelandSimulateaClosedLoopMachine,andthemech_four_barexample:
1.DisconnecttheJointSensor1blockfromtheRevolute3block.
2.ReplaceRevolute3withaDisassembledRevoluteblockfromtheJoints/DisassembledJointssublibrary.
3.OpentheDisassembledRevolutedialogboxand,underAxisofActionforbothBaseandFolloweraxes,
enter[001].Closethedialog.
4.OpentheBar2dialogboxanddislocatethejointbydisplacingBar2'sCS2originfromBar3'sCS1origin.
DothisbyenteringanonzerovectorunderOriginPositionVector[xyz]forCS2,thenchangingthe
TranslatedfromOriginofpulldownentrytoADJOINING.CS1onBar3istheAdjoiningCSofCS2ofBar2.
Closethedialog.
5.ToavoidcircularCSreferencing,youmustchecktheBar3dialogentryforCS1onBar3.BesurethatCS1on
Bar3doesnotreferenceCS2onBar2.ReferenceitinsteadtoCS2onBar3,whichadjoinsGround_2.
6.Rerunthemodel.
Notethatthemotionisdifferentfromthemanuallyassembledcase.

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

11/12

5/2/2016

ModelingDegreesofFreedomMATLAB&SimulinkMathWorks

http://kr.mathworks.com/help/physmod/sm/mech/ug/modelingdegreesoffreedom.html

12/12

S-ar putea să vă placă și