Download presentation

1
**SPiiPlus Training Class**

Motion Profile Generation

2
**What is Motion Profile Generation?**

Motion profile generation is the process by which the controller takes a high level command and creates a finely sampled motion profile At a minimum the controller will calculate a new position every update cycle Advanced controllers will also calculate velocity, acceleration, and jerk (acceleration/sec) High level command can be streamed by a host or executed directly by the motion controller Many different algorithms can be used to generate the motion profile / trajectory Motion profile / trajectory can be for a single or multi-axis move

3
**Sampled Motion Trajectory**

Position Time

4
**Motion Generation: SPiiPlus**

Master Formula ECAT Position (MPOS) Motion Generator Axis Position (APOS) CONNECT formula Reference Position (RPOS) Convert units to counts (EFAC) Convert counts to units (EFAC) Feedback Position (FPOS) User Commands / External Signals Feedback Drive Command MPU

5
**Important ACSPL+ Motion Variables**

VEL: Commanded Velocity Motor commanded velocity in user units / second This is the maximum velocity of the motion profile ACC: Commanded Acceleration Motor commanded acceleration in user units / second2 This is the maximum acceleration of the motion profile DEC: Commanded Deceleration Motor commanded deceleration in user units / second2 This is the maximum deceleration of the motion profile JERK: Commanded Jerk Motor commanded jerk in user units / second3 This is the maximum jerk of the motion profile KDEC: Kill Deceleration Used for the KILL command only

6
**Important ACSPL+ Motion Variables**

APOS: Axis Position Logical axis position in user-defined units Calculated directly from motion generator every MPU cycle Comes before the CONNECT function RPOS: Reference Position Motor commanded position in user-defined units Calculated via the CONNECT function every MPU cycle Sent to servo processor servo loop every MPU cycle Typically RPOS = APOS FPOS: Feedback Position Sensor feedback position in user-defined units Read from servo processor every MPU cycle PE: Position Error Difference between RPOS and FPOS Updated every MPU cycle

7
**Important ACSPL+ Motion Variables**

EFAC: Encoder Factor Used to translate between encoder counts on the servo processor and user-defined units on the MPU EOFFS: Encoder Offset Offset between zero position on the servo processor and zero position on the MPU Updated whenever RPOS or FPOS is SET (homed). FPOS=𝐹𝑃∙EFAC+EOFFS 𝑅𝑃= RPOS−EOFFS EFAC Note: FP is feedback position stored in the Servo Processor RP is the reference position stored in the Servo Processor

8
**Important ACSPL+ Motion Variables**

RVEL: Reference Velocity Motor commanded velocity in user units / second Calculated as the first difference of RPOS, with optional smoothing, every MPU cycle FVEL: Feedback Velocity Sensor feedback velocity in user units / second Calculated as first difference of FPOS, with optional smoothing, every MPU cycle Δ 𝑅 = RPOS 𝑛 − RPOS 𝑛−1 𝑇 RVEL 𝑛 = Δ 𝑅 ∙ 1− RVFIL RVEL 𝑛−1 ∙ RVFIL 100 Δ 𝐹 = FPOS 𝑛 − FPOS 𝑛−1 𝑇 FVEL 𝑛 = Δ 𝐹 ∙ 1− FVFIL FVEL 𝑛−1 ∙ FVFIL 100

9
**Important ACSPL+ Motion Variables**

RACC: Reference Acceleration Motor commanded acceleration in user units / second2 Calculated as the first difference of RVEL every MPU cycle FACC: Feedback Acceleration Sensor feedback acceleration in user units / second2 Calculated as the first difference of FVEL every MPU cycle RACC 𝑛 = RVEL 𝑛 − RVEL 𝑛−1 𝑇 FACC 𝑛 = FVEL 𝑛 − FVEL 𝑛−1 𝑇

10
**Important ACSPL+ Motion Variables**

GPHASE: Group Motion Phase Integer value for current motion phase 0: no motion 1: acceleration buildup 2: constant acceleration 3: acceleration finishing 4: constant velocity 5: deceleration buildup 6: constant deceleration 7: deceleration finishing GRTIME: Group Remaining Motion Time Estimated value of time (in milliseconds) until end of current motion

11
**Important ACSPL+ Motion Variables**

MST: Motor State Bitwise encoded physical motor state information Bit 0: Enabled Bit 1: Open Loop Bit 5: In motion Bit 6: Accelerating AST: Axis State Bitwise encoded logical axis state information Bit 2: PEG is in progress Bit 3: Data collection is in progress

12
Move vs. Move and Settle Move time: time it takes for commanded motion to finish Move and settle time: time it takes for commanded motion to finish AND physical axis to settle within a specified window

13
**Trajectory Algorithms**

14
**Step Profile: Basics Step Profile: Comments:**

Instantaneous change in position Infinite velocity Infinite acceleration Infinite jerk Comments: Not realistic Should never be used in real motion systems

15
**Step Profile: Equations**

𝒙 𝒕 = 𝟎 𝑿 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕 𝒗 𝒕 = 𝟎 ∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕 𝒂 𝒕 = 𝟎 ±∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕 𝒋 𝒕 = 𝟎 ±∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕

16
**Step Profile: ACSPL+ Example**

Should not be run on real systems!

17
**1st Order Profile: Basics**

Linear position profile Instantaneous change in velocity Infinite acceleration Infinite jerk Comments: Not realistic Should never be used in real motion systems

18
**1st Order Profile: Equations**

𝒙 𝒕 = 𝟎 𝑽 ∙(𝒕− 𝒕 𝟎 ) 𝑿 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕< 𝒕 𝟏 𝒕 𝟏 ≤𝒕 𝒗 𝒕 = 𝟎 𝑽 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕< 𝒕 𝟏 𝒕 𝟏 ≤𝒕 𝒂 𝒕 = 𝟎 ∞ 𝟎 −∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕< 𝒕 𝟏 𝒕= 𝒕 𝟏 𝒕 𝟏 <𝒕 𝒋 𝒕 = 𝟎 ±∞ 𝟎 ±∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕< 𝒕 𝟏 𝒕= 𝒕 𝟏 𝒕 𝟏 <𝒕

19
**1st Order Profile: ACSPL+ Example**

Should not be run on real systems!

20
**2nd Order Profile: Basics**

Quadratic position profile Linear velocity profile Instantaneous change in acceleration Infinite jerk Comments: Not realistic Simple controllers use this type of interpolation Results in ‘jerky’ behavior of motion systems

21
**2nd Order Profile: Equations**

𝑿 𝟏 = 𝟏 𝟐 ∙ 𝑨 ∙ 𝒕 𝟏 − 𝒕 𝟎 𝟐 𝑿 𝟐 = 𝑿 𝟏 + 𝑽 ∙( 𝒕 𝟐 − 𝒕 𝟏 ) 𝒙 𝒕 = 𝟎 𝟎.𝟓∙ 𝑨 ∙ (𝒕− 𝒕 𝟎 ) 𝟐 𝑿 𝟏 + 𝑽 ∙(𝒕− 𝒕 𝟏 ) 𝑿 𝟐 + 𝑽 ∙ 𝒕− 𝒕 𝟐 −𝟎.𝟓∙ 𝑨 ∙ (𝒕− 𝒕 𝟐 ) 𝟐 𝑿 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕< 𝒕 𝟏 𝒕 𝟏 ≤𝒕< 𝒕 𝟐 𝒕 𝟐 ≤𝒕< 𝒕 𝟑 𝒕 𝟑 ≤𝒕 𝒗 𝒕 = 𝟎 𝑨 ∙(𝒕− 𝒕 𝟎 ) 𝑽 𝑽 − 𝑨 ∙(𝒕− 𝒕 𝟐 ) 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕< 𝒕 𝟏 𝒕 𝟏 ≤𝒕< 𝒕 𝟐 𝒕 𝟐 ≤𝒕< 𝒕 𝟑 𝒕 𝟑 ≤𝒕 𝒂 𝒕 = 𝟎 𝑨 𝟎 − 𝑨 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕< 𝒕 𝟏 𝒕 𝟏 ≤𝒕< 𝒕 𝟐 𝒕 𝟐 ≤𝒕< 𝒕 𝟑 𝒕 𝟑 ≤𝒕 𝒋 𝒕 = 𝟎 ∞ 𝟎 −∞ 𝟎 −∞ 𝟎 ∞ 𝟎 𝒕< 𝒕 𝟎 𝒕= 𝒕 𝟎 𝒕 𝟎 <𝒕< 𝒕 𝟏 𝒕= 𝒕 𝟏 𝒕 𝟏 <𝒕< 𝒕 𝟐 𝒕= 𝒕 𝟐 𝒕 𝟐 <𝒕< 𝒕 𝟑 𝒕= 𝒕 𝟑 𝒕 𝟑 <𝒕

22
**2nd Order Profile: ACSPL+ Example**

Not ideal for real systems

23
**3rd Order Profile: Basics**

Cubic position profile Quadratic velocity profile Linear acceleration profile Instantaneous change in jerk Comments: Realistic Results in smooth motion Complex profile Requires appropriate jerk setting

24
**3rd Order Profile: Equations**

𝒙 𝒕 = 𝟎 𝟎.𝟏𝟔𝟔𝟕∙ 𝑱 ∙ (𝒕− 𝒕 𝟎 ) 𝟑 𝑿 𝟏 + 𝑽 𝟏 ∙ 𝒕− 𝒕 𝟏 +𝟎.𝟓∙ 𝑨 ∙ (𝒕− 𝒕 𝟏 ) 𝟐 𝑿 𝟐 + 𝑽 𝟐 ∙ 𝒕− 𝒕 𝟐 +𝟎.𝟓∙ 𝑨 ∙ 𝒕− 𝒕 𝟐 𝟐 −𝟎.𝟏𝟔𝟔𝟕∙ 𝑱 ∙ (𝒕− 𝒕 𝟐 ) 𝟑 𝑿 𝟑 + 𝑽 ∙ 𝒕− 𝒕 𝟑 𝑿 𝟒 + 𝑽 ∙ 𝒕− 𝒕 𝟒 −𝟎.𝟏𝟔𝟔𝟕∙ 𝑱 ∙ (𝒕− 𝒕 𝟒 ) 𝟑 𝑿 𝟓 + 𝑽 𝟑 ∙ 𝒕− 𝒕 𝟓 −𝟎.𝟓∙ 𝑨 ∙ (𝒕− 𝒕 𝟓 ) 𝟐 𝑿 𝟔 + 𝑽 𝟒 ∙ 𝒕− 𝒕 𝟔 −𝟎.𝟓∙ 𝑨 ∙ 𝒕− 𝒕 𝟔 𝟐 +𝟎.𝟏𝟔𝟔𝟕∙ 𝑱 ∙ (𝒕− 𝒕 𝟔 ) 𝟑 𝑿 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕≤ 𝒕 𝟏 𝒕 𝟏 ≤𝒕≤ 𝒕 𝟐 𝒕 𝟐 ≤𝒕≤ 𝒕 𝟑 𝒕 𝟑 ≤𝒕≤ 𝒕 𝟒 𝒕 𝟒 ≤𝒕≤ 𝒕 𝟓 𝒕 𝟓 ≤𝒕≤ 𝒕 𝟔 𝒕 𝟔 ≤𝒕≤ 𝒕 𝟕 𝒕> 𝒕 𝟕 𝒗 𝒕 = 𝟎 𝟎.𝟓∙ 𝑱 ∙ (𝒕− 𝒕 𝟎 ) 𝟐 𝑽 𝟏 + 𝑨 ∙ 𝒕− 𝒕 𝟏 𝑽 𝟐 + 𝑨 ∙ 𝒕− 𝒕 𝟐 −𝟎.𝟓∙ 𝑱 ∙ (𝒕− 𝒕 𝟐 ) 𝟐 𝑽 𝑽 −𝟎.𝟓∙ 𝑱 ∙ (𝒕− 𝒕 𝟒 ) 𝟐 𝑽 𝟑 − 𝑨 ∙ 𝒕− 𝒕 𝟓 𝑽 𝟒 − 𝑨 ∙ 𝒕− 𝒕 𝟔 +𝟎.𝟓∙ 𝑱 ∙ (𝒕− 𝒕 𝟔 ) 𝟐 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕≤ 𝒕 𝟏 𝒕 𝟏 ≤𝒕≤ 𝒕 𝟐 𝒕 𝟐 ≤𝒕≤ 𝒕 𝟑 𝒕 𝟑 ≤𝒕≤ 𝒕 𝟒 𝒕 𝟒 ≤𝒕≤ 𝒕 𝟓 𝒕 𝟓 ≤𝒕≤ 𝒕 𝟔 𝒕 𝟔 ≤𝒕≤ 𝒕 𝟕 𝒕> 𝒕 𝟕

25
**3rd Order Profile: Equations**

𝒂 𝒕 = 𝟎 𝑱 ∙(𝒕− 𝒕 𝟎 ) 𝑨 𝑨 − 𝑱 ∙(𝒕− 𝒕 𝟐 ) 𝟎 − 𝑱 ∙(𝒕− 𝒕 𝟒 ) − 𝑨 − 𝑨 + 𝑱 ∙(𝒕− 𝒕 𝟔 ) 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕≤ 𝒕 𝟏 𝒕 𝟏 ≤𝒕≤ 𝒕 𝟐 𝒕 𝟐 ≤𝒕≤ 𝒕 𝟑 𝒕 𝟑 ≤𝒕≤ 𝒕 𝟒 𝒕 𝟒 ≤𝒕≤ 𝒕 𝟓 𝒕 𝟓 ≤𝒕≤ 𝒕 𝟔 𝒕 𝟔 ≤𝒕≤ 𝒕 𝟕 𝒕> 𝒕 𝟕 𝒋 𝒕 = 𝟎 𝑱 𝟎 − 𝑱 𝟎 − 𝑱 𝟎 𝑱 𝟎 𝒕< 𝒕 𝟎 𝒕 𝟎 ≤𝒕≤ 𝒕 𝟏 𝒕 𝟏 ≤𝒕≤ 𝒕 𝟐 𝒕 𝟐 ≤𝒕≤ 𝒕 𝟑 𝒕 𝟑 ≤𝒕≤ 𝒕 𝟒 𝒕 𝟒 ≤𝒕≤ 𝒕 𝟓 𝒕 𝟓 ≤𝒕≤ 𝒕 𝟔 𝒕 𝟔 ≤𝒕≤ 𝒕 𝟕 𝒕> 𝒕 𝟕

26
**3rd Order Profile: ACSPL+ Example**

27
**Jogging: Basics Jogging: Accelerating to constant velocity**

No defined end-point Can be done with 1st order, 2nd order or 3rd order profiles

28
**Jogging: ACSPL+ Example**

29
**CAM Motion: Basics CAM Motion:**

Multi-axis motion along a continuous path 2 or 3 dimensional space Can involved more than 3 axes Common in CAD/CAM applications where motion profile is a tool path created from a CAD file Typically composed of arc and line segments

30
**CAM Motion: Equations Line Segment: Arc Segment:**

Constant linear velocity along an n-dimensional path Requires knowledge of start point, end point, and velocity 𝒙 = 𝒗 ∙𝒕 Arc Segment: Constant angular velocity along circumference of a circle Confined to 2D plane Requires knowledge of start point, center point or end point (or equivalent) 𝒙=𝒓∙ 𝐜𝐨𝐬 𝝎∙𝒕+𝝋 𝒚=𝒓∙ 𝐬𝐢𝐧 𝝎∙𝒕+𝝋

31
**CAM Motion: ACSPL+ Example**

32
**Master / Slave: Basics Master / Slave Motion:**

Axis is slaved to a master signal Master signal could be an encoder, virtual axis, analog input, etc Slave is moved to track the masters position (position lock) or velocity (velocity lock) as best as possible without exceeding its maximum velocity or acceleration There will always be a delay between the master and slave Common in applications where the master signal has unknown dynamics or controlled externally

33
**Master / Slave: ACSPL+ Example**

34
**Spline: Basics Spline: Catmull-Rom: B-Spline:**

Smooth piece-wise polynomial function Used for interpolating in between data points to any degree of interpolation Different types of splines have different properties Catmull-Rom: Guarantees motion through control points Guarantees continuous position and velocity profiles (does not guarantee continuous acceleration profile) B-Spline: Does not guarantee motion through control points Guarantees continuous position, velocity and acceleration profiles

35
**Spline: PVT Motion PVT Motion:**

User provides position, velocity, and time points Motion generator interpolates between time points to determine position at each controller cycle Acceleration is implicitly defined by the PVT points

36
**Spline: ACSPL+ Example**

37
**Kinematics: Basics Kinematics: Forward Kinematics: Inverse Kinematics:**

Relationship between actuators positions and end-effector positions Common with multi-axis applications where end-effector motion is dependent on multiple actuators Forward Kinematics: Determining end-effector position as a function of actuator positions Inverse Kinematics: Determining actuator positions as a function of end-effector position

38
**Kinematics: Inverse Kinematics Example**

For the flexible gantry table below, determine the actuator positions as a function of the end-effector X-q position. 𝑋 1 =𝑋+ 𝐿∙ tan 𝜃 2 𝑋 2 =𝑋− 𝐿∙ tan 𝜃 2

39
**Kinematics: ACSPL+ Example**

40
**ACSPL+ Programming Example: 1**

Load program “Programming 06 – SetMotionParams.prg” to the controller Should populate buffer 19 Open communication terminal and set it up to show DISP messages From the communication terminal start buffer 19 at label ‘Begin’ (“START 19, BEGIN”). Follow the instructions on the screen What happens?

41
**ACSPL+ Programming Example: 2**

An application requires an axis to have two modes: slow and fast. The customer wants to use a digital input (IN(0).0) to toggle between the two modes (if ‘0’, set for slow mode, if ‘1’, set for fast mode). They will use a second digital input (IN(0).1) to toggle motion. Use buffer 20 to write the program. Once running program should not stop (hint: WHILE 1 loop). Anytime IN(0).0 is toggled the motion parameters should switch between a slow and fast mode (determine your own slow and fast parameters) Anytime IN(0).1 goes from low to high a new motion should be started. Use the motion command “PTP/r (axis), distance” for the motion. Run the program and test.

Similar presentations

OK

Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.

Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on combination of resistances in parallel Ppt on formation of a company in india Ppt on strategic brand management Ppt on main distribution frame Ppt on uses of metals and nonmetals Ppt on cross border merger and acquisition Ppt on operation research in linear programming Ppt on circumference and area of circle Ppt on supply chain management of nokia windows Ppt on gandhi in english