58
Modeling of mechanical motions in a sewing machine JOHAN TEGSTEN Master of Science Thesis Stockholm, Sweden 2008

modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

Modeling of mechanical motions in a

sewing machine

JOHAN TEGSTEN

Master of Science Thesis

Stockholm, Sweden 2008

Page 2: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

Modeling of mechanical motions in a sewing machine

Johan Tegsten

Master of Science Thesis MMK 2008:27 MDA310

KTH Industrial Engineering and Management

Machine Design

SE-100 44 STOCKHOLM

Page 3: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

3

Preface I want to take the opportunity to thank all the people that has inspired and supported me to perform this master thesis. A special thanks to my supervisor at KTH Micke Hellgren who has supported me with both practical arrangements as well as evaluation of the technical documentation. I also want to thank my supervisors at VSM Group Dan Gomér and Rolf Whalström for all the support with the machine data and information about the moving parts and how they are controlled. Finally I want to thank Ulf Andorff (The tool shop at KTH) for all the support when manufacturing parts necessary for performing the project.

Page 4: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

4

Master of Science Thesis MMK 2008:27 MDA310

Modeling of mechanical motions in a sewing machine

Johan Tegsten

Approved

2008-04-15

Examiner

Jan Wikander

Supervisor

Mikael Hellgren

Commissioner

VSM Group

Contact person

Dan Gomér

Rolf Wahlström

Abstract

To avoid high costs and delays, it is important to correct mistakes and to solve problems as early as possible in the development process. The aim for this master thesis is to develop dynamic models to describe the mechanical motions in an advanced sewing machine. The main purpose is to develop a mathematical model which can be connected with the development tools used by VSM Group. The starting point for the simulation of mechanical motions in the sewing machine has been that the in-signal to the model is the electric in-signal to the main motor [V] and that the out-signals are the arm shaft motions [position, velocity and acceleration]. There are significant friction variances depending on the arm shaft position during one cycle (one arm shaft revolution). The variation of the friction measurements have been implemented in two Simulink models, one that has been converted from the CAD model and one that is based on equations for an electric-motor. The model based on the electric-motor is the most accurate model because the model is less complex than the CAD converted model. The sewing machine contains several stepper motors. VSM Group wish to develop mathematical models also for the stepper motors. Two Simulink models have been developed, one with the aid of Matlab toolbox and one based on mathematical and physical relationships. The velocity of the sewing machine fluctuates from time to time depending on the temperature and lubrication. The temperature impact has not been included in these models. To compensate this, models for a warm and a cold machine have been developed.

Page 5: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

5

Examensarbete MMK 2008:27 MDA310

Modellering av mekaniska rörelser i en symaskin

Johan Tegsten

Godkänt

2008-04-15

Examinator

Jan Wikander

Handledare

Mikael Hellgren

Uppdragsgivare

VSM Group

Kontaktperson

Dan Gomér

Rolf Wahlström

Sammanfattning

För att undvika höga kostnader och förseningar är det viktigt att rätta fel och lösa problem så tidigt som möjligt under utvecklingsprocessen. Målet med detta examens arbete är att utveckla en dynamisk modell som beskriver de mekaniska rörelserna i en avancerad symaskin. Det huvudsakliga syftet är att utveckla en matematisk modell som kan sammankopplas med de övriga verktygen som används hos VSM Group. Utgångspunkt för simuleringen av de mekaniska delarna har varit att insignalen till modellen är den elektriska insignalen till el-motorn [V] och att utsignalerna är rörelsen på arm axeln [position, hastighet och acceleration]. Det är stora skillnader i friktionen beroende på i vilket läge armaxeln befinner sig i under en cykel (ett varv på symaskinens arm axel). Detta har studerats genom att mätningar på symaskinen har gjorts. Dessa friktionsmätningar har implementerats i två simulink modeller, en som konverterats ifrån CAD modellen av symaskinen och en modell som utgår ifrån ekvationer för en elmotor. En mer tillförlitlig modell fås från modellen utifrån elmotorn, eftersom den är mindre komplex. Symaskinen innehåller också många stegmotorer. VSM Group önskar också modeller för dessa. Två simulink modeller har tagits fram en med hjälp av matlab toolbox och en baserad på matematiska och fysikaliska samband. Symaskinens hastighet varierar något från gång till gång, beroende på temperatur och smörjning. Temperaturfaktorn har inte tagits med i dessa modeller. För att kompensera detta har modeller för varm respektive kall maskin tagits fram.

Page 6: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

6

Table of contents

1. Introduction..................................................................................................................... 8

1.1 Background ............................................................................................................... 8 1.2 Purpose / Aim ........................................................................................................... 8 1.3 Problem definition .................................................................................................... 9 1.4 Method ...................................................................................................................... 9 1.5 Limitations and assumptions..................................................................................... 9

2. Development tools and system definitions ..................................................................... 9 2.1 Matlab/Simulink ....................................................................................................... 9

2.1.1 SimMechanics.................................................................................................. 10 2.1.2 SimPowerSystems............................................................................................ 10 2.1.3 Real time work shop ........................................................................................ 10 2.1.4 Parameter estimation toolbox .......................................................................... 10

2.2 dSpace ..................................................................................................................... 10 2.2.1 Control desk ..................................................................................................... 10

2.3 Pro/E ....................................................................................................................... 10 2.4 Mechanical construction ......................................................................................... 11 2.5 Friction definitions.................................................................................................. 11

3 Mathematical modeling ................................................................................................. 12 3.1 DC motor model ..................................................................................................... 12

3.1.1 Linear DC model.............................................................................................. 12 3.1.2 Non linear torque ripple ................................................................................... 14 3.1.3 Friction modeling............................................................................................. 16 3.1.4 The principle model for modeling structure .................................................... 19

3.2 Modeling the sewing machine ................................................................................ 20 3.2.1 Modeling sewing machine equations............................................................... 20 3.2.2 Analyses of the torque ripple of the sewing machine ...................................... 22 3.2.3 Velocity characteristics of Sapphire 870 ......................................................... 23

3.4 Stepper motor model for simulink .......................................................................... 27 3.4.1 Simulation of a thread cut with the cutter motor in the Simulink model......... 29

3.5 Mathematical model of a stepper motor ................................................................. 31 3.5.1 Stepper motor summary................................................................................... 33

4 Parameter identification ................................................................................................. 34 4.1 Hardware setup and construction............................................................................ 37

4.1.1 Motor control ................................................................................................... 37 4.2 Software environment............................................................................................. 39

4.2.1 The conversion process CAD to Simulink....................................................... 39 5 Conclusions.................................................................................................................... 41

5.1 Results..................................................................................................................... 41 5.1.1 Simmechanics model ....................................................................................... 42 5.1.2 Stepper motor model........................................................................................ 42

5.2 Analysis................................................................................................................... 42 5.2.1 Analysis of the static friction ........................................................................... 42 5.2.2 Analysis of the static friction with current as an in-parameter ........................ 45 5.2.3 Analysis of the kinetic friction......................................................................... 46

Page 7: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

7

5.2.4 Analysis of the viscous friction........................................................................ 46 5.3 Discussion............................................................................................................... 47

5.3.1 Field of application summary and suggested improvements........................... 47 5.3.2 Measurements and future models discussion................................................... 48

5.4 Future work............................................................................................................. 51 6 References...................................................................................................................... 52 Appendix........................................................................................................................... 54

A Parameters for Matlab code ...................................................................................... 54 A1 Model parameters for Matlab code ..................................................................... 54

B Simulink models........................................................................................................ 55 C dSpace I/O table ........................................................................................................ 57 E Schematic connections .............................................................................................. 57

Page 8: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

8

1. Introduction The development of sewing machines today is complex. Many different tools are used for the development. There are lots of benefits to get the possibility to simulate the sewing machine on a computer before manufacturing of prototypes. This is the main reason why VSM Group wishes to perform this master thesis.

1.1 Background

At VSM Group different computer tools are used for development of the functionality for sewing machines. Some of the tools that are used for the development at VSM are listed below:

• Pro/E is used for modeling and simulation of mechanical systems.

• Matlab/Simulink: This environment is used to simulate electro-mechanical models

• Rhapsody is used for modeling the software in the sewing machines. These tools are not connected to each other. It is therefore important to investigate the possibility to connect CAD software with the Simulink software environment. The sewing machine has several moving parts. It would be beneficial to build a mathematical model showing how the moving parts will be affected depending on the variation of velocity during one revolution of the sewing machine. The sewing machine (Sapphire 870) that has been studied in this project has five stepper motors. These stepper motors are related to some important tasks like, thread tension, the feeding system and the needle zigzag movement. It is important to investigate the possibility to develop a stepper motor model. The stepper motor is a common component in sewing machines. This master thesis is a part of a bigger work where the aim is to investigate the possibility to connect the CAD model to executable code in a simulator. This code is connected to the simulation code for the program (software) in the sewing machine [16].

1.2 Purpose / Aim

The purpose of this master thesis is to develop tools (models) which will facilitate the design and to get a better understanding of the friction torque and velocities that have an influence on the sewing machine in operation. Sub purposes listed below:

• Develop a mathematical model for the moving parts that are related to the main motor of the sewing machine Sapphire 870.

• The goal is to convert the existing CAD model from PRO/E to simulink. This conversion will include the relationship between the mechanical parts in the sewing machine.

• Create a mathematical model for a stepper motor.

Page 9: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

9

1.3 Problem definition

It is important to identify problems as early as possible in the development process. Problems that occurs in a later step of the development process causes big economic losses and delays. Models which will make it possible to simulate a machine in operation before prototype manufacturing will reduce the local lead time and the development cost. Mistakes will be eliminated and engineering changes can be implemented before prototype and pre production.

1.4 Method

The work can be divided into the following steps:

• The first step is planning and setting the guidelines for the project.

• The second step is to study the task and to perform a research of earlier experiences. A study of friction modeling and modeling literature will be performed.

• The third step is creating models using the experiences and knowledge from step two. The models will be mathematically presented and implemented in Matlab/Simulink.

• The fourth step is verifying the model. Sensors and actuators will be mounted on the sewing machine to monitor the motion and the in-signals. The measuring results will be compared with the model data. The parameters will be tuned to get the model as close as possible to the reality data.

1.5 Limitations and assumptions

Technical limitations: The encoder is mounted on the arm shaft on the sewing machine. The ratio between the motor and the arm shaft is 8:1. It is assumed that the motor has 8 times higher velocity than the arm shaft. The ratio between the lower shaft and the arm shaft is 1:1. It is assumed that the lower shaft has the same velocity as the arm shaft. In the stepper motor model it’s assumed that the stepper motor have a constant speed of 1000 steps/second. The models for the sewing machine are developed for forward sewing.

2. Development tools and system definitions In this chapter the development tools that are used for this master thesis, will be presented.

2.1 Matlab/Simulink

Matlab (MATrix laboratory) is an environment for analysis of numerical data and calculations. One of the benefits of Matlab is that it has several built in functions. Simulink is an environment where simulations can be done. It is a graphical user interface where the user can design the system. Some of the toolboxes to Simulink that have been used in this project will be described below.

Page 10: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

10

2.1.1 SimMechanics

SimMechanics is an environment where the motion of physical objects can be described and simulated. This will include actuators, sensors and damping elements etc.

2.1.2 SimPowerSystems

SimPowerSystems is a toolbox in Matlab where simulation of electric equipments can be done. Examples of machines that can be simulated are electric motors and stepper motors.

2.1.3 Real time work shop

This is a toolbox that transfer Simulink blocks to code. This can either be code for a specific processor or code for running the model with a c or c++ language.

2.1.4 Parameter estimation toolbox

Parameter estimation toolbox is a toolbox in Simulink that is used for identification of parameters in a Simulink model.

2.2 dSpace

The development environment dSpace is a collection of different software and hardware tools for running and testing real time systems. This environment is closely connected to Matlab/Simulink. The hardware that was used in this project has been a PCI card of model DS1104 that has a DSP (Digital signal processor) of 250 MHz. DS1104 has 100 I/O (Input/output) that can be programmed to handle different signals e.g. encoder signals or pwm (pulse with modulation) signals, ADC . (Analog Digital convention) and DAC (Digital to Analog conversion).

2.2.1 Control desk

Control desk is a graphical environment that connecting the dSpace hardware to the PC interface. Signals can be supervised and activated. In order to evaluate different parameter settings it is also possible to change the parameters during operation.

2.3 Pro/E

Pro/E (Pro Engineer) is a CAD (Computer aided design) software.

Page 11: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

11

2.4 Mechanical construction

The mechanical layout can be described as follows: (The numbers in this part refer to figure 1) There is an upper shaft (1) in the sewing machine, called the arm shaft. There is also a lower shaft (2), which is connected to the feeding system. These two shafts are connected by a belt (3). The arm shaft is driven by a DC motor (4) with a belt (5). The mechanical connection to the linear motion of the needle (6) is performed by slewing brackets and crank movements (7). The lower shaft is connected to the hook (8) by a worm gear unit. One of the stepper motors (9) is controlling the horizontal movement of the needle

Figure 1 Mechanical parts of a sewing machine.

2.5 Friction definitions

The friction phenomenons and constants [4] will be defined in this part, in order to study the friction impact during different operation conditions. Static friction (Sticktion): The necessary torque (force) to initiate motion to begin. It is often higher than the kinetic friction. Kinetic friction (Coulomb friction): This is a friction that is independent of the magnitude of the velocity. Viscous friction: This is a friction that is proportional to the velocity and goes to zero if velocity is zero. Brake-Away: The transition difference from (static friction) to motion (kinetic friction).

Page 12: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

12

Brake-Away Force (Torque): The amount of torque (force) required to overcome the static friction. Break-Away Distance: The distance traveled during brake-away the distance which static friction operates over, a consequence of the materials used and forces applied. Dahl friction: “A friction phenomenon that arises from the elastic deformation of boding sites between two surfaces which are locked in static friction. The Dhal friction causes a sliding junction to behave as a linear spring for small displacements.” [4] Stribeck friction: Stribeck friction is a friction phenomenon that arises from the use of fluid lubrications. The friction decreases at increased velocity. (Valid for low speed) Negative viscous friction: Negative viscous friction is a friction that decreases by increased speed. Stribeck friction is an example of negative viscous friction.

3 Mathematical modeling This chapter will describe the mathematical modeling. This includes DC motor modeling and different frictions models. The principle for modeling the sewing machine will be presented in this chapter

3.1 DC motor model

The model of a DC motor can be divided in two main parts, one linear model and one non-linear. The linear model can be described from Newton’s second law and Kirchhoff‘s law. The non-linear behaviour can be described as fluctuating force ripple.

3.1.1 Linear DC model

The DC motor can be described from these equations [1] ϕϕϕ &&&,,

ϕ , is the angular position ϕ& is the angular velocity and ϕ&& is the angular acceleration for

the shaft. Kirchhoff’s law gives:

ϕ&⋅+⋅+⋅= emfKdt

dILIRU (1)

J

Page 13: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

13

Where ,U is DC input voltage, I is current, R is resistance and L inductance. emfK is

the back EMF constant of the motor. Torque equations: The torque that is developed from the motor will be described as follows.

IKM t ⋅= (2)

Where M is generated torque and tK is torque constant of the motor.

For a moving system it will be described as follows.

loadMdJM +⋅+⋅= ϕϕ &&& (3)

Where J is inertia, d is viscosity constant and loadM is loaded torque.

Rewriting of Kirchhoff’s law (1)

R

KUI

emf ϕ&⋅−= (4)

Because the electrical time constant dt

dI is much smaller than the mechanical constant,

this term will be ignored. This will also speed up the simulations. Kirchhoff law in torque equation (2) and (3) in (4) gives:

( )ϕϕϕ &&&& ⋅−=+⋅+⋅= emf

t

load KUR

KMdJM (5)

( )

J

MdKUR

Kloademf

t −⋅−⋅−=

ϕϕϕ

&&

&& (6)

In this case 0=loadM

Equation (6) can be rewritten as

J

MR

RdKKU

R

Kload

emftt −⋅

⋅+⋅−⋅

=

ϕ

ϕ

&

&& (7)

Replace the following expressions in the equation above 2KR

K t = and

1KR

RdKK emft=

⋅+⋅

This will give the following second order dynamic model:

J

MKUK load−⋅−⋅=

ϕϕ

&&&

12 (8)

Page 14: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

14

Numeric values

ANmK t /017,0= Calculated from the datasheet of the main motor.

sradVK emf //021,0= This is calculated from the datasheet from the VSM main motor

measurements.

Ω= 1.1R This is measured on the motor and compared with measurements from VSM

[ ]VU 240 −= This is the operating conditions of the motor 26106,8 kgmJ −⋅= This is calculated inertia from the motor geometry

3.1.2 Non linear torque ripple

The electric motor Domel 482.501 is a brush motor with 12 poles[14]. Each of those will give a fluctuation torque ripple of totally 12 during one revolution of the motor. The following graph shows when the motor gets 1,5 V.

9.6 9.8 10 10.2 10.4 10.6

220

230

240

250

260

270

280

290

time

rpm

1.5 V to main motor

rpm

meanrpm

ppr

Figure 2 This graph shows how the velocity changes during four revolutions of the motor. The ppr

(pulse per revolution) indicates where a new revolution begins.

The blue curve is the velocity in rpm for the motor and the red curve indicates one revolution and the green curve is the mean value of the velocity. The higher frequency is related to the 12 poles in the motor. This is shown in the figure 3. The lower frequency is related to the adapter between the encoder and the motor axis. These are not perfectly eccentric which creates a wobbling effect.

Page 15: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

15

9.65 9.7 9.75 9.8 9.85 9.9

220

230

240

250

260

270

280

time

rpm

1.5 V to main motor

rpm

meanrpm

ppr

Figure 3 This figure shows how the velocity chances during one revolution of the main motor.

This variation can be related to the position during revolution. In order to simulate this ripple it can be described as a trigonometric function of the type:

( ) )sgn()sin()( ϕφϕϕϕ && ⋅+⋅= AM ripple (9)

Equation (9) is an example of how the torque ripple can be expressed as a sinus function. The equation is a first order model. In order to describe a higher order model the torque ripple can be expressed as follows:

( ) )sgn()(sin)(...)sgn()(sin)( 1

1 ϕφϕϕϕφϕϕϕ &&&& ⋅+⋅++⋅+⋅= n

nripple AAM (10)

This model is advantageous for describing a more complex torque ripple. The ripple will be connected to the position during one revolution. When adding the non linear torque ripple to the linear motor model the equation will be:

J

M

J

MKUK rippleload −−⋅−⋅

ϕ&

&&12 (11)

Page 16: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

16

3.1.3 Friction modeling

Friction can often be divided in two parts. Kinetic friction (coulomb friction) and viscous friction. The kinetic friction is independent to the velocity and viscous friction is dependent to the velocity. The kinetic friction level is the value of friction that precisely stops the motion. The static friction is the friction required to initiate the motion. The relation between the static, kinetic and viscous friction can be seen in figure 4 and 5. The friction to initiate motion is in most case larger than the part of the friction that is independent of the velocity (Kinetic friction). Several friction models have been developed by recording numerical data. But it is difficult to find the function for how the friction behaves. There exist some models for modeling friction that have been proven to be successful on many applications. Tustin model [4]:

( ) )sgn(ϕϕ

δ

ϕ

ϕ

&&&

&

⋅+−+=

vcssfriction FeFFFF s (12)

Where sF is the level of static friction and cF is the minimum level of kinetic friction

(coulomb friction). sϕ& is the lubricant parameter , vF is the viscous friction term and δ is

and additional empiric parameter typical in the range of [0.5-2]. Another friction model that Hess and Soom [4] has developed is

ϕ

ϕ

ϕ&

&

&

⋅+

+

−+= v

s

cscfriction F

FFFF

2

1

(13)

This model is quite similar to the Tustin friction model. The Tustin and “Hess and Soom” models shows higher friction requirement for starting the motion than to stop the motion. Standard coulomb friction model: If it’s assumed the kinetic and static frictions are at the same level, this relation between the kinetic and viscous friction can be presented.

)sgn(ϕϕ && ⋅⋅+= vcfriction FFF (14)

This model is easy to implement and to test.

Page 17: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

17

The relation between kinetic and viscous friction is shown in the following figures:

Figure 4 This figure shows the standard coulomb friction model.

Figure 5 This figure shows the principle for the Tustin and “Hass and Soom” friction model.

Static

friction

Viscous friction

Force

Velocity

Kinetic

friction

Kinetic

friction

Viscous friction

Force

Velocity

Page 18: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

18

Matlab comparison between the friction models:

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−40

−30

−20

−10

0

10

20

30

40

fric

tio

n [

Nm

]

vel [rad/s]

comparation between fiction models

Tustin

Hess Soom

Linear

Figure 6 A Matlab comparisons of the different friction models.

The models in figure 6 for Linear and Hess are only valid for v ≥ 0. Tustin model is suitable for all values except zero. How big the translation between the static and kinetic friction is depends on the lubricant

parameter sϕ& .

The total equation for the dynamics of an electric motor will be:

J

F

J

M

J

MKUK frictionrippleload −−−⋅−⋅

ϕ&

&&12 (15)

Note that frictionF in this case is a friction torque.

Page 19: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

19

3.1.4 The principle model for modeling structure

The figure 7 shows the principle model for simulation of friction (kinetic and dynamic) and position dependent torque ripple:

Figure 7 Principal of modeling friction and torque ripple.

In this model the friction is depending on the velocity and the torque ripple is depending on the position. This is the principle model for equation 15.

-

+

+ +

+

Motor

model U Torque 1/J 1/s 1/s

vel acc

25

30

35

40

45

50

Friction

Ripple

pos

ϕ&& ϕ ϕ&

Page 20: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

20

3.2 Modeling the sewing machine

The sewing machine is a complex system with several moving parts. The modeling of the sewing machine Sapphire 870 can be performed in some different perspectives. Here will different ways to solve the modeling be presented, with “pos” and “cons” rating. Table 1 Comparison between different modeling strategies.

model pos cons

DC motor torque ripple [1]

Quite straight forward to implement. Parameter estimation toolbox can be used. The model is fast to simulate and can be simulated in real time.

Difficult to find the approximation for the torque ripple. Some sinus function can be tested.

Simmechanics [13] This model requires very accurate parameters. It’s easy to study different parts of the sewing machine.

The model becomes very complex and is slow to simulate. It is hard to get all the masses and connections (joints) right.

Neural network [10] Model gets more accurate if it is trained more.

Only the relationship between in and out data will be defined.

The two methods that have been chosen to go forward with are the DC motor equations and the Simmechanics model. The DC motor is based on equations and capable to be run in real time. The Simmechanics model contains many moving parts and is therefore a good alternative, which easily can handle engineering changes. The Simulink models main systems can be seen in appendix B.

3.2.1 Modeling sewing machine equations

The DC motor in the sewing machines Sapphire 870 and Designer SE is a Domel 482.501 motor. The motor is connected to the arm shaft with a belt with the ratio 1:8 to the arm shaft. The arm shaft is connected to the lower shaft with a belt with a ratio of 1:1. This transmission is almost fixed and can be modeled as fixed. From the lower shaft there is a connection to the hook with the ratio 2:1 which is shown in figure 8 below.

Page 21: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

21

Figure 8 The main connections of the sewing machine.

Figure 9 The principle for modeling the sewing machine with kinetic, dynamic friction and torque

ripple.

The modeling of the sewing machine has been the same as for the DC motor but with other friction constants, torque ripple and ratios. The belt ratio between the motor and the arm shaft is n=1:8. This gives that the torque from the motor becomes 8 times higher than the velocity of the arm shaft and the speed of the arm shaft is 8 times lower than the speed of the motor.

The motor torque constant is ANmK t /017.0= from the datasheet and the back-emf

constant is estimated from the DC motor datasheet sradVK emf //021.0= . The difficult

part is here to identify the frictions.

-

+

+ +

+

Motor

model U Torque 1/J 1/s 1/s

vel acc

25

30

35

40

45

50

Friction

Ripple

pos n

ϕ ϕ& ϕ&&

Page 22: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

22

The equation for modeling the sewing machine will be presented as follows:

J

F

J

M

J

MKUK frictionrippleload −−−⋅−⋅

ϕ&

&&12 (16)

The friction frictionF is divided in two parts, kinetic and viscous friction. The kinetic

friction torque is measured to be NmFs 18.0= .The measurement is preformed by the

support of the dSpace environment but also verified by tests with weights. In order to get a approximate value of the torque required to start a motion the weights are applied at a given distance from the arm shaft to find the point where the arm shaft starts to move.

The viscous friction d is measured to sradNmd //102.2 5−⋅= by support of the dSpace environment. This parameter setting is valid for voltages from 0 to 20 V. The viscous

friction is valid for a cold machine. The viscous friction value sradNmd //100.1 5−⋅= is somewhat lower for a warm machine.

3.2.2 Analyses of the torque ripple of the sewing machine

Analysis of the torque ripple for different velocities for the sewing machine Sapphire 870. This shows that the torque ripple becomes lower with higher velocity see figure 10.

7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9

10

20

30

40

50

60

70

80

90

time [s]

vel [r

ad/s

]

Figure 10 Different velocity curves for duty cycle 30=blue, 50 =red, 60=green and 80=black.

The blue vertical line shows where a new revolution starts for the duty cycle of 30% to the main motor of the sewing machine Sapphire 870. This has been measured without needle and fabric. Figure 11 shows a comparison between the mean value velocity deviation at 30 and 80 duty cycle to the main motor.

Page 23: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

23

10.4 10.6 10.8 11 11.2 11.4 11.6 11.8 12

−1.5

−1

−0.5

0

0.5

1

1.5

time [s]

ve

l [r

ad

/s]

Figure 11The derivation of velocity during revolutions at blue dashed=duty cycle 30 and black=duty

cycle 80.

A study of figure 11 shows that the amplitude of the velocity variation will decrease at higher velocity. The velocity variance is ±1,5 rad/s during one revolution at a constant voltage of 7,2 V or 30% of duty cycle. The velocity variance is ±0,7 rad/s during one revolution at a constant voltage of 19,8 V or 80% (the dashed line). Most probably the inertia does not help to fulfill the motion at the lower velocity. This gives that the torque ripple can be described by this equation:

( ) )sgn()sin()( ϕφϕϕϕ && ⋅+⋅= AM ripple (17)

Where )(ϕ&A is a function that gets lower with increased velocity.

3.2.3 Velocity characteristics of Sapphire 870

During operation the velocity of the sewing machine will periodically be changed. To monitor this process the existing velocity control will be replaced by a variable DC voltage. By setting a fixed voltage it will then be possible to monitor the derivation during one revolution. The velocity change during one revolution will in the sequel be called “one cycle” see figure 12.

Page 24: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

24

6.4 6.6 6.8 7 7.2245

250

255

260

265

270

time

rpm

6,8 volt to main motor

rpm

ppr

Figure 12 This graph shows the periodically change in velocity when a voltage of 6,8 V is applied to

the motor.

When applying 6.8 V to the motor figure 12, the maximum arm shaft velocity will be 270 rpm and the minimum velocity will be 247 rpm during one cycle equivalent to a variance of 23 rpm between the maximum and minimum velocity. The main oscillation can be described as a sinus curve. At the lowest possible velocity recorded (before the machine stops) the velocity characteristic curve, looks as follows:

4 5 6 7 8

25

30

35

40

45

50

time

rpm

2,2 volt to main motor

rpm

ppr

Figure 13 Open loop shoot of the velocity when the motor gets 2,2 V and this velocity is the velocity

when the machine just stops.

Page 25: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

25

In this example the motor is applied with 2.2 V. The maximum velocity recorded during one cycle is approximately 50 rpm and the minimum velocity is 23 rpm. The oscillation impact is higher at lower velocity than at higher velocity. The time to complete one cycle is approximately. 1.5 seconds. The minimum arm shaft velocity occurs when the needle is at the lowest position. Maximum torque is required to fulfill the motion. The maximum velocity occurs when the needle is at the highest position. At this position the minimum torque is required to fulfill the motion. Another study was performed in order to monitor the velocity variation for the motor, applying 3.6 V. The result is shown Figure 14.

4 4.5 5 5.5 6 6.5 7 7.5

95

100

105

110

115

time

rpm

3,6 volt to main motor

rpm

ppr

Figure 14 Open loop speed characteristic when a voltage of 3,6 V is applied to the motor.

The same phenomenon as earlier studied occurs. Maximum velocity is 115 rpm and the minimum velocity is 95 rpm. The difference between max and min velocity is 20 rpm. Conclusion: The velocity variation can be approximated with a sinus curve. The amplitude is related to the velocity. At higher velocity the torque ripple is decreasing. The frequency is related to the position, which gives the velocity. The ripple frequency is increasing at increased velocity.

Page 26: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

26

Effects from the belt tension:

On the sewing machine Sapphire 870 there exists an option to adjust the belt tension between the motor and the arm shaft. This belt tension can be adjusted in three positions: low, normal and hard. The operational impact when running the machine at different belt tensions is represented in figure 15.

10 10.1 10.2 10.3 10.4 10.5500

510

520

530

540

550

560

time [s]

rpm

diffrent belt tension at duty 50

low

normal

hard

Figure 15 The sewing machine is running with 12 V to the main motor, with different belt tensions.

At harder belt tension the velocity decreases. In figure 12,13,14 and 15 it is seen that the fastest has frequency have 8 oscillations per revolution of the arm shaft. This faster frequency may originate from the motor shaft distortion.

Page 27: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

27

3.4 Stepper motor model for simulink

A simulink model of a stepper motor has been implemented in Matlab/Simulink version 2007b tool box SimPowerSystems [9]. The stepper motors that are used in the sewing machine Sapphire 870 are of type PM 25 -048 BI CHOPPER [15] it is a 2-2 phase bipolar motor. The model of the stepper motor looks as in see figure 16:

Figure 16 Model of stepper motor.

The in-signals are step-velocity and direction. The out-signals are voltage, current, velocity and position. [9] The equations that this model uses are:

The motor voltage )(θae :

dt

dppe ma

θθψθ ⋅⋅⋅⋅−= )sin()( (16)

The torque from the motor is for a two phase stepper motor:

)2

2sin()2

sin()sin(ππ

θψθψ ⋅⋅⋅−−⋅⋅⋅⋅−⋅⋅⋅⋅−= pTpippipT dmmbmae (17)

Here the numbers of poles are 12=p for the motor in the sewing machine. θ is the angle

of the rotor, eT is the torque that the motor will develop. dmT is the maximum holding

torque (given from the data sheet).

Page 28: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

28

mψ is the maximum flux linkage. This is not given by the data sheet but it can be

estimated as:

N

E

p

m

m ⋅⋅

ψ30

(18)

Here mE is the maximum open voltage winding. This value is estimated.

Parameters for the hybrid stepper motor values are:

Figure 17 Dialog box for the stepper motor

• The motor type is a permanent-magnet motor. The number of phases is 2.

• Winding inductance is the inductance in (H)

• Winding resistance (Ω) for the motor from is given in the data sheet.

• The step angle is 7.5 degrees and is given from the data sheet.

• Maximum flux linkage is given in (Vs)

• Maximum torque detection is given from the data sheet

• The inertia is small for this motor and is calculated with pro/e

• The friction constant is estimated.

• The initial speed and position are set to zero because this will simulate a sequence of steps. It begins with zero velocity and position zero.

Page 29: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

29

Outputs from the model are: Phase voltage [V], Phase current [A], Torque [Nm], rotor speed [rad/s] and rotor position [rad] and[deg].

3.4.1 Simulation of a thread cut with the cutter motor in the Simulink model

The cutter motor is used for cutting the thread. The deviation of a thread cutting sequence is approximated 0.7 seconds. The signal builder describes the signal that is transmitted to the stepper motor drive circuit. This will include direction of the signal and the maximum speed level.

Figure 18 Here is the sequence of the stepper motor signal for the cutter motor.

Figure 18 shows the commanded signal that is transmitted to the stepper motor drive circuit including the direction and speed (percent of the maximum speed). It is assumed that the stepper motor runs at a constant speed of 1000 step/second. The cutter motor signal simulation can be described as follows: Start to run the stepper motor forward 0,35 sec, to achieve the linear movement to move forward direction. Go back to the original position, which also takes 0.35 sec. In reality the stepper motor is running at different velocities to reduce the oscillations that occur, see fig 20.

Page 30: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

30

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8−500

0

500

1000

1500

2000

2500

3000

positio

n [deg]

time [s]

position for cutter motor

Figure 19 Positions during a cutting sequence with the stepper motor.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8−400

−300

−200

−100

0

100

200

300

400vel for cutter motor

time [s]

ve

l [r

ad

/s]

Figure 20 Velocity during a cutting sequence with the stepper motor.

The oscillations in figure 20 originate from the point where the stepper motor changes direction. In order to avoid this, the stepper motor velocity can be ramped down. In reality this is the case as the motor stops before returning to the original position.

Page 31: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

31

3.5 Mathematical model of a stepper motor

Mechanical engineers from Italy have developed a model for the motion of a stepper motor [6], [7]. A summary of these equations will be presented in this part.

mmm ωωα &,,

mα , mω and mω& those are, the position, velocity and acceleration of the shaft.

The acceleration of the shaft will be described by the following equation:

( )lm

m TTJdt

d−=

1ω (19)

m

m

dt

α= (20)

The developed torque from the motor will be described by the following equation:

( ) ( )0sin2

m t m m o

p

T K i cπ

α α α αα

= ⋅ ⋅ − − − ⋅

& & (21)

Where the variables are:

pα = step angle

0α =commanded position

mα =rotor position

mT =developed torque

lT =external load

J =rotor inertia

tK =motor constant torque

i =phase current

c =damping constant (18) in (20) gives

( ) ( )

−−−

⋅⋅⋅= lomm

p

tm TciK

Jdt

dαααα

α

πω&&

02

sin1

(22)

Kirchhoff’s law gives:

mphphs KiRdt

diLV ωω ⋅+⋅+⋅= (23)

J

Page 32: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

32

Where:

sV is the supply voltage

phR is the phase resistance

phL is the phase inductance

ωK is the back emf constant

Because the electrical time constant dt

dI is much smaller than the mechanical constant,

this term will be ignored This gives the following equation:

( )mphs

ph

KiRVL

ωω ⋅−⋅−=1

0 (24)

This gives that the current is:

( )

ph

ms

R

KVi

ωω ⋅−= (25)

Inset in equation (24) in (21) gives:

( ) ( ) ( )

−−−

⋅⋅

⋅−⋅= lomm

pph

mst

m TcR

KVK

Jdt

dαααα

α

πωω ω &&0

2sin

1(26)

The Simulink model will be described as follows:

Figure 21 The model for the stepper motor in Simulink

This simulation is probably not correct because the torque constant is not known for this stepper motor.

Page 33: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

33

0.02 0.04 0.06 0.08 0.10

5

10

15

20

25

30

time [s]

roto

r p

ositio

n [

de

g]

simulated position phs

commanded position

simulated position matlab

Figure 22 Simulations with stepper motor models at command signal at 50Hhz.

Figure 22 shows a graph of simulated data with this stepper motor model figure 21 compared with Matlab toolbox model. In this simulation the commanded signal is a square wave at 50 Hz.

3.5.1 Stepper motor summary

Matlab toolbox model (SimPowerSystem) is based on theories explained in [5]. By simulating simple cases, it has been confirmed that the model represents the expected result. The verification has been performed by simulating 32 steps/second and the final result has than been verified in graphs. This model is considered correct for stepper motor simulations with constant current as drive circuit control. The stepper motor model based on physical equations is probably more uncertain. It seems that the AC current is transformed to DC current. This model is more considered to an experimental simulation to find out how much the position-oscillation varies for a stepper motor during operation. The stepper motor model based on the physical relation does not include the switching from the drive circuit this will result in that this model have less dynamic then the Matlab toolbox based model.

Page 34: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

34

4 Parameter identification Parameter identification can be performed in different ways, with the aim to compare the sensor data with the model data. The parameters were tuned to get the model to correspond with the realty data as close as possible. The parameter identification can be done either “online” or “offline”. “Online” parameter identification: The model and the system are running parallel in real time. This method is usable to find the system control parameters or to achieve a model with few variables. “Offline” parameter identification: The captured data is compared with the model data. The comparison can either be done manually, altering parameters to optimize the adoption (adjustment) or using a more automatic process. “Parameter estimation tool box” is a statistical tool for Simulink, applicable for a system with many parameters or a system where it’s difficult to find acceptable parameter start values. “Parameter estimation toolbox” run-through:

1. Identification of parameters in a Simulink model where some data series for the in and out exist. The in and out data will be connected to the model [12].

2. Choose the parameters which should be identified, e.g. kinetic, viscous friction and inertia. Tune the minimum and maximum parameters e.g. in this case the inertia and the friction to < 0.

3. Parameter estimation starts. The model has to be run several times with the different previously chosen parameters. The computer estimates the parameters setting, that complies with the recorded data. Below is found an example of the result.

−1

−0.5

0

0.5

1

1.5

Fs

2.792

2.794

2.796

2.798x 10

−5

J

0 1 2 3 4 5 6 7 8 9 104.29

4.295

4.3x 10

−5

d

Trajectories of Estimated Parameters

Iterations

Pa

ram

ete

r V

alu

es

Figure 23 A parameter estimation from the sapphire 870 model

Page 35: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

35

−1000

0

1000

2000New Data

positio

n_m

oto

r_ra

d

−50

0

50

100

vel_

moto

r_ra

d/s

0 2 4 6 8 10 12 14 16 18−500

0

500

acc_m

oto

r_ra

d/s

^2

Measured vs. Simulated Responses

Time (sec)

Am

plit

ude

Figure 24 A comparison between real position data and velocity data against the model. The blue

curve is the model and the gray curve is the real data values.

Figures 23 and 24 show parameter values and the iterations of the running model during the estimation. Figure 24 shows a comparison between the recorded data and the model output. Final result from parameter estimation:

Kinetic friction Fs=0.18 Nm

Inertia (complete machine) 251078.2 kgmJ −⋅=

Viscous friction sradNmd //10297.2 5−⋅= The torque ripple parameters had to be manually identified, however the parameter estimation tool box gives hint where to start. The Simulink model was run online in real time in the dSpace/controldesk environment. The torque ripple is as earlier established velocity and position dependent.

According to: ( ) )sin()( ϕϕϕ ⋅⋅= BAM ripple&

Where: A=Velocity dependent amplitude. B= Frequency dependent constant. Evaluation of the result confirmed the difficulty to find the correct frequency, however the result with the given parameters were as follows: A=0.00307 B=0.099

Page 36: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

36

0 5 10 15 200

10

20

30

40

50

60

70

80

90

100

time

vel [r

ad/s

]

compersion between real and model

model

real sewing machine

Figure 25 A comparisons between the model and the real sewing machine and more dilated look of

the variance inertia.

The actual oscillation is not a perfect sinus curve, there will in some cases be a phase displacement between the model and the reality. This is a disadvantage with this model. However this model takes into consideration the multiple oscillations which is not the case with a mean value model.

Figure 26 The Control desk environment. This is used for collecting data and compare models in real

time.

Figure 26 shows the controldesk environment with adjustable parameters, where different in and out signals can be controlled. This environment was also used for recording data series for offline parameter estimation.

Page 37: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

37

4.1 Hardware setup and construction

Since the development environment is closely linked to Matlab and Simulink, a dSpace board DS1104 has been used to measure motions and signals from the sewing machine. The models have been developed using that software and is therefore a good development environment for identification of parameters related to the hardware. An encoder of type “Heidenhain ERN 420” with a resolution of 5000 lines/second was connected to this measuring board in order to measure the arm shaft motion. An adapter for the conversion was made to fit the encoder. The encoder was mounted on the sewing machine using an acrylic-board construction. A circular acrylic-board was fixed on the front cover where the manual sleeve was mounted. The sewing machine was fixed on a wooden board to enable mounting of other devices. The rear cover has been removed in order to expose the main motor, for measuring and connections to the dSpace environment. To make it possible to study the mechanical oscillations, the internal motor control was replaced by an external motor control.

Figure 27 The encoder, adapter and the electric DC motor.

4.1.1 Motor control

The DC motor can be controlled either by current or voltage. Current control was introduced to find out the friction level required to start and stop the sewing machine. This will give you the kinetic and the static friction force. A drive circuit of the type Elmo SSA 12/55 (ref appendix E schematic diagram) [17] which

Page 38: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

38

applies a continuous current of up to 5A to the motor, was used for measuring start and stop activities. An analog voltage from the dSpace board was activated. This voltage level was converted to a continuous current by the drive circuit. The conversion factor is 0,5V/A. E.g. an analog voltage of 2 V to the drive circuit will give a current of 1 A out from the drive circuit. Voltage control was introduced to find the viscous friction and the inertia (with the help of voltage step response). Voltage control was also used for checking the velocity amplitude at different voltage levels. To get variable voltage a smart low side power switch of the type bts 133 (ref appendix E schematic diagram) was introduced. A 24 V DC voltage and a PWM signal (controlled from dSpace) was connected to the power switch, with the objective to achieve a duty

cycle of 100% equal to V24124 =⋅ and a duty cycle of 20 % equal to V8.42.024 =⋅ etc. Unfortunately this conversion did not become completely linear (shown in table 2). To improve the signal a diode and a capacitor were connected. After the machine has been run a longer time, the machine tends to run faster as the sintered lubricated bearings get warmer (Velocity increase se table 2). For that reason models have been developed to describe a cold and a warm machine. Table 2 The error in voltage and the difference in rpm depending on if the sewing machine is warm

or cold.

duty [%] Motor

voltage [V] theoretical voltage [V]

error voltage [%]

rpm average cold [rpm]

30 seconds warm [rpm]

Two minute warm [rpm]

20 4,48 4,8 -6,67 155 186 200

30 7 7,2 -2,78 298 320 345

50 12,49 12 4,08 566 585 612

70 17,3 16,8 2,98 813 830 860

80 19,6 19,2 2,08 930 955 966

100 24 24 0,00 1080 1111 1111

Summary of voltage control and current control: Voltage control was used for monitoring the dynamic process in order to study and identify the viscous friction d for the machine. The viscous friction was identified by voltage step response. The total inertia was also identified by monitoring big step responses in voltage with the help of this voltage control. Current control was introduced to identify the static and kinetic friction. The DC motor was applied by current equal to the torque required to start and stop the motion. With the help of the torque constant for the motor could the static and kinetic friction then be measured.

Page 39: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

39

4.2 Software environment

The software programs that have been used in this project are described in chapter 2. This chapter will describe how the programs are interacting.

4.2.1 The conversion process CAD to Simulink

The mechanics in sewing machine sapphire 870 are (digitally) designed in the PRO/E. A plug-in to this program has been written by Matworks (called proe2sm) [13].This program can translate the mechanical parts and their connections (joints) to Simulink toolbox Simmechanics. By converting the existing CAD model it will create a Simulink system of 14 subsystems with different parts. This system becomes slow to simulate (to simulate one second takes 10s in the best case) and the simulation is time-consuming with fixed step solver. To simplify the model several of the non moving parts were removed and a new conversion was performed. The simulation was still time-consuming because some blocks were redundant. A few connections were replaced with a “weld joint” since the conversion program proe2sm does not support this type of conversion from PRO/E to Simmechanics. This might be a contribution to the slow simulation. To make the Simmechanics model less complex and make the simulation faster, it was decided to only convert the arm shaft with the moving parts. A graphical view of this conversion can be seen in figure 28:

Figure 28 The conversion from CAD program (the left) to Simulink environment (to the right).

To this model the DC motor was added as well as the kinetic and viscous friction constants as earlier established. These model variables will make it possible to simulate a stitch including the linear movement of the needle.

Page 40: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

40

0 5 10 15 200

20

40

60

80

100

120

time [s]

ve

l [r

ad

/s]

model

real machine

Figure 29 compression between Simmechanics model and real model.

The Simmechanics model (se figure 29) has to many oscillations. This may originate from that some connections are not correctly translated. Probably some parameters are not correct e.g. masses. In the CAD model the weight of the sewing machine is 34 kg and in reality 13.63 kg. But this will explain this significant deviation. The oscillations in the model may originate from some singularities during the simulation in the upper and lower position of the needle.

Page 41: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

41

5 Conclusions In this chapter the results and discussion will be presented.

5.1 Results

The modeling of mechanical parts was done using two different methods. One with the sewing machine modeled as a DC motor with belt transmission and friction models and another with the machine modeled by conversion from PRO/E arm shaft. These two models were developed in order to make it possible to identify parameters by using the dSpace software and Matlab parameter estimation toolbox The results of the parameter estimation are shown in the figure 30 below.

−1000

0

1000

2000New Data

po

sitio

n_

mo

tor_

rad

−50

0

50

100

ve

l_m

oto

r_ra

d/s

0 2 4 6 8 10 12 14 16 18−500

0

500

acc_

mo

tor_

rad

/s^2

Measured vs. Simulated Responses

Time (sec)

Am

plit

ud

e

Figure 30 Parameter estimation with variable friction.

Figure 30 shows the comparison between the model and the real measured values. This model is built by standard Simulink blocks and no extra toolboxes are needed to run the model. The model is also quite fast to simulate and therefore the parameter estimation toolbox can be used. The disadvantage with this model is that it is only possible to monitor the arm shaft motion and not the linear movement from the needle.

Page 42: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

42

5.1.1 Simmechanics model

This model includes the moving parts in the sewing machine, which makes the model complex. The advantage is that it is possible to monitor the moving parts graphically. It is also possible to put a sensor on one moving part and by that follow the position, velocity, acceleration or force. The model becomes slow to simulate due to the number of moving parts and incorrect parameters, with the result that the model oscillates to fast with to high amplitude.

0 5 10 15 200

20

40

60

80

100

120

time [s]ve

l [r

ad

/s]

model

real machine

Figure 31 Comparison between real data and the Simmechanics model

5.1.2 Stepper motor model

For the stepper motor two models have been developed. The model that is based on Matlab SimPowerSystem includes more parameters. If the step rate is to high this model will loose steps. The other model is built on standard Simulink blocks but this model has not been tested against real data. Depending on the equation solver or problems with the constants the same in-parameters does not give the same result for the two models.

5.2 Analysis

The analyses of the sewing machine be will presented, including the friction measurements.

5.2.1 Analysis of the static friction

During one cycle, the friction in the sewing machine is fluctuating, depending on in which position the crank movement is. In this chapter it will be presented where maximum and minimum friction occurs during one cycle.

Page 43: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

43

Figure 32 The position of the sewing machine that have the most friction when there is no fabric in

the sewing machine.

The maximum friction occurs when the sewing machine is in the position as showed in figure 32. The needle is starting the upper movement and the motor and the crank moment must compensate the gravity. The duty cycle needed to start the sewing machine in this position is 14 %.

Figure 33 The part that have the lowest friction under one revolution.

The minimum friction occurs when the needle is going downwards (figure 33) The crank movement is facilitated by the gravity. The duty cycle needed to start the sewing machine in this position is 12 %. These are the minimum and maximum friction positions related to the mechanics in the sewing machine.

Page 44: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

44

When sewing in heavy fabric, the time instant when the needle is penetrating the fabric is where the maximum friction appears as shown in the figure below (figure 34).

Figure 34 The time instant when the needle penetrates the fabric is the part of the revolution that has

the most friction.

Page 45: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

45

5.2.2 Analysis of the static friction with current as an in-parameter

The static friction and kinetic friction are also measured with a current drive circuit that has an built-in current control (Elmo Motion Control SSA -12/55). This is used to find out at which current or torque the sewing machine starts to move. Since the sewing machine Sapphire 870 has different static friction in different positions of one revolution, a test of static friction have been performed in different positions. The part that has less static friction is when the needle is on the upper position on the way down to the fabric (figure 33). Here the required torque from the motor is 0.0298 Nm. On the arm shaft the torque is approximately 8 times higher than the motor torque, this means 0.2384 Nm. The part that requires the largest kinetic friction force is when the needle has passed the “lower position”. The required torque to start the motion on the arm shaft torque is 0.2771 Nm. An analysis of this is shown in figure 35. The torque required to initiate the motion is 16% higher at the part with the highest friction compared to the part with the lowest friction.

0 5 10 15 200

0.1

0.2

0.3

0.4Analysis of Static friction

time [s]

To

rqu

e [

Nm

]

0 5 10 15 20−200

0

200

400

time [s]

Ve

locity [

rpm

]

Figure 35 Matlab graph for analysis of the static friction. This shows that the required torque to start

the sewing machine is 0,27 Nm or 1,9 A to the motor.

Page 46: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

46

5.2.3 Analysis of the kinetic friction

The kinetic friction is the part of the friction modeling that is independent of the magnitude of the velocity. This is the friction level that is required to keep the motion “alive”. This friction part is smaller than the static friction required to initiate motion. The reason for the higher friction is surface roughness. The necessary current to run the machine is 1.325 A. The necessary torque on the arm shaft will then be 0.18 Nm.

NmnKIF tarmshaftkinetc 18.08017.0325.1_ =⋅⋅=⋅⋅=

See figure 36 for measurement of the kinetic friction. When modeling the sewing machine it is the kinetic friction that will be used. The difference in the level of static and kinetic friction is 33 %.The reason for using the kinetic friction is that the model is made for sewing machine in operation.

0 5 10 15 20

0.16

0.18

0.2

0.22

0.24

Analysis of kinetic friction

time [s]

To

rqu

e [

Nm

]

0 5 10 15 20−100

0

100

200

300

time [s]

Ve

locity [

rpm

]

Figure 36 Analysis of the kinetic friction, the lowest torque that keeps the sewing machine running

under is 0.18 Nm.

5.2.4 Analysis of the viscous friction

The viscous friction is velocity dependent. This constant is measured by the dSpace

system. This value is measured to 5102.2 −⋅=d Nm/rad/s for a cold machine. The measurements have been done with different voltages to the main motor both at low voltages (4 V) and high voltages (19 V). For a warm machine the friction-constant is for

this machine 5100.1 −⋅=d Nm/rad/s. This lower value is because the sintered lubricated bearings get warmer and result the friction decreases.

Page 47: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

47

5.3 Discussion

In this part results applications and future improvements will be presented and analyzed.

5.3.1 Field of application summary and suggested improvements

The Sapphire 870 model based on the DC motor movements may be used for studying the arm shaft movement at different motor voltages. The model in-parameter is voltage U, operating range 0-20 V. The friction

parameter NmFs 18.0= is the kinetic friction. For a cold machine the viscous friction is

measured to sradNmd //102.2 5−⋅= and for a warm machine the friction is measured to

sradNmd //100.1 5−⋅= the lower value is due to improved lubrication. The torque variation during one cycle depends on the friction and inertia variations at different positions on the arm shaft. The friction and inertia variance have been related as a sinus function. This sinus function is dependent of the arm shaft position and velocity. The position feed back simulates the phenomenon that the ripple frequency increases at increased velocity. The velocity feed back simulates the phenomenon that the ripple amplitude decreases at increased velocity. The constants for the position and velocity

dependent ripple are sradNmA //00307.0= and radNmB /0998.0= at these constants the sinus wave is most close to the real arm shaft movement. The Simmechanics model is possible to develop in order to get a more accurate model as some parameters are not quite correct. It is probably better to start from the main moving parts and assemble these to get a simple CAD model. A conversion to the Simulink and Simmechanics environment will significantly decrease the complexity and by that speed up the simulation. The Simmechanics model developed in the master thesis [16] is probably more accurate with less oscillation. At VSM group the CAD software has been used to identify interference problems during simulations of a machine in operation (coalition detect). Vibrations causing noise has also been studied using the CAD software. When analysing velocity variations during one cycle (while the internal motor control disconnected) it was confirmed that the velocity-variation is higher at lower velocity. In order to minimize the velocity-variations a control loop is used in the machine .To minimize the velocity-variations emanating from the mechanical part, a bigger flywheel may be introduced mounted on the arm shaft (in the manual sleeve area). It is however necessary to investigate the impact of the inertia force before introducing such a design change. The stepper motor model based on the SimPowerSystem toolbox has been verified with given values (from the data sheet) and simple step sequences. At these sequences the expected model results were achieved. The damping constant has not been verified against the stepper motors. The stepper motor model based on the physical equations is probably usable for studying the position oscillation if the damping constant gets verified against measured data

Page 48: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

48

5.3.2 Measurements and future models discussion

The model for the sewing machine that is based on the DC motor becomes the model that was most similar to the original (sewing machine Sapphire 870). This model is however not as flexible as the Simmechanics model. These models were made to simulate the motion without needle and fabric. During one cycle the mean value deviation is 20 rpm at low rotation speed and 10 rpm at high rotation speed, depending on the variation of friction during one cycle. Measurements have shown a 16% difference between the highest and the lowest friction. As the inertia does not help to fulfil the motion there is a velocity variation. At lower DC motor voltage there is a higher variation due to the inertia. The Simmechanics model is very parameter sensitive and is therefore not accurate. Under the condition that you will be able to identify correct parameters, this model is superior for analysis of which area of the sewing machine that has the highest impact on the velocity. This model will make it possible to monitor physical parts, record the position velocity, acceleration and forces. A disadvantage with the Simmechanics model is that it is slow to simulate, depending on the complexity (several parts) and that there are areas where the positions of the model are not completely defined (singularities) for instance the needles upper and lower positions (turning points). Some connections in the CAD model could not be correctly presented by the converter. In order to simplify the conversion and to reduce the parameter sensitivity, it would be better to start from the main mechanical parts required to perform one stitch. I.e. the arm shaft, the sewing head including the linear needle motion and the belt connection between the arm and the lower shaft. The lower shaft is connected to the hook by a worm gear unit. (If necessary the feeding system can be added but it might be to complex.) These parts may then be assembled in the CAD software. I think it would be easier to convert this simple CAD model, instead of removing parts form the original CAD model. In order to present the moving parts correctly, a complex CAD model (many parts) will result in a complex Simulink model heavy to simulate. Field of application for the different models: The model based on the DC motor may be used for studying the arm shaft velocity at different voltages to the main motor (Domel), applicable for an interval of 0-20 V, equal to operating condition. The model will also show the main velocity variation originating from the moving parts. The belts were chosen to be modeled as stiff, as the elastic impact is an uncertain parameter. The models are only created for sewing forward due to that there are different frictions constants when sewing backwards. The Simmechanics model may be used to study how the moving parts interact with each other. This is shown in a graphical view but can also be examined by export to Matlab. Effects from the fabric: It has been observed that the fabric has a great impact on the velocity during one cycle. When sewing in 12 layers of fabric the velocity will decrease at the moment when the needle penetrates the fabric (se figure 37).

Page 49: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

49

13.2 13.3 13.4 13.5 13.6 13.7 13.8 13.9

16

17

18

19

20

21

time [s]

vel [r

ad/s

]

sewing in 12 layers fabric

Figure 37 This figure shows the velocity difference when sewing in 12 layers of fabric.

How much the velocity drops depends on the number of layers of fabric. Comparison of different operating conditions: The machine has different types of oscillations, the feeding system adds a bit more friction and the force required to penetrate the fabric is high depending of the number of layers.

9.4 9.6 9.8 10 10.2 10.4 10.6 10.8 11 11.2

140

150

160

170

180

190

200

210

220

230

time [s]

ve

l [r

pm

]

Figure 38 shows the difference in velocity with different parts sewing at 30 % duty cycle to the main

motor.

In figure 38 the blue curve represents the variance in velocity originates the mechanical parts in the sewing machine, when sewing without fabric and needle. The red curve represents the feeding system with 2 layers of fabric. The green curve represents the velocity when feeding 12 layers of fabric. The black curve represents sewing in 12 layers of fabric with needle. When the needle penetrates the fabric the velocity drops. In order to simulate the effects of the sewing Figure 38 shows that more models parameters are required.

Page 50: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

50

Stepper motor models: Literature studies showed that modeling of stepper motors is an area where there are no common ways to describe the process. Two models have been studied: One example which was studied was Matlabs toolbox Simpowersystem 4.5 (2007b) [9], and another was based on equations from physical relations [6], [7]. These models have not been verified against measured data but have been based on data from the data sheet. The parameters in these models are therefore uncertain. The Matlab model is considered as correct. This model uses constant current (chopper control) for controlling the drive circuit. Stepper motors may be controlled using different methods but constant current is the most common. The Matlab model is based on theories described in the [5]. The model which is based on physical equations is experimentally developed and can be run by standard Simulink blocks. In this model the AC current seems to be transformed to a DC current. This model is more like an experimental model to find out the position -oscillation for a stepper motor in operation.

Page 51: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

51

5.4 Future work

To get a more detailed model of the sewing machine including the fabric and needle it might be possible to use a neural network to create a model [10]. Another possibility is to develop a model with parameters that include the sewing. This includes pressure from the presser foot, number of layers of fabric and the impact from the needle. Concerning the stepper motor models the next step should be to compare the model with measured data from a real stepper motor and to evaluate the usability.

Page 52: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

52

6 References [1] Tan Kok Kiong, Lee Tong Heng, Dou Huifang and Huang Sunan (2001) “Precision

Motion Control Design and Implementation” Springer.Verlag London Limited [2] B.A.Frencis M.C Smith J.C Willems(Eds.) (2006) “Control of Uncertain Systems: Modeling, Approximation, and Design A workshop on Occasion of Keith Glover’s 60th Birthday” [4] Brian Armstrong-Hélouvry (1991) “Control of Machines with Friction” Kluwer

Academic Publishers [5] Takashi Kenjo and Akira Sugawara (1995) “Stepping motors and their microprocessor controls second edition” Oxford University Press

[6] P.Righettini, R. Strada, V. Lorenzi and B.Zappa. (2006) Department of Design and Technologies, University of Bergamo – Italy. “Analysis of mechanical characteristics of stepper motor drives: design of an experimental test bench.” Department of Design and Technologies”, University of

Bergamo – Italy.

[7] P.Righettini, R. Strada, V. Lorenzi and B.Zappa. “Modeling and dynamic simulation of mechanical system driven by stepper motors” 11th international Conference on Power Electronics and Motion Control EPE-PEMC, Riga, Latvia, 2004.

” Department of Design and Technologies”, University of Bergamo – Italy.

[8] The help documentation from Matlab (2007b)/Simulink and PRO/E (3.0) [9] Matlab information about stepper motors (20/12-07) available at: http://www.mathworks.com/access/helpdesk/help/toolbox/physmod/powersys/index.html?/access/helpdesk/help/toolbox/physmod/powersys/ref/steppermotor.html&http://www.google.co.uk/search?q=stepper+motor+model&hl=en&start=10&sa=N [10]Information about neural network for make a model of a sewing machine (20/12-07) http://ieeexplore.ieee.org/iel5/9011/28611/01280289.pdf [11]Lectures about modeling (10/01-08) http://www.md.kth.se/mmk/gru/mda/mf2007/Lectures/L2.pdf

Page 53: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

53

[12]Matlab information about parameter estimation (12/02-08) http://www.mathworks.com/access/helpdesk/help/toolbox/slestim/index.html?/access/helpdesk/help/toolbox/slestim/f7-9760.html&http://www.mathworks.com/cgi-bin/texis/webinator/search?query=parameter+estimation&db=MSS&pr=Whole_site&cssm=Cssm&entire_flag=1&prox=page&rorder=750&rprox=750&rdfreq=500&rwfreq=500&rlead=250&sufs=0&order=r&cq=&is_summary_on=1&ResultCount=10&jump= [13] The program proe2sm: (12/02-08) http://www.mathworks.com/products/simmechanics/download_proe2sm.html [14] Domel main motor data sheet (10/03/08) http://gallery.domel.si/products/files/56.pdf [15] Stepper motor for cutter motor (03/01/08) http://www.eminebea.com/content/html/en/motor_list/pm_motor/pdf/pm25s048.pdf [16] Arvid Benvik, Tor Anderson (2008) “Integrated development tool” master thesis. [17] SSA Operating manual Rev 6/98 http://www.elmomc.com/support/manuals/MAN_SSA_UG_EN_0698.pdf

Page 54: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

54

Appendix

A Parameters for Matlab code

A1 Model parameters for Matlab code

Init file for the simulink model that is based on the DC Motor equations and Simmechins model. These parameters is implemented in the Matlab init files for the simulink models. Table 3 Constants for the Matlab inti files for the models

Constant Symbol Value Unit Identification comment Motor voltage U 0-20 V Measured the range for the in-parameter Motor recisrance R 1.1 ohm Measured Measured in different conditions

Back-emf Kemf 0.0021 V/rad/s Calculated This is calculated from data sheet Torque constant Kt 0.017 Nm/A Calculated This is calculated from data sheet

Total inertia J 2.7*10-5

Kgm2 Measured

Measured with voltage step response

ratio n 8 none Measured ration between motor and arm shaft

Viscous friction (warm) (cold) d

1.0*10-5

2.2*10-5

Nm/rad/s Measured

Total damping constant for the machine measured with voltages step response for a warm machine and cold machine.

Kinetic friction Fs 0.18 Nm Measured

The kinetic friction for the machine from the arm shaft

Torque ripple position constant sinus_frecScale 0.099817 Nm/rad Measured

Constants for scale the torque ripple in frequency

Torque ripple velocity constant sinus_scale 0.00307756 Nm/rad/s Measured

Constants for scale the torque ripple in amplitude

Page 55: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

55

B Simulink models

Here the simulink models main systems will be presented: This is the model that is based on the DC motor with torque ripple (One subsystem).

Torque ripple model: The sewing machine is modeled as an electric motor with torque ripple.

Page 56: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

56

This is the model that is based on the PRO/E to Simmechanics conversion model this model includes friction constants from measurements (One subsystem).

Simmechanics model one subsystem. In this subsystem the signal from the electric motor is added. This is one of the six subsystems in the simulink model.

Page 57: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

57

C dSpace I/O table

Table for I/O to dSpace. This describes how the sensors and actors are connected to the measurement board. Table 4 this shows the connection of the encoder and the drives to dSpace hardware card.

D-sub I/O Function P1A P1B Signal info Color

11 IN Ua1 41 Motor signal A Brown

10 IN /Ua1 8 Motor signal A Green

9 IN Ua2 24 Motor signal B Gray

8 IN /Ua2 40 Motor signal B Pink

7 IN Ua0 7 Noll puls Brown/Green

6 IN /Ua0 23 Noll puls inv White/Green

13 OUT Motor signal 33

Current 4 motor Brown/Yellow

16 OUT Vsup 4 Encoder supply Red

17 OUT GND 1 DSpace ground Black

OUT PWM 21 Motor PWM

E Schematic connections

The schematic setup for the BTS 133 power switch is:

Figure 39 Schematic connection of the BTS 133 used for control the voltage signal from dSpace.

This is used to generate a variable voltage from dSpace to the main motor.

Page 58: modeling of mechanical motions in a sewing machine report ...543070/FULLTEXT01.pdfModeling of mechanical motions in a sewing machine Johan Tegsten Approved 2008-04-15 Examiner Jan

58

The schematic of the connection to the SSA drive with current as in parameter:

Figure 40 Schematic connection of the SSA drive used for controlling the current signal from dSpace.

This is used to create a continues current from the motor and used for analyzing the static and kinetic frictions.