Estimation of Dog Teeth Positions for Contact Minimization ...1471973/FULLTEXT01.pdf · Master of...
Transcript of Estimation of Dog Teeth Positions for Contact Minimization ...1471973/FULLTEXT01.pdf · Master of...
Calibration and Estimation of Dog Teeth Positions in Synchronizers for Minimizing
Noise and Wear during Gear Shifting
Qianyin Kong
Master of Science Thesis TRITA-ITM-EX 2020:485
KTH Industrial Engineering and Management
Machine Design
SE-100 44 STOCKHOLM
I
Examensarbete TRITA-ITM-EX 2020:485
Kalibrering och uppskattning av positioner för dog-teeth i synkroniserare för minimering av buller och
slitage under växling
Qianyin Kong
Approved
2020-09-02
Examiner
Ulf Sellgren
Supervisor
Ulf Sellgren
Commissioner
China Euro Vehicle Technology AB
Contact person
Muddassar Zahid Piracha
SAMMANFATTNING
Elektriska motorer används i allt större utsträckning inom fordonsindustrin för att minska utsläppen
från fordon. Den minskade användningen av förbränningsmotorer, som tidigare varit den främsta
bullerkällan, gör att kollisioner från synkroniserare inte kan bli ignorerade under växlingen. Dessa
kollisioner orsakar inte bara buller och nötningar utan även fördröjer slutförandet av växlingen.
För att minimera kollisioner under växlingen krävs det en positionssensor för dog-teeth, men den höga
beräkningsfrekvensen leder till hög kostnad på grund av den höga hastigheten hos
synkroniseringsdelarna samt antalet dog-teeth.
I den här avhandlingen görs en modell av växellåda för att studera växlingsprocessen och
kugghjulsingreppet. Transmissionsmodellen uttrycks med elektriska och dynamiska formuleringar.
För att undvika kollisioner utan positionssensor för dog-teeth, föreslås det en uppskattningsalgoritm
baserad på transmissionsmodellen för att godta kugghjulsingreppet om den första and andra delen av
synkroniseraren är inkopplade i parningsläget utan kollisioner.
Två olika inlärningsalgoritmer, direkt jämförelsemetoden och partikelsvärmoptimeringsmetoden
presenteras även i avhandlingen. De används för att kalibrera en parameter i off-time test som en del
av slutet av produktionslinjen. Denna parameter kallas för den relevanta initialfasen och används vid
realtidsuppskattningen.
Transmissionsmodellen är simulerad i Simulink och de olika algoritmerna exekveras i Matlab. Alla
resultat är plottade och analyserade för vidare utvärdering av olika aspekter i resultatkapitlet. Den
direkta jämförelsealgoritmen har en enklare beräkningsstruktur, men mängden av nödvändig
exekveringar är oklar för denna algoritm med en sannolikhet att det inte går att hitta lösningen.
Däremot visar det sig att partikelsvärmoptimeringsmetoden lyckas med att kalibrera målparametern
med dessutom ge mindre fel än den andra algoritmen. Antalet exekveringar påverkar lösningen samt
noggrannheten hos lösningarna men påverkar inte själva felfrekvensen.
Nyckelord: Synkroniserare, Växling, Dog-teeth, Partikelsvärmoptimering
II
III
Master of Science Thesis TRITA-ITM-EX 2020:485
Calibration and Estimation of Dog Teeth Positions in Synchronizers for Minimizing Noise and Wear during Gear
Shifting
Qianyin Kong
Approved
2020-09-02
Examiner
Ulf Sellgren
Supervisor
Ulf Sellgren
Commissioner
China Euro Vehicle Technology AB
Contact person
Muddassar Zahid Piracha
ABSTRACT
Electric motors are used more widely in automotive to reducing emissions in vehicles. Due to the
decreased usage of internal combustion engines which used to be the main noise source, impacts from
synchronizers cannot be ignored during gear shifting, not only causing noise and wear but also delaying
gear shifting completion.
To minimize the impacts during gear shifting, a dog teeth position sensor is required but the high
calculation frequency leads to a high cost, due to the high velocity of synchronizer portions and the
dog teeth number.
In this thesis, the gear shifting transmission is being modelled, in order to study the process of gear
shifting and engagement. The transmission model, which is expressed with electrics and dynamics
formulations. In order to avoid the impact without the dog teeth position sensor, this thesis proposes
an estimation algorithm based on the transmission model to approve the gear engagement if the first
and second portions of synchronizers are engaged in the mating position without impacts.
Two different learning algorithms: direct comparison and particle swarm optimization application, are
presented in the thesis as well, which are used to calibrate a parameter in the off-time test as part of
the end of the calibration line, the so-called relevant initial phase being used in the real-time estimation.
The transmission model is simulated in Simulink and different algorithms are running in MATLAB.
All these results are plotted and analyzed for further evaluation in different aspects in the result chapter.
The direct comparison algorithm has a simpler structure of computation but the quantity of required
actuation is uncertain in this algorithm with a probability of failure to find the solution. The application
of particle swarm optimization in this case succeeds in calibrating the objective parameter with a small
error than the other algorithm. Actuation quantity affects the accuracy of the solutions and errors but
not the failure rate.
Keywords: synchronizer engagement, gear shifting, dog teeth, particle swarm optimization
IV
V
FOREWORD
This is the report of my thesis project, almost symbolizing the end of this project.
I am deeply grateful to my supervisor Muddassar Zahid Piracha and my director Arvid Mörtzell at
CEVT, for the unique chance to join in such an interesting project. Muddassar ’s patience and support
made significant sense for me to accomplish this thesis project. I am also appreciative of meeting the
colleagues at CEVT who are so nice and friendly to help me with some daily work.
I would like to express my gratitude to my supervisor Ulf Sellgren at KTH, who provided me with
useful guidance and valuable advice throughout this project. I also want to thank all my teachers and
my classmates who have been kind during my master’s years. Throughout the student life, classmates
and friends gave me support and love to help me overcome the challenges.
Last but not least, I have been and will be always grateful to my parents. I am so lucky to be grown up
in such a warm family. Without their support and love, I could not manage to study abroad and have
such a wonderful experience in Sweden.
I wish to always keep curiosity alive. This is just the end of a project, instead of the end of learning.
Qianyin Kong
Sweden, August 2020
VI
VII
NOMENCLATURE
Notations
Symbol Description
𝑇𝐿 Engagement torque (Nm)
𝑇𝑠𝑦𝑛 Torque applied to the idler gear (Nm)
𝑇𝑒 Torque from the permanent-magnet synchronous motor (Nm)
𝑇𝑡𝑖𝑟𝑒 Torque applied to the tires (Nm)
∆𝜑 Relative initial phase between the sleeve and the idler gear (rad)
𝜙𝑠𝑙 Angular displacement of the sleeve (rad)
𝜙𝑖𝑔 Angular displacement of the idler gear (rad)
𝜙𝑠𝑙,𝑐 Critical angle of the sleeve (rad)
𝜙𝑖𝑔,𝑐 Critical angle of the idler gear (rad)
𝜙𝑖𝑠 Angular displacement of the input shaft (rad)
𝜙𝑜𝑠 Angular displacement of the output shaft (rad)
𝜙𝑖𝑔 Angular displacement of the idler gear (rad)
𝑛𝑑𝑜𝑔 Number of dog teeth (m)
𝑤𝑑𝑜𝑔 Width of one dog tooth (m)
𝜙𝑑𝑜𝑔 Corresponding angle of one dog tooth (rad)
𝑐 Clearance between dog teeth (m)
𝜙𝑐 Corresponding angle of the clearance between dog teeth (rad)
𝑦𝑔𝑎𝑝 Tangential distance of a model unit (m)
𝜙𝑔𝑎𝑝 Corresponding angle of a model unit (rad)
𝑘𝑖𝑠 Stiffness of the input shaft (N/m)
𝑘𝑜𝑠 Stiffness of the output shaft (N/m)
𝑑𝑖𝑠 Damping rate of the input shaft (N·s/m)
𝑘𝑎 Stiffness of the actuator (N/m)
𝑑𝑎 Damping rate of actuator (N·s/m)
𝑘𝑐 Stiffness of clutch engagement (N/m)
𝑑𝑐 Damping rate of clutch engagement (N·s/m)
𝑑𝑜𝑠 Damping rate of output shaft (N·s/m)
𝐽𝑖𝑔 Inertia of idler gear (kg·m^2)
VIII
𝐽𝑜𝑠 Inertia of output shaft (kg·m^2)
𝐽𝑠𝑙 Inertia of sleeve (kg·m^2)
𝐽𝑖𝑠 Inertia of input shaft (kg·m^2)
𝐽𝑜𝑔 Inertia of output gear engaged with idler gear (kg·m^2)
𝑟𝑠𝑙 Radius of sleeve pitch circle (m)
𝜔𝑠𝑙 Angular velocity of sleeve (rad/s)
𝜔𝑖𝑔 Angular velocity of idler gear (rad/s)
𝜔𝑖𝑠 Angular velocity of input shaft (rad/s)
𝜔𝑜𝑠 Angular velocity of output shaft (rad/s)
𝑥𝑜𝑎 Axial displacement from actuator output (m)
𝑥𝑠𝑙 Axial displacement of sleeve (m)
𝑥𝑟𝑒𝑙𝑒 Relative axial displacement between sleeve and idler gear (m)
𝑥𝑎,𝑟𝑒𝑓 Reference axial displacement of actuator (m)
𝑟𝑚 Resistance of mechanical part in actuator motor (Ω)
𝑘𝑒𝑚𝑓 Coefficient of counter-electromotive force (V·s/m)
𝐿𝑚 Inductance of mechanical part in actuator motor (H)
𝑘𝑚 Coefficient of motor output force (N/A)
𝑚𝑠𝑙 Mass of sleeve (kg)
𝐹𝑓 Actuator friction force (N)
𝐹𝑎 Actuator force (N)
𝑖𝑎 Actuator current (A)
𝑢𝑐 Controlled voltage to the actuator (V)
𝑢 Driving voltage from the actuator (V)
𝑦𝑠𝑙 Tangential displacement of sleeve (m)
𝑦𝑟𝑒𝑙𝑒 Relative tangential displacement between sleeve and idler gear (m)
𝑘𝑐𝑝 Coefficients for the proportional term in actuator PD controller (V/m)
𝑘𝑐𝑑 Coefficients for the derivative term in actuator PD controller (V·s/m)
𝛾𝑡 Sleeve displacement angle (rad)
Abbreviations
PMSM Permanent Magnetized Synchronous Machine
PSO Particle Swarm Optimization
DOF Degree of freedom
IX
TABLE OF CONTENTS
SAMMANFATTNING ·······················································································································I
ABSTRACT ····································································································································III
FOREWORD ·································································································································· V
NOMENCLATURE ························································································································ VII
TABLE OF CONTENTS ··················································································································· IX
1 INTRODUCTION ······················································································································ 1
1.1 Background ····························································································································· 1
1.2 Purpose ··································································································································· 1
1.3 Delimitations ··························································································································· 2
1.4 Methods ·································································································································· 2
2 FRAME OF REFERENCE ··········································································································· 4
2.1 Gear Shifting Mechanisms ········································································································ 4 2.1.1 Synchronizer Design Study ························································································································ 4 2.1.2 Synchronizer Performance Analysis ··········································································································· 6 2.1.3 Synchronizer Control Strategy ··················································································································· 6
2.2 Particle Swarm Optimization ···································································································· 7
3 IMPLEMENTATIONS ············································································································· 10
3.1 Transmission Model ··············································································································· 10
3.2 Gear Engagement Process ······································································································ 11 3.2.1 Phase 1 – Individual Movement··············································································································· 11 3.2.2 Phase 2 – System Calculation ·················································································································· 12 3.2.3 Phase 3 – Actuation Movement ··············································································································· 13 3.2.4 Phase 4 – Gear Engagement ···················································································································· 14
3.3 Calibration of Relative Initial Phase ························································································ 15 3.3.1 Direct Comparison ··································································································································· 16 3.3.2 Particle Swarm Optimization Application································································································· 17
3.4 Compatible Application of Algorithms ···················································································· 18
4 SIMULATION AND RESULTS ·································································································· 20
4.1 Transmission Simulation in Simulink ······················································································· 20 4.1.1 Modelling Description ····························································································································· 20 4.1.2 Simulation Results ··································································································································· 21
4.2 Initial Phase Calibration in MATLAB ························································································ 22 4.2.1 Direct Comparison ··································································································································· 22 4.2.2 Particle Swarm Optimization Application································································································· 24 4.2.3 Evaluation of Calibration Algorithms ······································································································· 24
6 CONCLUSIONS AND RECOMMENDATIONS ············································································ 28
6.1 Conclusions ··························································································································· 28
6.2 Recommendations and Discussions ························································································ 28
X
9 REFERENCE ······························································································································· 30
APPENDIX A: GANTT CHART ········································································································ 33
APPENDIX B: RISK ANALYSIS ········································································································ 34
APPENDIX C: SYSTEM SCHEMATIC DIAGRAM ··············································································· 35
APPENDIX D: CALIBRATION IN MATLAB ······················································································· 36
APPENDIX E: ESTIMATION IN MATLAB ························································································· 38
APPENDIX F: DIRECT COMPARISON IN MATLAB ··········································································· 39
APPENDIX G: PSO IN MATLAB ······································································································ 41
11
1
1 INTRODUCTION
1.1 Background
In the field of vehicle transmission, synchronizers recently play a vital role in the process of
gear shifting. A synchronizer consists of a gear-shift sleeve with an internal gearing groove, an
idler gear and a synchronizer ring both with external dogs. During each synchronization, sleeve
teeth are engaged with idler gear dog teeth through a synchronizer ring.
There is a desire to reduce noise, wear and even failure, numbers of engineers work hard on the
optimization of gear engagement during shifting, mostly focusing on geometry, mechanism and
control strategy. Synchronizers include a friction surface pair that mates with each other for
synchronizing the rotational speed of the different portions before gear engagement, which
reduces noise and wear significantly but leads to a high cost on high manufacturing precision
to ensure precise motion.
Dog clutches, playing a similar role to synchronizers, are generally less complex than
synchronizers. In order to improve gear engagement of dog clutches, it is common to use
specific teeth geometry of the dog clutch teeth which generally results in complex and costly
manufacturing of the dog clutch.
Therefore, there is a demand for a cost-efficient and easily implemented method for operating
a transmission of a vehicle drivetrain including a synchronizer or a dog clutch, which results in
reduced mechanical noise and wear during gear engagement or dog clutch engagement. When
the method to estimation synchronizers position is verified, it can also be developed and used
on the dog clutches.
Muddassar (2019) [1] explained a method using model-based control with modelling 5 phases
of the process during gearing shifting. According to [1], engaging the synchronizers at a proper
position can significantly reduce the contact impact. But the high velocity and accuracy
requirement result in a high calculation frequency when using the feedback signal from an
added teeth position sensor connecting to the sleeve is used to estimate the contact severity.
In order to reduce the cost of transmission, a method to estimate the synchronization without
dog teeth position sensor is being looked for.
1.2 Purpose
This thesis aims to formulate an estimation method using the signal from the original actuator
sensor connected to the sleeve and the signal from the output of the drivetrain, instead of that
from the added position sensor, so that it can simplify the transmission and avoid the extra cost
of the added position sensor.
The following objectives are stated to achieve the thesis aim:
a) To model the gear shifting system in gear shifting transmission in a simplified form.
Practical disturbances, such as shaft bending and gear engagement backlash, should be
taken in account.
b) To estimate the positions of dog teeth of different synchronizer portions, for finding an
appropriate position for gear-shifting.
c) To present an offline calibration method of some uncertain parameters which need
compensation in the real-time estimation of gear shifting.
2
d) To evaluate the proposed methods with simulation results.
Above all, the thesis topic could be separated into all the following sub-questions to be
discussed:
a) When could the sleeve and idler gear be engaged?
b) What are the advantages and disadvantages of the proposed methods?
1.3 Delimitations
The content of work not included in this thesis project is listed below:
a) The model mentioned in this thesis is a physics-based model with formulations, but not a
3D-design model. Meanwhile, all kinds of analyses based on the 3D model, such as finite
element analysis and thermodynamic analysis, would not be considered.
b) The self-compensation algorithm would be validated in simulation with some random input
signal, but not with the real-testing-bench verification.
c) The algorithm will be only implemented in computer programs but not forwarded into
electronic control units. The conversion from the algorithm to the application code in
electronic control unit is not mentioned.
1.4 Methods
To achieve the research goals, the project is studied in such procedures:
a) Literature study on the paper related to gear shifting process in vehicle transmission,
control strategies on gear shifting mechanisms, and intelligent algorithms.
b) Modelling the subject system and giving some certain definitions or limitations.
c) Applying the intelligent algorithms to the system with specific development, which is
suitable to research goals.
d) Plotting and analyzing the simulation results.
3
4
2 FRAME OF REFERENCE
2.1 Gear Shifting Mechanisms
Vehicle transmission [2] provides four main functions: matching the ratio and the power to
driving conditions, adapting power flow such as converting torque and speed and providing
reverse, enabling the vehicle to move-off from rest, and control power transmission with
minimal loss.
Figure 1. Examples of internal shifting elements in automotive transmissions. A sliding gear; b dog clutch
engagement; c pin engagement; d synchronizer without locking mechanism. Figure courtesy: [3]
Gear shifting mechanisms can be categorized into internal and external shifting elements, also
be classified based on whether the power interruption exists.
Synchronizers play a vital role during gear shifting in the vehicle transmission, as an internal
shifting element with power interruption. Synchronizers need high manufacturing precision to
ensure its precise motion, which leads to a high cost. Meanwhile, dog clutches, of which the
machinery is less complex, move faster and cost less than synchronizers. There is wide use of
both kinds of mechanisms in vehicles, so there are a great number of engineers who have been
working for a long time on structure development and control strategy in order to improve gear
shifting performance.
2.1.1 Synchronizer Design Study
Figure 2. Single-cone synchronizer. 1 Idler gear; 2 synchronizer hub; 3 synchronizer ring; 4 synchronize body;
5 gearshift sleeve; 6 transmission shaft. Figure courtesy: [2]
5
A single-cone synchronizer shown in Figure 2 is a typical design of synchronizers. The velocity
of transmission shaft 6 and the velocity of the idler gear 1 are synchronized with the friction
force generated by the friction pair on synchronizer hub 2 and synchronizer ring 3.
Figure 3. Double-cone synchronizer. 1 Idler gear; 2 synchronizer hub with dog gearing; 3 double-cone ring; 4
counter-cone ring; 5 synchronizer body. Figure courtesy: [2]
More friction pairs and the larger friction surface area in the multi-cone synchronizer reduce
gear shifting force and increase the torque capacity, but also increase the manufacturing cost
due to higher manufacturing precision requirements. As shown in Figure 3, there are double
cone in synchronizer ring 3 mating with the synchronizer hub 2 in the design of a double-cone
synchronizer.
Figure 4. Mercedes-Benz external-cone synchronizer system. 1 Idler gear with dog gearing; 2 annular spring; 3
synchronizer ring; 4 synchronizer body; 5 gearshift sleeve; 6 locking lug; 7 groove in idler gear. Figure
courtesy: [2]
Figure 5. Locking-pin synchronizer. 1 Idler gear with dog gearing; 2 synchronizer ring; 3 gearshift sleeve; 4
locking pin; 5 compression spring. Figure courtesy: [2]
Special design of gear-shifting mechanisms are proposed to optimize the gear shifting motion,
such as reducing the traction torque or the negative effects. There are three inward-facing
locking lugs in the Mercedes-Benz external-cone synchronizer system (Figure 4) and six
6
locking pins in the synchronizer design in Figure 5 to engage the different parts together in a
mating position.
Engineers keep developing the design of the synchronizer. Razzacki and Hottenstein (2007) [4]
introduced a developed design scheme for synchronizers mostly used in dual clutch
transmission, optimizing the size, synchronization time and torque and giving some constraints
of index torque.
Achtenova, Jasny and Pakosta (2018) [5] developed a new generation of dog clutch with tapered
dog sides to achieve locking-function and circular backlash minimization as well as the
geometry and weight optimization.
Shiotsu, et al. (2019) [6] proposed a new dog clutch in order to reduce the loss of the oil pump
and the drag losses. The tests were presented, resulting in a significant reduction of drag losses
and clutch actuator load compared to existing products.
2.1.2 Synchronizer Performance Analysis
Besides structure optimization, a lot of papers focus on performance analysis, not only speed
and torque, but also power efficiency and response. The degree of freedom of the models in
those papers is in more detail so that the overall gear shifting process is getting more and more
transparent.
A dog clutch model was built on component level by Duan (2014) [7], especially involving the
detail of contact between dog teeth, which is used to study the dog clutch engagement process.
The results show that there are contact and impact between the dog teeth not to be ignored.
Walker, Zhang and Tamba (2011) [8] presented a detailed model of a 4-DOF gear shifting
transmission, especially including vehicle resistance model and clutch model at both open and
closed phases. In 2013, Walker and Zhang [9] presented a 15-DOF model in comparison with
the 4-DOF model to study the vibration and transient response affected by engine torque
harmonics, degrees of freedom and dual mass flywheels. Later in 2017, they [10]developed the
model with the backlash of gear and synchronizers and simulated a line-of-action force contact
model of gear pair and a torsional nonlinear contact model of the synchronizer.
Alzuwayer, et al. (2017) [11] presented the mathematic model of a 9-speed-step transmission
system, including wet clutches, interlocking dog clutches and the gearing system simulated in
AMEsim, with the parameters calibrated in MATLAB. It is also stated that the engine torque
needs to coordinate with the transmission controller to minimize the effects on vehicle
acceleration while controlling the dog clutch velocity.
Irfan, Berbyuk and Johansson (2018) [12] modelled a generic synchronizer and kinematics of
the synchronization process. The effects of 8 different parameters of synchronizer were
analyzed and optimized at different operating conditions.
Farokhi Nejad, et al. (2019) [13] presented a dynamic model of a synchronizer mechanism
involving dimensional tolerance, in order to predict the dynamic response, including
synchronization time and angular speed, which was later tested on existing machines. In
comparison with practical experiments, the analysis gave out high accuracy performance.
2.1.3 Synchronizer Control Strategy
Along with a deeper understanding of the shifting process, engineers came up with different
kinds of control strategies and methods, trying to optimize the performance of synchronizers
and dog clutches.
Walker, Zhang and Tamba (2011) [8] proposed a feed-forward control system on engine and
clutch, and then in 2012 [14] demonstrated a closed-loop control method to overcome block
7
out related engagements and a novel engagement tool for overriding all chamfer alignment
conditions.
Szabo, Buchholz and Dietmayer (2012) [15] presented a cascaded control system with a
discrete-time model-predictive control (MPC) in the outer loop and a flatness-based 2-DOF
controller in the inner loop, which is applied to a test rig with a dual-clutch transmission for
heavy-duty trucks to perform powershifts.
Liu, et al. (2013) [16] introduced the control system of dual clutch transmission briefly, which
is divided into 4 modules: clutch control module, synchronizer control module, shift assembly
control module and vehicle control module.
Tseng and Yu (2015) [17] analyzed the clutchless automatic manual transmission in great detail
and proposed a dynamic control strategy for gear shifting actuator, which consists of PI
controller, compensator and neural network plant estimator.
Mesmer, Szabo and Graichen (2019) [18] stated predictive control on a nonlinear model of a
heavy-duty truck. Unspecified end control time, input and state constraints are discussed in
order to optimize the control algorithm with high-fidelity converted to electronic control unit.
The model and control scheme are proved through experiments on a 16 tons wheel loader.
2.2 Particle Swarm Optimization
There would be some uncertain parameters needing identification in the system. Particle swarm
optimization (PSO) is applied in the case.
The concept of PSO was first proposed and published by Kennedy and Eberhart (1995) [19],
inspired by birds flocking behavior. The position, X velocity and Y velocity of a number of
agents were randomly initialized. Then in each iteration, velocity 𝑣𝑖𝑑 and position 𝑥𝑖𝑑 are
updated with the formula:
where 𝑝𝑖𝑑 and 𝑝𝑔𝑑 stand for the best position of the agent and the global best position, 𝑐1 and
𝑐2 for learning weights. A modified particle swarm optimizer was proposed by Shi and Eberhart,
with an inertia weight which could better balance the global search and local search (1998) [20]:
When the inertia weight 𝜔 is too small (< 0.8), PSO shows up a tendency to a local search
clustering quickly but sometimes there is a risk that the local optimum is not the global one. If
𝜔 is too high (>1.2), PSO needs more iterations to find the global optimum or even fails with a
preset number of iterations. Meanwhile, there is a larger possibility to obtain an acceptable
solution with a proper iteration number when 0.8 < 𝜔 < 1.2.
A nonlinear inertia weight variation for dynamic adaptation introduced in [21] is appied in this
paper:
𝜔 = {𝜔𝑚𝑖𝑛 −
(𝜔𝑚𝑎𝑥 −𝜔𝑚𝑖𝑛)(𝑓 − 𝑓𝑚𝑖𝑛)
𝑓𝑎𝑣𝑔 − 𝑓𝑚𝑖𝑛, 𝑓 ≤ 𝑓𝑎𝑣𝑔
𝜔𝑚𝑎𝑥, 𝑓 > 𝑓𝑎𝑣𝑔
(4)
𝑣𝑖𝑑 = 𝑣𝑖𝑑 + 𝑐1 × 𝑟𝑎𝑛𝑑() × (𝑝𝑖𝑑 − 𝑥𝑖𝑑) + 𝑐2 × 𝑟𝑎𝑛𝑑() × (𝑝𝑔𝑑 − 𝑥𝑖𝑑) (1)
𝑥𝑖𝑑 = 𝑥𝑖𝑑 + 𝑣𝑖𝑑 (2)
{𝑣𝑖𝑑 = 𝜔 × 𝑣𝑖𝑑 + 𝑐1 × 𝑟𝑎𝑛𝑑() × (𝑝𝑖𝑑 − 𝑥𝑖𝑑) + 𝑐2 × 𝑟𝑎𝑛𝑑() × (𝑝𝑔𝑑 − 𝑥𝑖𝑑)
𝑥𝑖𝑑 = 𝑥𝑖𝑑 + 𝑣𝑖𝑑. (3)
8
From then on, more and more developed versions of PSO are proposed, as well as different
kinds of applications and theoretical studies [22]. Kennedy and Eberhart (1997) [23] reworked
PSO which operates on discrete binary variables. Clerc and Kennedy (2002) [24] presented a
simplified method to identify the constriction coefficient. Dynamic adaptations of the inertia
weight in PSO are proposed in different ways being applied to different situations, such as that
in [25] and [26]. Zhang, et al. (2020) [27] used PSO to solve the problems while designing a
multi-form energy hub, which is modified with the Lagrange technique. During the
optimization, they proposed a method to adapt the inertia weight in PSO.
9
10
3 IMPLEMENTATIONS
3.1 Transmission Model
Throughout the automated manual transmission, the power is transmitted from the permanent
magnetized synchronous machine (PMSM), through the gears and shafts and finally to the
output wheels. Since PMSM control is not included in this paper, PMSM in the model here is
simplified into an ideal torque source giving 𝑇𝑒. The overall transmission model sketch is shown
in Figure 6 (Zoom-in sketch in Appendix).
Figure 6. Sketch of transmission from PMSM to sleeve.
R and C in Figure 6stand for transmission direction. In other words, the force is positive if it
acts in the direction from R to C.
Assuming stiffness and damping rate of the input shaft is 𝑘𝑖𝑠 and 𝑑𝑖𝑠, the inertia of the sleeve
and the input shaft is 𝐽𝑠𝑙 and 𝐽𝑖𝑠, the movement could be described with Newton’s second law:
where 𝜙𝑠𝑙 and 𝜙𝑖𝑠 stand for angular displacement of the sleeve and the input shaft, 𝜔𝑠𝑙 and 𝜔𝑖𝑠 stand for the angular velocity of the sleeve and the input shaft. 𝑇𝐿 for the load torque developed
during the engagement, of which the calculation is described in the next subsection.
Assuming the output shaft of the gear shifting system is not rigid, flexibility in the connection
stiffness of output shaft is 𝑘𝑜𝑠, the damping rate (friction) is 𝑑𝑜𝑠 and the driving torque applied
on idler gear is 𝑇𝑠𝑦𝑛, the dynamic model is:
𝑇𝑒 = 𝐽𝑖𝑠𝑑𝜔𝑖𝑠𝑑𝑡
+ 𝑘𝑖𝑠(𝜙𝑖𝑠 − 𝜙𝑠𝑙) + 𝑑𝑖𝑠(𝜔𝑖𝑠 −𝜔𝑠𝑙) (5)
𝑘𝑖𝑠(𝜙𝑖𝑠 − 𝜙𝑠𝑙) + 𝑑𝑖𝑠(𝜔𝑖𝑠 −𝜔𝑠𝑙) + 𝑇𝐿 = 𝐽𝑠𝑙𝑑𝜔𝑠𝑙𝑑𝑡
(6)
𝑇𝑠𝑦𝑛 − 𝑇𝐿 = 𝐽𝑖𝑔𝑑𝜔𝑖𝑔
𝑑𝑡+ 𝑘𝑜𝑠(𝜙𝑖𝑔 − 𝜙𝑜𝑠) + 𝑑𝑜𝑠(𝜔𝑖𝑔 −𝜔𝑜𝑠)
(7)
𝑘𝑜𝑠(𝜙𝑖𝑔 − 𝜙𝑜𝑠) + 𝑑𝑜𝑠(𝜔𝑖𝑔 − 𝜔𝑜𝑠) = 𝐽𝑜𝑢𝑡𝑝𝑢𝑡𝑑𝜔𝑜𝑠𝑑𝑡
+ 𝑇𝑡𝑖𝑟𝑒 (8)
𝐽𝑜𝑢𝑡𝑝𝑢𝑡 = 𝐽𝑜𝑠 + 𝐽𝑜𝑔 + 𝐽𝑡𝑖𝑟𝑒 (9)
11
In the above formulations, 𝑇𝑡𝑖𝑟𝑒 refers to load torque on tires, which is neglected as zero in this
paper. 𝜙𝑖𝑔 and 𝜔𝑖𝑔 are the angular displacement and the angular velocity of the idler gear, and
𝜙𝑜𝑠 and 𝜔𝑜𝑠 for that of shifting output shaft. 𝐽𝑖𝑔, 𝐽𝑜𝑠 𝑎𝑛𝑑 𝐽𝑜𝑔 refer to the inertia of idler gear,
shifting output shaft and the output gear engaged with idler gear.
3.2 Gear Engagement Process
Figure 7. Phases time distribution.
The engagement process could be divided into 4 phases in order to simplify the model:
a) Phase 1 (within ∆𝑡𝑠) - there is no outside-system effect.
b) Then the driver presses the button and the shifting starts at moment 𝑡1. In phase 2 (within
∆𝑡𝑐), the system implements the calculation and approves the gear engagement.
c) Phase 3 (within ∆𝑡𝑎) - the actuator moves the sleeve towards the idler gear.
d) Phase 4 (from 𝑡3) - gear engagement.
3.2.1 Phase 1 – Individual Movement
Figure 8. Sketch of angle definition.
(left) The idler gear. (right) The sleeve.
A dog clutch has a first clutch portion with a first set of teeth and a second clutch portion with
a second set of teeth, which are the sleeve and the idler gear. In the phase 1, the first and second
clutch portions are rotatable with respect to each other.
As shown in Figure 8, the position of the idler gear can be described with the angular
displacement 𝜙𝑖𝑔 and the initial phase 𝜑𝑖𝑔 in the static coordinates, while the position of the
sleeve being described with the angular displacement 𝜙𝑠𝑙 and the initial phase 𝜑𝑠𝑙. In order to
simplify the model, the difference between the initial phase of the sleeve and that of the idler
gear is defined as ∆𝜑 in rotating coordinates, see Figure 9.
�
� �
�
� �
Position Definition
I dler Gear Sleeve
Initial phase
Initial phaseDisplacement
Displacement
y y
x x
12
Figure 9. Sketch of position estimation.
The angular displacement of sleeve 𝜙𝑠𝑙 and idler gear 𝜙𝑖𝑔 are the integral of the velocity signal
𝜙𝑠𝑙̇ and 𝜙𝑖𝑔̇ , the time-varied position of sleeve and idler gear are:
In practical testing, these two angular displacement signals are obtained by the transducers,
while the relative initial phase ∆𝜑 is calibrated with an extra test (in part 3.3).
Assuming the geometry and size of the sleeve are the same as the idler gear, including the same
width of dog teeth wdog and the same clearance c between dog teeth of the idler gear. The
corresponding angle of each dog tooth and clearance are:
3.2.2 Phase 2 – System Calculation
The estimation should be done based on the signal from the sensor before and at the instant 𝑡1.
𝜙𝑔𝑎𝑝 is the angle between a pair of nearest tooth tips. To define the dog tooth which is closest
to the zero-position as the critical tooth, the critical position for engagement is calculated with
the modulo operation:
The criterion to approve gear shifting in angle form is:
��
∆�� �
� �
d
q
𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡) = 𝜙𝑠𝑙(𝑡) + ∆𝜑 = ∆𝜑 +∫𝜙𝑠𝑙̇ 𝑑𝑡 (10)
𝜙𝑖𝑔,𝑡𝑜𝑡𝑎𝑙(𝑡) = 𝜙𝑖𝑔(𝑡) = ∫𝜙𝑖𝑔̇ 𝑑𝑡. (11)
𝜙𝑑𝑜𝑔 =𝑤𝑑𝑜𝑔
𝑟𝑠𝑙 (12)
𝜙𝑐 =𝑐
𝑟𝑠𝑙. (13)
𝜙𝑠𝑙,𝑐 = 𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡1) − 𝑓𝑙𝑜𝑜𝑟 (𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡1)
𝜙𝑔𝑎𝑝) ∗ 𝜙𝑔𝑎𝑝 = [𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡1)] 𝑚𝑜𝑑 [𝜙𝑔𝑎𝑝]
(14)
𝜙𝑖𝑔,𝑐 = [𝜙𝑖𝑔,𝑡𝑜𝑡𝑎𝑙(𝑡1)] 𝑚𝑜𝑑 [𝜙𝑔𝑎𝑝]. (15)
𝜙𝑑𝑜𝑔 ≤ |𝜙𝑖𝑔,𝑐 − 𝜙𝑠𝑙,𝑐| ≤ 𝜙𝑑𝑜𝑔 + 𝜙𝑐 (16)
13
There is no interference between sleeve and idler gear while Formula (16) is fulfilled, which
means there is no collision while gear engagement. Given 𝑟𝑠𝑙 as sleeve mean radius, Formula
(14), (15) and (16) could also be written with tangential displacement:
According to the above criterion, the estimation results in a control signal function:
The control signal function is used to control the clutch actuator for performing a bunch of
clutch engagement movements.
3.2.3 Phase 3 – Actuation Movement
Figure 10. Sketch of dog clutch engagement.
Clutch actuator operably connected with the sleeve for shifting the dog clutch between the
engaged and disengaged states by controlling an axial position of the sleeve.
During an actuation, the sleeve moves towards the idler gear no matter how much the relative
velocity is, which is different from ordinary synchronizer with friction pair engaging only when
the relative velocity is zero.
In Figure 10, the blue teeth refer to the sleeve and the orange ones refer to the idler gear. The
red curve is the trajectory of the sleeve during engagement. Given the number of dog teeth
𝑛𝑑𝑜𝑔, the distance between each pair of teeth is 𝑦𝑔𝑎𝑝 corresponding to angle 𝜙𝑔𝑎𝑝:
With teeth width 𝑤𝑑𝑜𝑔 and clearance between teeth c corresponding to angle 𝜙𝑐, the distance
between each pair of teeth 𝑦𝑔𝑎𝑝 can also be written as:
𝑦𝑠𝑙,𝑐 = 𝜙𝑠𝑙,𝑐 ∙ 𝑟𝑠𝑙 (17)
𝑦𝑖𝑔,𝑐 = 𝜙𝑖𝑔,𝑐 ∙ 𝑟𝑠𝑙 (18)
𝑤𝑑𝑜𝑔 ≤ |𝑦𝑖𝑔,𝑐 − 𝑦𝑠𝑙,𝑐| ≤ 𝑤𝑑𝑜𝑔 + 𝑐. (19)
𝑓𝐶𝑆(𝑡) = {1, 𝑤ℎ𝑒𝑛 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 16 𝑖𝑠 𝑓𝑢𝑙𝑓𝑖𝑙𝑙𝑒𝑑0, 𝑤ℎ𝑒𝑛 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 16 𝑖𝑠 𝑛𝑜𝑡 𝑓𝑢𝑙𝑓𝑖𝑙𝑙𝑒𝑑.
(20)
𝜙𝑔𝑎𝑝 = 2𝜋/𝑛𝑑𝑜𝑔 (21)
𝑦𝑔𝑎𝑝 = 2𝜋𝑟𝑠𝑙/𝑛𝑑𝑜𝑔 (22)
𝑦𝑔𝑎𝑝 = 2𝑤𝑑𝑜𝑔 + 𝑐 (23)
14
Within phase 3, the relative displacement along the rotational direction is 𝑦𝑟𝑒𝑙𝑎 and 𝑥𝑟𝑒𝑙𝑎 in the
axial direction. Assuming actuator reaction time is zero and the actuator to the sleeve moves on
constant velocity 𝑥𝑠𝑙̇ :
where 𝛾𝑡(𝑡) is displacement angle; If |𝛾𝑡(𝑡)| is smaller than teeth half-angle 𝛾, the sleeve hits
the idler gear.
3.2.4 Phase 4 – Gear Engagement
In this phase, there are actually two respective motions – the sleeve moves toward the idler gear
and they are engaged together.
𝐹𝑎 stands for actuator force, 𝑚𝑠𝑙 is sleeve mass and 𝑥𝑜𝑎 refers to axial displacement from
actuator output. An actuator motor consists of an electric part and a mechanical part which
could be expressed in such formulations:
There is a feedback PD controller in the actuator:
where 𝑘𝑎 and 𝑑𝑎 stand for the spring rate and damping rate of the actuator. 𝐹𝑓,𝑎 is the friction
force on the actuator and 𝑢𝑐 signal could be used to analyze the impact to the sleeve, i.e. the
voltage spike appears when the sleeve crashes to the idler gear.
In the engagement state, the sleeve and the idler gear are operable to transmit torque via the
teeth, considering the connection between them as a torsional oscillation and taking backlash
into account, the torque in the torsional spring transmitted is:
𝑥𝑟𝑒𝑙𝑎(𝑡) = ∫ 𝑥𝑠𝑙̇ 𝑑𝑡𝑡2
𝑡3
(24)
𝑦𝑟𝑒𝑙𝑎(𝑡) = ∫ 𝑟𝑠𝑙(𝜔𝑖𝑔 −𝜔𝑠𝑙)𝑑𝑡𝑡2
𝑡3
(25)
𝑡𝑎𝑛 𝛾𝑡(𝑡) =𝑦𝑟𝑒𝑙𝑒𝑥𝑟𝑒𝑙𝑒
(26)
𝑢 = 𝑟𝑚𝑖𝑎 + 𝐿𝑚𝑑𝑖𝑎𝑑𝑡
+ 𝑘𝑒𝑚𝑓𝑥𝑜𝑎̇ (27)
𝐹𝑎 = 𝑘𝑚𝑖𝑎. (28)
𝐹𝑎 − 𝐹𝑓,𝑎 = 𝑘𝑎(𝑥𝑠𝑙 − 𝑥𝑜𝑎) + 𝑑𝑎(𝑥𝑠𝑙̇ − 𝑥𝑜𝑎̇ ) + 𝑚𝑠𝑙𝑥𝑠𝑙̈ (29)
𝑢𝑐 = 𝑘𝑐𝑝(𝑥𝑎,𝑟𝑒𝑓 − 𝑥𝑜𝑎) + 𝑘𝑐𝑑(𝑥𝑎,𝑟𝑒𝑓̇ − 𝑥𝑜𝑎 ̇ ) (30)
𝐹𝑓,𝑎 = 𝜇𝑇𝐿𝑟𝑠𝑙
(31)
𝜙𝑖𝑔,𝑒 = 𝜙𝑖𝑔,𝑡𝑜𝑡𝑎𝑙(𝑡) − 𝜙𝑖𝑔,𝑡𝑜𝑡𝑎𝑙(𝑡3) (32)
𝜙𝑠𝑙,𝑒 = 𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡) − 𝜙𝑠𝑙,𝑡𝑜𝑡𝑎𝑙(𝑡3) , (33)
∆𝜙𝑒 = 𝜙𝑖𝑔,𝑒 − 𝜙𝑠𝑙,𝑒 (34)
15
where 𝜙𝑖𝑔,𝑒 refers to the angular displacement of idler gear in gear engagement phase, 𝜙𝑠𝑙,𝑒 for
angular displacement of shifting output shaft in gear engagement phase and 𝑘𝑐 for gear
engagement spring rate.
If considering both spring and damping, giving 𝑘𝑐 as gear engagement spring rate and 𝑑𝑐 as
gear engagement damping rate:
3.3 Calibration of Relative Initial Phase
Figure 11. Flowchart of real-time position estimation and gear shifting judgment.
According to the flowchart in Figure 11, in the ordinary estimation system described in previous
subsections, the criterion (Formula (16) and (19)) based on initial phase difference ∆𝜑, sleeve
displacement 𝜙𝑠𝑙 and idler gear displacement 𝜙𝑖𝑔 lead to a control signal 𝑓𝐶𝑆 (Formula (20)),
which is used to approve the gear shifting in real-time estimation. In fact, displacement 𝜙𝑠𝑙 and
idler gear displacement 𝜙𝑖𝑔 can be obtained with the feedback signals, but initial phase
difference ∆𝜑 is unknown, which is different in individual transmissions due to different
manufacturing tolerance and assembly tolerance.
𝑇𝐿 =
{
𝑘𝑐 (∆𝜙𝑒 +
𝜙𝑐
2) 𝑓𝑜𝑟 ∆𝜙𝑒 ≤ −
𝜙𝑐
2
0 𝑓𝑜𝑟 −𝜙𝑐
2≤ ∆𝜙𝑒 ≤ +
𝜙𝑐
2
𝑘𝑐 (∆𝜙𝑒 −𝜙𝑐
2) 𝑓𝑜𝑟 ∆𝜙𝑒 ≥
𝜙𝑐
2
=𝑘𝑐
2[∆𝜙𝑒 −
𝜙𝑐
2𝑠𝑖𝑔𝑛(∆𝜙𝑒)] [1 + 𝑠𝑖𝑔𝑛 (|∆𝜙𝑒| −
𝜙𝑐
2)]
(35)
𝑇𝐿 =
{
𝑘𝑐 (∆𝜙𝑒 +
𝜙𝑐
2) + 𝑑𝑐(𝜔𝑖𝑔 − 𝜔𝑠𝑙) 𝑓𝑜𝑟 ∆𝜙𝑒 ≤ −
𝜙𝑐
2
0 𝑓𝑜𝑟 −𝜙𝑐
2≤ ∆𝜙𝑒 ≤ +
𝜙𝑐
2
𝑘𝑐 (∆𝜙𝑒 −𝜙𝑐
2) + 𝑑𝑐(𝜔𝑖𝑔 − 𝜔𝑠𝑙) 𝑓𝑜𝑟 ∆𝜙𝑒 ≥
𝜙𝑐
2
(36)
16
Therefore, two different methods of off-time calibration of initial phase difference ∆𝜑 are
proposed in this part. In the calibration test, a plurality of commands to actuate the sleeve
towards the idler gear result in an actuator feedback signal which indicates either successful
mutual intermeshing engagement, or collision between individual sets of teeth.
On the contrary, with actuator feedback signals 𝑓𝐴𝑆 and displacements of sleeve and idler gear
(𝜙𝑠𝑙 𝑎𝑛𝑑 𝜙𝑖𝑔), both methods utilize the inverse of estimation criterion to identify the initial
phase difference ∆𝜑, as shown in Figure 12.
Figure 12. Flowchart of off-time calibration utilizing the inverse of criterion.
The first method is comparing an estimation signal with the actuator signal to pick up the
solution. The second one is applying particle swarm optimization to approximate the solution.
3.3.1 Direct Comparison
Given angular displacement signals of idler gear and sleeve, a certain initial phase leads to a
certain estimation result (so-called control signal) which is calculated with the estimation
criterion (Formula (16)). In this algorithm, of which the flowchart is shown in Figure 13 below,
the control signal is compared directly to the actuator signal, which results in the removal of
the inappropriate initial phase elements in the original selection.
𝑓𝐴𝑆(𝑡) = {1, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑛𝑜 𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛 𝑑𝑢𝑟𝑖𝑛𝑔 𝑠ℎ𝑖𝑓𝑡𝑖𝑛𝑔0, 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑐𝑟𝑎𝑠ℎ 𝑑𝑢𝑟𝑖𝑛𝑔 𝑔𝑒𝑎𝑟 𝑠ℎ𝑖𝑓𝑡𝑖𝑛𝑔.
(37)
17
Figure 13. Flowchart of direct comparison algorithm.
Here are the procedures in detail:
a) To initialize a set of optional numbers as initial phase ∆𝜑𝑡𝑟𝑖𝑎𝑙;
b) To command the actuation of gear shifting once;
c) To compute the control signal fCS,trial(𝑡) at the moment with each optional initial phase
∆𝜑𝑡𝑟𝑖𝑎𝑙 and the given angular displacement signals;
d) To compare the control signal fCS,trial(𝑡) with the actuator signal fAS(𝑡);
e) To remove the improper initial phase elements which result in the control signal different
from actuator signal and to keep the proper ones resulting in the same control signal as the
actuator signal;
f) If there is only one element of relative initial phase that can lead to the same control signal
as actuator signal, the iteration is interrupted and the solution is obtained; If not, repeat
procedures b, c, d and e at the next moment.
3.3.2 Particle Swarm Optimization Application
The ordinary process of PSO is introduced in the previous section. In the application of PSO in
this paper, actuator signal and control signal are utilized in array form for a certain testing time.
In each iteration, the velocity and position of each particle would be updated and fitness
function is evaluated:
Here are the procedures in detail, also seeing Figure 14:
a) To initialize particle parameters and PSO parameters;
𝐽 = ∫|𝑓𝐴𝑆 − 𝑓𝐶𝑆| 𝑑𝑡 =∑|𝐴𝑆𝑖 − 𝐶𝑆𝑖|
𝑡
(38)
18
b) To command the actuation of gear shifting several times;
c) To evaluate the objective function of the initial particles;
d) To update the velocity and the position of each particle and to evaluate the objective
function of them;
e) If J=0 is satisfied, the iteration is interrupted and the solution is obtained; if not, repeat
procedure c.
Figure 14. Flowchart of particle swarm optimization application.
3.4 Compatible Application of Algorithms
Specifically, the electronic control system is configured for setting the drivetrain in the relative
initial phase calibration mode. The first step included in this mode is to control the clutch
actuator for performing a plurality of clutch engagement trials in different velocities of the first
and second clutch portions. While registering for each individual clutch engagement movement,
the actuator feedback signal indicates either successful mutual intermeshing engagement or
teeth collision of the first and second portions. The next step is to identify the relative initial
phase between these two portions based on the registered clutch actuator feedback signal, by
using direct comparison algorithm or particle swarm optimization mentioned above.
Then subsequently the drivetrain is set in a normal estimation mode. The first step of the
estimation mode is to obtain angular position data associated with the first and second clutch
portions in the meantime of gear shift command. Secondly, to control the engagement of the
dog clutch with the obtained data and the calibrated relative initial phase in order to enable
interference-free engagement of the dog clutch.
19
In this way, it becomes possible to replace costly synchronizers with relatively cost-efficient
and robust dog clutches for gear engagement in stepped gear transmissions without having
increased noise and wear. The engagement and use of dog clutches in the vehicle drivetrain also
improved in terms of reduced noise and wear.
In addition, since the dog teeth do not need to be designed for enabling guidance or simplified
engagement in case of engagement in the non-matching angular position of the dog clutch, such
as by having pointed front teeth or friction surface pair, the design of the dog teeth may be
simplified, having for example a more blunt front portion, thereby enabling more cost-efficient
manufacturing of the dog teeth.
In some example embodiments, the step of setting the drivetrain in the relative initial phase
identifying mode is performed in connection with the manufacturing of the vehicle, and/or in
connection with vehicle maintenance. Since the initial phase difference typically depends on
the assembly and manufacturing tolerances of each specific vehicle, a first calibration of the
initial phase difference may be performed in connection with the manufacturing of the vehicle
for identifying a proper and unique individual value for each vehicle. The relative initial phase
is thereafter generally fixed over time and must thus not be recalibrated very often. However, a
recalibration upon for example annual service may be used for ensuring continuously updated
relative initial phase for providing smooth and interference-free gear and clutch engagements.
Meanwhile, the steps of controlling the clutch actuator for performing a number of clutch
engagement actuation, while registering a clutch actuator feedback signal and identifying the
initial phase difference between the first and second clutch portions, are initiated manually or
automatically by a remote service-provider and is performed with or without a driver or
passenger within the vehicle. When setting the drivetrain in the relative initial phase identifying
mode in connection with vehicle maintenance, the method for identifying and calibrating the
initial phase difference may be performed fully automatic, without the need for manual
interaction by a service technician or the like. Therefore, the calibration process may be initiated
remotely, thereby providing improved user-friendliness.
20
4 SIMULATION AND RESULTS
4.1 Transmission Simulation in Simulink
4.1.1 Modelling Description
In Simulink simulation, all the input blocks are green and output blocks are yellow.
The system Simulink model is shown schematically in Figure 15. The subsystems “from Idler
gear to Wheel” (in Figure 16) and “from PMSM to Sleeve” (in Figure 17) are running
throughout the whole simulation time modeling the transmission. When the gear shifting is
commanded, the estimation of component positions would be carried out in the “Estimation”
subsystem (in Figure 18), outputting a judgment signal to enable the “Actuator” (in Figure 19)
and “Gear Engagement” subsystems (in Figure 20). There is no load torque accumulated when
sleeve and the idler gear are not engaged together, i.e. T_L in the block diagram equals to zero
if the two subsystems “Gear Engagement” and “Actuator” are not enabled.
Figure 15. Overall Simulink model.
Figure 16. Simulink model of transmission from Idler gear to Wheel.
Figure 17. Simulink model of transmission from PMSM to Sleeve.
21
In the estimation shown in Figure 18, t_o refers to the ordering moment. This subsystem mainly
achieves an “approval” signal according to the criterion described in the part 3.2.2. SigC in the
block stands for the control signal 𝑓𝐶𝑆. The rising edge of SigC will trigger a simple plus
operation to turn the approval signal (SigA) from 0 to 1. Then the approval signal is used to
enable the subsystems simulating gear engagement and actuation, which is built up according
to the formulations mentioned in part 3.2.
Figure 18. Estimation subsystem in Simulink.
Figure 19. Actuator subsystem in Simulink.
Figure 20. Gear engagement subsystem in Simulink.
4.1.2 Simulation Results
Figure 21. Estimation Result.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time [s]
0
1
Co
ntr
ol S
igna
l f C
S
[1-S
afe
, 0-C
olli
sio
n]
Estimation
22
With the estimation criterion described in section 3.1.5, such results are plotted in Figure 21.
The red points in above figure mean that 𝑓𝐶𝑆,𝑖 = 1 and the blue points mean that 𝑓𝐶𝑆,𝑖 = 0. The
value of 𝑓𝐶𝑆 leads to the judgment on whether the engagement can be approved without
collision or not.
The dog teeth position and control signal processing at the particular instant t=0.220s are plotted
in the Figure 22. The estimation judgment 𝑓𝐶𝑆,𝑖 = 1 in the left part shows the fact that there is
no interference between the sleeve and the idler gear, as that on the right, so the gear shifting is
approved and the approval signal goes up at the same moment.
Figure 22. Sketch of component positions and approval signal processing at t=0.220s.
Figure 23 shows the dog teeth position and control signal processing at the particular instant
t=0.425s. It is obvious that there is interference between these two portions of dog clutch. The
estimation judgment 𝑓𝐶𝑆,𝑖 = 0 (the black dotted line on the left), so the gear shifting cannot be
approved. Then the system would find the closest instant for shifting. So, the approval signal
goes up at the moment t=0.520s (purple solid line).
Figure 23. Sketch of component positions and approval signal processing at t=0.425s.
4.2 Initial Phase Calibration in MATLAB
Two algorithms presented in subsection 3.3 are running in MATLAB and the results would be
plotted in this subsection. Then they are evaluated with some requirement.
4.2.1 Direct Comparison
According to Figure 24, there are 31 elements in the set with MABLAB code:
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
1
Estimation
Gear Shifting Estimation
(Order Time 0.220 s, Shifting Time 0.220 s)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
1
Approval signal
-0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
Dog Teeth Position when Odering at 0.220 s
Idler Gear
Sleeve
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
1
Estimation
Gear Shifting Estimation
(Order Time 0.425 s, Shifting Time 0.520 s)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
1
Approval signal
-0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
Dog Teeth Position when Odering at 0.425 s
Idler Gear
Sleeve
23
IP= 0: phi_gap/30: phi_gap;
and it takes 18 times of actuation in the simulation to find out the solution 0.326 rad. The
random input is 1.0285 rad and 𝑚𝑜𝑑(1.0285, 𝜙𝑔𝑎𝑝) ≈ 0.330 . The error -0.004 rad is
acceptable. The figure also tells us that the removal operation was not done during each
actuation.
Figure 24. Processing solution with direct comparison algorithm (30 elements).
As shown in Figure 25, if there are more elements in the initial set, the algorithm takes a longer
time for calibration. As that in Figure 25, there are 121 elements IP= 0: phi_gap/120: phi_gap;
and it needs 102 actuations. The solution is 0.332 rad, which leads to a smaller error of 0.002
rad.
Figure 25. Processing solution with direct comparison algorithm (120 elements).
With 𝑚𝑜𝑑(1.0285, 𝜙𝑔𝑎𝑝) ≈ 0.330, errors of both solutions are acceptable. But a larger set
which contains more elements, leads to a bigger possibility to find a more-precious solution
with a smaller error. As shown in Figure 26, with an increasing element number from 1 to 200,
it is more likely that this algorithm needs more actuations but results in a smaller error.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Actuation
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1S
olu
tio
ns [ra
d]
Direct Comparison
to Calibrate The Relevant Initial Phase
iter: 18
result: 0.326
phi_gap
mod(IP,phi_gap)
= 0.33037
random IP = 1.0285
0 10 20 30 40 50 60 70 80 90 100
Actuation
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Solu
tion
s [
rad
]
Direct Comparison
to Calibrate The Relevant Initial Phase
iter: 102
result: 0.332
phi_gap
mod(IP,phi_gap)
= 0.33037
random IP = 1.0285
24
Figure 26. Effects of element number.
4.2.2 Particle Swarm Optimization Application
There is only one particle which is the relative initial phase in the PSO application here. Swarm
size is 30, initial weight range is [0.5, 1] and the maximum iteration number is 100. The
computation is shown in the below figure.
Figure 27. A computation of particle swarm optimization application.
The random input is the same as that in simulation of algorithm 1. It takes 12 times of iteration
in this computation and the solution is 0.331 rad, which approximate to 𝑚𝑜𝑑(1.0285, 𝜙𝑔𝑎𝑝) ≈
0.330.
Since PSO application algorithm updates the value according to some criteria depending on the
approximation, it can always find a solution no matter how big the error is.
4.2.3 Evaluation of Calibration Algorithms
From section 4, the first algorithm leads to a bigger error while the second algorithm resulting
in almost the same signal as the actuator signal.
Direct comparison algorithm is based on removal operation so it would be faster to use this
algorithm to obtain the solution than PSO. It is extraordinarily important to set up a proper set
of alternative numbers, because not only the operation speed but also the precision and accuracy
depend on the range and size of the alternative set of numbers. The more elements in the
selection, the more likely it is to find the solution but it takes a longer time.
Algorithm 1 is based on comparison and removal action, so sometimes there is no appropriate
element left, resulting in no solution of the calibration. As in Figure 28, when the correct answer
0 20 40 60 80 100 120 140 160 180 200
Element Number
0
20
40
60
80
100
120
Actu
atio
n N
um
be
r
Effects of Element Number
0 20 40 60 80 100 120 140 160 180 200
Element Number
0.6
0.7
0.8
0.9
1
1.1
Err
or
[rad
]
25
should be 𝑚𝑜𝑑(1.194, 𝜙𝑔𝑎𝑝) ≈ 0.496, all the elements don’t fit the judgment and they are
finally all removed from the selection.
Figure 28. Processing solution with direct comparison algorithm (30 elements).
Monte Carlo Methods is used to investigate the properties of the direct comparison algorithm.
The results from 1000 trials are plotting in Figure 29. Solution could be found in 901 trials out
of 1000 while there are 100 elements in the alternative set each time.
The top plot shows the distribution of the random testing signal and the solutions from
Algorithm 1. Because 𝜙𝑔𝑎𝑝 ≈ 0.7 𝑟𝑎𝑑 , all the solutions ∆𝜑𝑜𝑢𝑡𝑝𝑢𝑡 are within [0, 0.7]. the
random testing signal here is the signal resulting from ∆𝜑𝑖𝑛𝑝𝑢𝑡 ∈ [0, 2𝜋) and “input”
histogram represents 𝑚𝑜𝑑(∆𝜑𝑖𝑛𝑝𝑢𝑡, 𝜙𝑔𝑎𝑝). The middle diagram tells that the error is almost
limited in the range [0, 0.026] with the probability 89.5%. The reason that error of 6 cases stays
around 0.7 could be that ∆𝜑𝑖𝑛𝑝𝑢𝑡 is near 𝜙𝑔𝑎𝑝 but solution ∆𝜑𝑜𝑢𝑡𝑝𝑢𝑡 goes to zero, which leads
to similar 𝑓𝐶𝑆. The bottom one tells that actuation number is less than 100. In other words,
calibration can be done within no more than 100 gear-shifting commands.
Figure 29. Properties of direct comparison.
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Actuation
0
0.2
0.4
0.6
0.8
1
1.2
So
lutio
ns [ra
d]
Direct Comparison
to Calibrate The Relevant Initial Phase
NO Solution
phi_gap
mod(IP,phi_gap)
= 0.49587
random IP = 1.194
Distribution of Solution
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
Value [rad]
0
10
20
30
40
Fre
que
ncy
solution
input
Distribution of Error
895
0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
Error [rad]
0
500
1000
Fre
qu
en
cy
Direct Comparison
Total Trials: 1000, Solutions: 901
Distribution of Actuation Number
53
67
95
64
100
81
51
39
56
27
47
30 40 38 42
33 44 45 48
0 10 20 30 40 50 60 70 80
Actuation
0
50
100
Fre
que
ncy
26
Furthermore, the comparison is implemented one by one and stops when there is no or only one
element left. In other words, it may not use all the test data but only part of them until it stops.
There is also a risk that the last one left as the solution may not actually fit the overall judgment
and it is left just for the sake of being left, meeting the requirement so far. So the solution from
Algorithm 1 is just picked up but not really “calculated".
Meanwhile, PSO application algorithm obtains the solution by updating a better particle in the
defined condition. At least Algorithm 2 can always find a solution regardless of big error or
small error, while Algorithm 1 sometimes even fails to. To some extent, it can approximate and
even get the exact number of the target, which is more reliable than the direct comparison
algorithm. In addition, all the test data are used in the fitness function identified with Formula
28 in the PSO, which is better than the Algorithm 1 using part of the data. This also brings the
disadvantage that the computation in each iteration takes longer due to the more complicated
algorithm structure.
Figure 30. Properties of particle swarm optimization.
Figure 30 shows the properties of particle swarm optimization investigated with Monte Carlo
Methods. The testing signal is the same as that in the simulation of Algorithm 1. The distribution
of the random testing signal and the solutions from Algorithm 2 is plotted in the top part. The
middle diagram tells that the error of 969 solutions out of 1000 is limited in the range [0, 0.026]
and 14 between [0.026, 0.052]. The bottom one tells that most of the cases need around 90
iterations in PSO, which means the operation will take a longer time.
27
28
6 CONCLUSIONS AND RECOMMENDATIONS
6.1 Conclusions
Two research questions are investigated in the thesis:
a) When could the sleeve and idler gear be engaged?
The paper presents the valid transmission model to simulate and predict the sleeve and idler
gear positions. The best moment for gear shifting and gear engagement can be found with the
estimation algorithm proposed in the thesis. The estimation algorithm with original feedback
signals manages to predict the interference between the sleeve and the idler gear in the
synchronizer system to be avoided during gear shifting.
b) What are the advantages and disadvantages of the proposed calibration methods?
Two different methods to calibrate the relevant initial phase ∆𝜑, which is vital in the estimation,
are verified with random input signals. Both methods can find the solutions with acceptable
error.
The direct comparison algorithm has a simpler structure of computation based on comparison
and removal operation. The quantity of required actuation is uncertain in this algorithm so that
in offline calibration test the service-provider or the operator needs to keep monitoring the
actuation and computation. There is also a 9.9% probability of failure to find the solution.
The application of particle swarm optimization in this case succeeds in calibrating the objective
parameter with a small error than the other algorithm. Actuation quantity affects the accuracy
of the solutions and errors but not the failure rate.
6.2 Recommendations and Discussions
The estimation criterion is based on the component positions and leads to a logical judgment
function. These two calibration methods utilize the inverse of the estimation criterion so that
that is not a one-to-one mapping relationship from the judgment to the initial phase difference.
It would help simplify the algorithm if the relationship could be developed with higher
pertinence. PSO is chosen in this thesis to identify the unknown parameters but different
learning algorithms may be also suitable for the case. More trials and research can be
investigated.
The particle swarm optimization here involves a dynamic adaptation of the inertia weight which
improves the accuracy of the algorithm but slows down the computation. It is also suggested to
find a balance between two properties, accuracy and speed.
Both the estimation and the calibration are simulated in third-party software. Therefore, the
applications in MATLAB and Simulink need to be converted into the application used in the
electronic control unit in the future.
29
30
9 REFERENCE
[1] M. Z. Piracha, A. Grauers, E. Barrientos, H. Budacs and J. Hellsing, "Model Based
Control of Synchronizers for Reducing Impacts during Sleeve to Gear Engagement," SAE
Technical Paper 2019-01-1303, 2019.
[2] H. Naunheimer, B. Bertsche, P. Fietkau, A. Kuchle, W. Novak and J. Ryborz, Automotive
Transmissions: Fundamentals, Selection, Design and Application, Berlin, Heidelberg:
Springer Berlin / Heidelberg, 2010.
[3] J. Looman, Zahnradgetriebe (Gear Mechanisms), Springer, Berlin Heidelberg New York,
1996.
[4] S. T. Razzacki and J. E. Hottenstein, "Synchronizer Design and Development for Dual
Clutch Transmission (DCT)," SAE Technical Papers, 2007.
[5] G. Achtenova, M. Jasny and J. Pakosta, "Dog Clutch Without Circular Backlash," SAE
Technical Paper 2018-01-1299, 2018.
[6] I. Shiotsu, H. Tani, M. Kimura, Y. Nozawa, A. Honda, M. Tabuchi, H. Yoshino and K.
Kanzaki, "Development of High Efficiency Dog Clutch with One-Way Mechanism for
Stepped Automatic Transmissions," International Journal of Automotive Engineering,
vol. 10(2), pp. 156-161, 2019.
[7] C. Duan, "Analytical Study of a Dog Clutch in Automatic Transmission Application,"
2014.
[8] P. D. Walker, N. Zhang and R. Tamba, "Control of gear shifts in dual clutch transmission
powertrains," Mechanical Systems and Signal Processing, pp. 1923-1936, 2011.
[9] P. D. Walker and N. Zhang, "Modelling of dual clutch transmission equipped powertrains
for shift transient simulations," Mechanism and Machine Theory, pp. 47-59, 2013.
[10] P. D. Walker and N. Zhang, "Numerical investigations into shift transients of a dual clutch
transmission equipped powertrains with multiple nonlinearities," 2015.
[11] B. Alzuwayer, . R. Prucka, I. Haque and P. Venhovens, "An Advanced Automatic
Transmission with Interlocking Dog Clutches: High-Fidelity Modeling, Simulation and
Validation," SAE Technical Papers 2017-01-1141, 2017.
[12] M. Irfan, V. Berbyuk and H. Johansson, "Performance improvement of a transmission
synchronizer via sensitivity analysis and Pareto optimization," Cogent Engineering, vol.
5(1), 01 January 2018.
[13] A. Farokhi Nejad, G. Chiandussi, V. Solimine and A. Serra, "Study of a synchronizer
mechanism through multibody dynamic analysis," Proceedings of the Institution of
Mechanical Engineers, Part D: Journal of Automobile Engineering, vol. 233(6), pp.
1601-1613, May 2019.
[14] P. D. Walker and N. Zhang, "Engagement and control of synchroniser mechanisms in
dual clutch transmissions," Mechanical Systems and Signal Processing, vol. 26, pp. 320-
332, 2012.
31
[15] T. Szabo, M. Buchholz and K. Dietmayer, "Model-Predictive Control of Powershifts of
Heavy-Duty Trucks with Dual-Clutch Transmissions," in 51st IEEE Conference on
Decision and Control (CDC), Hawaii, 2012.
[16] Y. Liu, Z. Lei, L. Lu and L. Chen , "Control System Integration for Dual Clutch
Transmissions Based on Modular Approach," Applied Mechanics and Materials, vol. 390,
pp. 419-423, 2013.
[17] C. Tseng and C. Yu, "Advanced shifting control of synchronizer mechanisms for
clutchless automatic manual transmission in an electric vehicle," Mechanism and
Machine Theory, vol. 84, pp. 37-56, February 2015.
[18] F. Mesmer, T. Szabo and K. Graichen, "Embedded Nonlinear Model Predictive Control
of Dual-Clutch Transmissions With Multiple Groups on a Shrinking Horizon," IEEE
Transactions on Control Systems Technology, vol. 27(5), pp. 2156-2168, September
2019.
[19] J. Kennedy and R. Eberhart, "Particle Swarm Optimization," Proceedings of ICNN'95 -
International Conference on Neural Networks, vol. 4, pp. 1942-1948, 1995.
[20] Y. Shi and R. Eberhart, "A modified particle swarm optimizer," in 1998 IEEE
International Conference on Evolutionary Computation Proceedings, 1998.
[21] Z. Wen and H. Sun, "Particle Swarm Optimization and its realization in MATLAB," in
MATLAB Intelligent Algorithm, 2017, pp. 108-144.
[22] R. Poli, J. Kennedy and T. Blackwell, "Particle swarm optimization," Swarm Intelligence,
vol. 1(1), pp. 33-57, 2007.
[23] J. Kennedy and R. C. Eberhart, "A discrete binary version of the particle swarm
algorithm," in 1997 IEEE International Conference on Systems, Man, and Cybernetics.
Computational Cybernetics and Simulation, 1997.
[24] M. Clerc and J. Kennedy, "The particle swarm—explosion, stability, and convergence in
a multidimen- sional complex space," IEEE Transactions on Evolutionary Computation,
vol. 6(1), pp. 58-73, February 2002.
[25] X. Liang, S. Dong, W. Long and X. Xiao, "PSO algorithm with dynamical inertial weight
vector and dimension mutation," Computer Engineering and Applications, vol. 47(5), pp.
29-31, 2011.
[26] S. Cheng, Y. Shi, Q. Qin and T. Ting, "Population Diversity Based Inertia Weight
Adaptation in Particle Swarm Optimization," in 2012 IEEE Fifth International
Conference on Advanced Computational Intelligence (ICACI), 2012.
[27] H. Zhang, Q. Cao, H. Gao, P. Wang, W. Zhang and N. Yousefi, "Optimum design of a
multi-form energy hub by applying particle swarm optimization," Journal of Cleaner
Production,, vol. 260, 01 July 2020.
[28] O. Bozorg-Haddad, H. A. Loáiciga and M. Solgi, "Particle Swarm Optimization," in
Meta‐Heuristic and Evolutionary Algorithms for Engineering Optimization, 2017, pp.
103-113.
32
33
APPENDIX A: GANTT CHART
34
APPENDIX B: RISK ANALYSIS
Problem Consequence Severity
(max 5) Solution
Modelling
Knowledge deficiency
for mathematic model
or getting stuck
1. Getting stuck
2. Further simulation
and analysis cannot
be continued
4
1. Discussion with
supervisor
2. Research
Simulation
No access to AMEsim
from KTH
Simulation more
slowly 2
1. Only simulation in
Simulink
2. Support from Charmers
or CEVT
Simulation result
doesn’t turnout as
anticipation
1. The model is not
valid
2. The model is
inaccurate
3
1. Discussion with
supervisor
2. Review from the
beginning and even
rework
Geometry optimization
Time is limited No optimization 1
1. It is not necessary but an
extra part better
included in thesis
2. Extend the thesis period
or terminate thesis
without optimization
Control system
Results from different
control algorithm do
not converge
2
1. Discuss about criterion
2. Presenting the best one
or two of them
35
APPENDIX C: SYSTEM SCHEMATIC DIAGRAM
36
APPENDIX D: CALIBRATION IN MATLAB
%% Calibration of relative initial phase % Qianyin % final report close all clear all clc; %% input global c r_sl test_t n_dog w_dog y_gap w_ig w_sl phi_ig phi_sl phi_gap phi_dog phi_c % number of dog teeth n_dog= ; % width of dog teeth w_dog= *1e-3; %mm - m % clearance c= *1e-3; %0.5mm-m % teeth chamber y_gap=2*w_dog+c; % sleeve radius r_sl=y_gap*n_dog/(2*pi); % corresponding angle phi_dog=w_dog/r_sl; phi_gap=y_gap/r_sl; phi_c=c/r_sl; % c=y_gap-2*w_dog;% y_gap=2*pi*r_sl/n_dog; % ------------Random input signal created----------------- % in practical testing, AS and two velocity signals are feedback signals. IPD=rand(1)*2*pi; dt=10e-3; % 1ms test_t=0:dt:60; %60s w_ig=ones(size(test_t))*(6/60*2*pi); % 1600RPM-rad/s, actually it is from transducer w_sl=ones(size(test_t))*(10/60*2*pi); % 1000RPM-rad/s, actually it is from transducer phi_ig=zeros(size(test_t)); phi_sl=zeros(size(test_t)); for t=1:length(test_t)-1 % analystical integral % displacement phi_ig(t+1)= phi_ig(t)+dt*(w_ig(t+1)+w_ig(t)/2); phi_sl(t+1)= phi_sl(t)+dt*(w_sl(t+1)+w_sl(t)/2); end % position phi_ig_total=phi_ig; phi_sl_total=phi_sl+IPD; % actuator signal AS=estimation(phi_ig_total,phi_sl_total,phi_c,phi_dog,phi_gap); % ------------------------------------------------------ %% Direct Comparison % for elements d_an=30; [IPDR_dc,iter_dc]=ip_dc(AS,IPD,d_an); %% PSO max_iter=100;
37
min_error=1e-6; %J_min=0; w_max=1.3; w_min=0.7; [IPDR_pso,iter_pso]=ip_pso_ad(AS,max_iter,min_error,w_max,w_min,IPD); % w=0.6;[IPDR_pso,iter_pso]=ip_pso(AS,max_iter,min_error,w,IPD);
38
APPENDIX E: ESTIMATION IN MATLAB
%% Estimation (Control Signal) % Qianyin % final report function CS=estimation(phi_ig_total,phi_sl_total,phi_c,phi_dog,phi_gap) phi_ig_c= mod(phi_ig_total,phi_gap); phi_sl_c= mod(phi_sl_total,phi_gap); for i=1:length(phi_ig_total) if phi_dog<=abs(phi_ig_c(i)-phi_sl_c(i)) && abs(phi_ig_c(i)-phi_sl_c(i))<=(phi_dog+phi_c) CS(i)=1; else CS(i)=0; end end end
39
APPENDIX F: DIRECT COMPARISON IN MATLAB
%% Algorithm 1 Direct Comparison % for Calibration of relative initial phase % Qianyin function [IPDR,i]=ip_dc(AS,IPD,n) global c r_sl test_t n_dog w_dog y_gap w_ig w_sl phi_ig phi_sl phi_gap phi_dog phi_c phi_ig_c= mod(phi_ig,phi_gap); range=0 : phi_gap/n :phi_gap ; IPDR =0 : phi_gap/n :phi_gap ; IPDR=IPDR(1:end-1); range=range(1:end-1); figure plot(ones(size(range)).*(-test_t(10)),range,'o'); hold on for i=1:length(test_t) clear phi_sl_new ERI phi_sl_c_new; for j=1:length(IPDR) phi_sl_new(j)= IPDR(j)+phi_sl(i); phi_sl_c_new(j)= mod(phi_sl_new(j),phi_gap); % new estimation signal ERT if phi_dog<=abs(phi_ig_c(i)-phi_sl_c_new(j)) && abs(phi_ig_c(i)-phi_sl_c_new(j))<=(phi_dog+phi_c) ERI(j)=1; else ERI(j)=0; end % compare ERI & ER % if ERT doesn't equal to ER, remove the corresponding IPDR and % exit this loop of time, continue with the next IPDR if ERI(j) ~= AS(i) IPDR(j)=NaN; continue %jump to next moment end end dj=isnan(IPDR); IPDR(dj)=[]; % when there is only one answer, quit the loop if length(IPDR)==1 break else if isempty(IPDR) break else plot(ones(size(IPDR))*test_t(i),IPDR,'o','linewidth',2); end end end xl=get(gca,'xlim');
40
yl=get(gca,'ylim'); plot(xl, [1,1]*IPD); plot(xl, [1,1]* mod(IPD, phi_gap)); plot(xl, [1,1]* phi_gap); plot([1,1]*test_t(i),yl); if isempty(IPDR) text(sum(xl)/2,sum(yl)/2, 'NO Solution','Fontsize',20,'FontWeight','bold' ,'horizontalalignment','center','verticalalignment','middle'); else plot(test_t(i),IPDR,'*','linewidth',2); txt= {[' iter: ' num2str(i)], ... [' result: ' num2str(IPDR,'%0.3f')]}; text(test_t(i),IPDR, txt, 'horizontalalignment','left','verticalalignment','top'); end hold off text(test_t(i+25),phi_gap, 'phi\_gap', 'horizontalalignment','right','verticalalignment','middle'); text(test_t(i+25),mod(IPD,phi_gap),['mod(IP,phi\_gap) = ' num2str(mod(IPD,phi_gap))],'verticalalignment','bottom','horizontalalignment','right'); text(test_t(i+25),IPD,['random IP = ' num2str(IPD)],'verticalalignment','middle','horizontalalignment','right'); grid; title('Direct Comparison'); xlim([-test_t(15) test_t(i+25)]); ylim([0,1.2]); saveas(gcf,'ResultsFigures/InitialPhaseComparison.jpg'); end
41
APPENDIX G: PSO IN MATLAB
%% Algorithm 2 Particle Swarm Optimization % for Calibration of relative initial phase % with adaptive inertia weight % Qianyin function [best_g,iter]=ip_pso_ad(AS,max_iter,min_error,w_max,w_min,IPD) global c r_sl test_t n_dog w_dog y_gap w_ig w_sl phi_ig phi_sl phi_gap phi_dog phi_c % PSO parameters c1=2; c2=2; Dim=1; % only one dimension refering to initial angle SwarmSize=30; Vmax=1; Vmin=-1; Ub=phi_gap; Lb=0; % initialization % swarm range=Ub-Lb; Swarm=rand(SwarmSize,Dim).*range+Lb; % velocity VStep=rand(SwarmSize,Dim)*(Vmax-Vmin)+Vmax; % fitness (adaptive value) fSwarm=zeros(SwarmSize,1); for i=1:SwarmSize fSwarm(i,:)=ipd_pso(Swarm(i,:),AS,phi_ig,phi_sl,phi_c,phi_dog,phi_gap); end % global best [bestf, bestindex]=min(fSwarm); bestf_g=bestf; % fitness best_g=Swarm(bestindex,:); % swarm % best for each swarm best_s=Swarm; % swarm bestf_s=fSwarm; % fitness % iteration iter=0; y_fitness=zeros(1,max_iter); IPDR=zeros(1,max_iter); while (iter<max_iter) && (bestf_g>min_error) % within the iteration, quit while-loop once fitness<MinFit f_ave=sum(fSwarm)/SwarmSize; f_min=min(fSwarm); for j=1:SwarmSize if fSwarm(j)<=f_ave w=w_min+(fSwarm(j)-f_min)*(w_max-w_min)/(f_ave-f_min); else w=w_max; end % velocity VStep(j,:)=w*VStep(j,:)+c1*rand*(best_s(j,:)-Swarm(j,:)) +c2*rand*(best_g-Swarm(j,:)); % velocity range if VStep(j,:)>Vmax, VStep(j,:)=Vmax; end
42
if VStep(j,:)<Vmin, VStep(j,:)=Vmin; end % new position - new swarm Swarm(j,:)=Swarm(j,:)+VStep(j,:); % swarm range for k=1:Dim if Swarm(j,k)>Ub(k),Swarm(j,k)=Ub(k);end if Swarm(j,k)<Lb(k),Swarm(j,k)=Lb(k);end end % fitness fSwarm(j,:)=ipd_pso(Swarm(j,:),AS,phi_ig,phi_sl,phi_c,phi_dog,phi_gap); % record the best of each swarm if fSwarm(j)<bestf_s(j) bestf_s(j)=fSwarm(j); best_s(j,:)=Swarm(j,:); end % update the global best value when the better exist if fSwarm(j)<bestf_g bestf_g=fSwarm(j); best_g=Swarm(j,:); end end %(j for-loop) iter=iter+1; % record the best in each iteration y_fitness(1,iter)=bestf_g; IPDR(1,iter)=best_g; end % plotting figure subplot(2,1,1); plot(y_fitness,'linewidth',2); hold on yl=get(gca,'YLim'); plot([1,1]*iter,yl,'black--'); hold off title('The Best Fitness','Fontsize',10); text(iter,(sum(yl)/2),['iter = ' num2str(iter)]); xlabel('Iteration','Fontsize',10); ylabel('Value','Fontsize',10); set(gca,'Fontsize',10); grid on subplot(2,1,2); plot(IPDR,'linewidth',2); hold on plot(iter,IPDR(iter),'*','linewidth',2); xl=get(gca,'XLim'); yl=[1,1]* mod(IPD,phi_gap); plot(xl,yl,'black--'); yl=[1,1]* IPD; plot(xl,yl,'black--'); hold off text(iter,IPDR(iter),num2str(IPDR(iter)),'verticalalignment','bottom','horizontalalignment','center'); text(max_iter,mod(IPD,phi_gap),['mod(IP,phi\_gap) = ' num2str(mod(IPD,phi_gap))],'verticalalignment','bottom','horizontalalignment','right'); text(max_iter,IPD,['random IP = ' num2str(IPD)],'verticalalignment','middle','horizontalalignment','right'); title('Relative Initial Phase','Fontsize',10); xlabel('Iteration','Fontsize',10);
43
ylabel('Value','Fontsize',10); set(gca,'Fontsize',10); grid on suptitle('Particle Swarm Optimization'); saveas(gcf,'ResultsFigures/InitialPhasePSO.jpg'); end %% Fitness Calculation function BsJ=ipd_pso(IPDR,AS,phi_ig,phi_sl,phi_c,phi_dog,phi_gap) phi_ig_c= mod(phi_ig,phi_gap); for j=1:1:length(AS) phi_sl_new(j)= IPDR+phi_sl(j); phi_sl_c_new(j)= mod(phi_sl_new(j),phi_gap); % new estimation signal ERT if phi_dog<=abs(phi_ig_c(j)-phi_sl_c_new(j)) && abs(phi_ig_c(j)-phi_sl_c_new(j))<=(phi_dog+phi_c) ER(j)=1; else ER(j)=0; end error(j)=AS(j)-ER(j); BsJ=sum(abs(error)); end end