DEV Community

Cover image for High & Soft SS Curve Application on Lithium Battery Welding
ZMotion Controller
ZMotion Controller

Posted on

High & Soft SS Curve Application on Lithium Battery Welding

As we all know, since the development of technology, lithium battery is with long service life, strong adaption and high energy. Therefore, the lithium battery is used widely in all kinds of applications, such as electronics, transportation, etc., and derived lithium battery welding and other production industries are also developing rapidly in the market.

In this way, the market competition environment is very fierce, then for lithium battery, it requires higher and higher precision. Now, let's see how high and soft SS curve is achieved in lithium battery welding application.

1. Introduction

Through commands, HW_PSWITCH2, MOVE_HWPSWITCH, HW_TIMER and others all are used to realize hardware comparison output PSO.

For example, when doing the fillet processing of lithium battery welding, the output spacing can be kept constant while decelerating, and the SS curve processing technology is combined to increase the process flexibility. It not only ensures the processing effect, reduces mechanical vibration, but also maximizes production capacity.

Image description

2. Axis Speed Curve

Common motion curves are ladder (T) speed curve and S speed curve. Actually, Zmotion developed one another speed curve based these two, SS Speed Curve.

Next, show one by one for you.

(1) Ladder speed curve

This kind of curve also can be called T curve, which is used to express the relationship between the speed and the time. As shown below, there are 3 stages for standard ladder speed curve, constant acceleration, constant and constant deceleration stages.

Therefore, in interpolation motion, use Basic instructions directly to set speed parameters (SPEED, ACCEL, DECEL) when axis parameters are initializing.

This kind of curve is applied extremely widely because of fastest planning and simple usage in motion control.

Simple and fast correspond to not so smooth, and the corner acceleration is not consecutive, then easily cause machine shake in actual interpolation.

Image description

(2) S speed curve

Also, S speed curve is used to show speed and time relationship. The difference is this will process smooth in acceleration and deceleration stage, then the curve shape looks like "S", please refer to below graphic.

In actual motion application, there is one specified instruction "SRAMP" provided by Zmotion Basic language, using it to set corresponding value for reducing shakes in control process, then the speed curve in motion will be smoother.

Image description

The grammar of SRAMP: VAR1 = SRAMP, SRAMP = smoothms.

smoothms: millisecond unit, the acceleration and deceleration process will extend the corresponding time after setting, the length of time that can be set and the actual extension time of acceleration and deceleration are related to distance, speed, and accel.

(3) SS speed curve

SS speed curve is also named as jerk curve. Similarly, it displays the speed and the time.

But what is it exactly ?

In fact, it is the physical quantity that describes acceleration changes, namely, change ratio of acceleration.

It is developed by Zmotion, including the Basic commands, "VP_MODE", it can be used to achieve SS curve through mode 6 and mode 7.

Image description

After the jerk is smoothed, in some high-precision motion industrial applications, the phenomenon of excessive shock and vibration caused by the rapid acceleration rate of the mechanism can be reduced.

For example, in the common lithium battery welding processing industry, when performing track welding on the top cover of the power battery, applying SS curves to it in each corner chamfering motion can effectively increase the flexibility, and reduce machine vibration and impact, making the welding process more stable and continuous.

3. Speed Curve Theoretical Analysis

As mentioned above, the trapezoidal velocity curve has only three stages, uniform acceleration, uniform velocity and uniform deceleration.The S-shaped curve can be divided into 7 stages because the acceleration and deceleration stages are smoothed, as shown in the figure below, the range of action of the S-curve is T1, T3, T5, and T7, the range of action of the SS curve is also the same, the difference is that the SS curve acceleration changes more smoothly.

Image description

Then, how jerk come out?

In acceleration and deceleration process, acceleration is changeable, one new variable is needed, "J" -- jerk.

J=da/dt

In the acceleration changes, the maximum acceleration is defined as a max, the minimal is -a max, in this way, the relationship between acceleration and jerk in each stage is:

Image description

Generally, 3 basic system parameters are required to determine the whole running process.

(1) acceleration and time relation

According to the acceleration change curve in the above figure, it can be seen that T1-T3 is the constant acceleration stage, T4 is the constant acceleration stage, and T5-T6 is the constant deceleration stage , and there is another variable μ:

Image description

Depend on above two formulas, functional relationship between acceleration and speed should be:

Image description

(2) speed and time relation

The functional relationship between speed and acceleration is: v=at, then the relationship between jerk and speed satisfies:

Image description

Combined with the acceleration time relationship and the above acceleration and time relationship function, the following relationship can be obtained:

Image description

After simplification, we get:

Image description

That's all for the functional relationship among the curve changes among speed, acceleration and jerk.

4. VP_MODE

(1) Introduction

The acceleration and deceleration curve type can be set through the VP_MODE command. And there are multiple modes to choose, S-curve and SS curve can be set to make the trapezoidal curve smoother. This instruction is generally used in the axis parameter initialization program and can be used together with the SRAMP instruction. When VP_MODE is mode 0, the value set by SRAMP takes effect.

Syntax: VAR1 = VP_MODE or VP_MODE(axis)=mode

mode: mode selection

The VP_MODE mode is as follows.

--Mode 0--

By default, use SRAMP to set the S-curve.

--Mode 4--

The maximum acceleration is at the start, and the acceleration gradually becomes 0 when the maximum speed is reached. The S and SS curves are shown below.

Image description

This mode is suitable for high-speed start-stop processing occasions that do not require impact.

--Mode 6--

A new type of SS curve, a curve type with continuous jerk, SS mode will increase the deceleration time by 87% compared with T-shaped deceleration. This mode only takes effect in the deceleration phase, and the acceleration phase takes effect in mode 0, which is convenient for continuous small line segment interpolation.

Image description

This mode is suitable for processing occasions where the machine starts at high speed and stops smoothly.

--Mode 7--

New type SS curve, curve type with continuous jerk. Dynamically modifying the axis parameters or continuous interpolation may cause the jerk to be uncontinuous. At this time, it will switch to mode 0, so it is recommended that SRAMP also set an appropriate value.

Image description

This mode is suitable for shock-free processing occasions with high precision and stable start-stop speed.

(2) Examples & Routines

Following all routines can be achieved through ZMC432 controller.

Image description

--set VP_MODE as mode 0, take the single-axis motion as the example--

RAPIDSTOP(2) 'stop all former axes
WAIT IDLE(0) 'wait for axis 0 to stop
BASE(0) 'set axis
ATYPE=1 'set axis type as pulse
UNITS=1000 'set pulse amount
DPOS=0 
MPOS=0
SPEED=100 'set the speed as 100
ACCEL=1000 'set acceleration as 1000
DECEL=1000 'set deceleration as 1000
SRAMP=50 'set S curve time as 50ms
VP_MODE=0 'set mode 0 for axis 0
TRIGGER
MOVE(25) 'single-axis motion 25
END
Enter fullscreen mode Exit fullscreen mode

When SRAMP=50, the speed and acceleration curves are shown in the figure below, which are smoothed in the acceleration and deceleration phases respectively, and the movement time will be extended accordingly. It can be compared with the graph when SRAMP=0.

Image description

When SRAMP=0:

Image description

--set VP_MODE as mode 4, take multi-axis linear interpolation as the example--

RAPIDSTOP(2) 'stop all former axes
WAIT UNTIL IDLE(0) AND IDLE(1) 'wait for axis 0 and axis 1 to stop
BASE(0,1) 'set axis, axis 0 is the master axis
ATYPE=1,1
UNITS=1000,1000
DPOS=0,0
MPOS=0,0
SPEED=100,100 'set axis 0 and axis 1 speed as 100
ACCEL=1000,1000
DECEL=1000,1000
MERGE=ON 'open continuous interpolation
SRAMP=0,0 'don't set S curve
VP_MODE=4,0 'set mode 4 for axis 0, and set mode 0 for axis 1
TRIGGER
MOVE(25,25) 'interpolation motion
END
Enter fullscreen mode Exit fullscreen mode

Under the above configuration, axis 0 adopts VP_MODE mode 4, starts to move with the highest acceleration and decreases to 0. This mode is suitable for occasions requiring quick start and stop.

Note: since this movement is an interpolation movement, axis 0 is the main axis, so the speed and acceleration curves can be based on the main axis. The VP_ACCEL data source needs to be manually input to collect changes in acceleration values under the S-curve and SS-curve.

Image description

--set VP_MODE as mode 6, take multi-axis linear interpolation as the example--

RAPIDSTOP(2) 'stop all former axes
WAIT UNTIL IDLE(0) AND IDLE(1) 'wait for axis 0 and axis 1 to stop
BASE(0,1) 'set axis, axis 0 is the master axis
ATYPE=1,1
UNITS=1000,1000
DPOS=0,0
MPOS=0,0
SPEED=100,100 'set axis 0 and axis 1 speed as 100
ACCEL=1000,1000
DECEL=1000,1000
MERGE=ON 'open continuous interpolation
SRAMP=0,0 'don't set S curve
VP_MODE=6,0 'set mode 6 for axis 0, and set mode 0 for axis 1
TRIGGER
MOVE(25,25) 'interpolation motion
END
Enter fullscreen mode Exit fullscreen mode

When VP_MODE is set to mode 6, only the deceleration phase is smoothed. When the S or SS curve is not set during the acceleration phase, the acceleration will reach the maximum value at the moment of power-on, and it will move with the set acceleration. When the SS curve is set in the deceleration phase, it can be seen from the figure below that the acceleration curve is decelerated smoothly, making the motion transition more natural and smooth during the deceleration phase.

This mode is suitable for continuous interpolation occasions to improve efficiency while ensuring smooth motion.

Note: since this movement is an interpolation movement, axis 0 is the main axis, so the speed and acceleration curves can be based on the main axis.

Image description

--set VP_MODE as mode 7, take track processing in lithium battery industry as the example--

RAPIDSTOP(2) 'stop all former axes
WAIT UNTIL IDLE(0) AND IDLE(1) 'wait for axis 0 and axis 1 to stop
BASE(0,1) 'set axis 0 and axis 1
ATYPE=1,1
UNITS=1000,1000
DPOS=0,0
MPOS=0,0
SPEED=100,100 'set axis 0 and axis 1 speed as 100
ACCEL=1000,1000 'set axis 0 and axis 1 acceleration as 1000
DECEL=1000,1000
MERGE=ON
SRAMP=100,100 'set S curve time as 100
VP_MODE=7,7 'set mode 7 for axis 0, namely, set SS curve
TRIGGER
MOVE(10,0) 'axis 0 moves 10 forward 
MOVECIRC(2.5,2.5,0,2.5,0) 'move circular motion, the radius is 2.5
MOVE(0,10) 'axis 1 moves 10 forward 
MOVECIRC(-2.5,2.5,-2.5,0,0)
MOVE(-20,0) 'axis 0 moves 20 reversely 
MOVECIRC(-2.5,-2.5,0,-2.5,0)
MOVE(0,-10) 'axis 1 moves 10 reversely 
MOVECIRC(2.5,-2.5,2.5,0,0)
MOVE(10,0) 'axis 0 moves 10 forward 
END
Enter fullscreen mode Exit fullscreen mode

VP_MODE is set to mode 7, and the image after smoothing the SS curve is as follows, which can be compared with the VP_ACCEL acceleration curve (light blue line) in the figure below. It is suitable for occasions with large motion jitter.

Note: since this movement is an interpolation movement, axis 0 is the main axis, so the speed and acceleration curves can be based on the main axis.

Image description

Interpolation trajectory of axis 0 and axis1 under XY mode:

Image description

--SS curve is not set--

SRAMP=100,100 'set S curve time as 100

VP_MODE=0,0 'cancel SS curve

It can be seen from the sampled waveform, it moves according to current S curve.

Image description

From this, it can be compared that VP_MODE=7, the speed curve of SS acceleration and deceleration of axis 0 and axis 1 is softer.

Image description

That's all, thank you for your reading -- Zmotion Motion Control Lithium Welding Application: High & Soft SS Curve

Have a good day, best wishes, see you next time.

Top comments (0)