+ All Categories
Home > Documents > Ageing of an oscillator due to frequency switching in ...

Ageing of an oscillator due to frequency switching in ...

Date post: 10-Feb-2022
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
53
Treball Final del Grau en Enginyeria F´ ısica Ageing of an oscillator due to frequency switching in physical systems Lavinia Beatrice Hriscu Codirectors : Mike R. Jeffrey Josep M. Olm University of Bristol June 2021
Transcript
Page 1: Ageing of an oscillator due to frequency switching in ...

Treball Final del Grau en Enginyeria Fısica

Ageing of an oscillator due tofrequency switching in physical

systems

Lavinia Beatrice Hriscu

Codirectors :

Mike R. Jeffrey

Josep M. Olm

University of BristolJune 2021

Page 2: Ageing of an oscillator due to frequency switching in ...

Acknowledgements

I wish to acknowledge the help provided by Dr. Mike R. Jeffrey whohas supervised this project. I am particularly grateful for the welcome Ihave received and his willingness to work in person, even taking into accountthe difficulties dute to the pandemic. I would like to thank him for all theknowledge provided and the time dedicated to this project. It is thanks tohim that I have been able to obtain these results.

I would also like to offer my special thanks to Dr. Josep M. Olm, thesecond superviser of the project. Not only because he offered me the possi-bility to carry out this project abroad but also because he helped me a lot,especially with the last stage of the work.

Finally, I would like to thank my family who encouraged me to live thisexperience and have supported me in everything I have done.

1

Page 3: Ageing of an oscillator due to frequency switching in ...

Abstract

The control action governing an oscillator may have discontinuities thatproduce a switching between two frequencies as demonstrated in [1], wherea piecewise smooth system is written in a linear and nonlinear form. Thesliding mode control theory was created to provide an explanation for thistype of system. The aim of this research is to see how the function used inthe regularisation of the system affects its long-term behaviour, especiallywith regard to sliding and ageing behaviour. In particular, it is investigatedwhat kind of system is obtained when a relay function is applied to a realsystem, whether a dynamic predicted by Filippov, Utkin or a new one notpredicted before.

To analyse how the system reacts to different switching, two regularisationfunctions have been used: tanh (kx) and a relay (hysteresis) of amplitude ε.Besides, a step has been implemented as an ideal discontinuous switching.These functions were applied to both linear and nonlinear systems. Theresults showed that for tanh (kx) the expected trajectories are obtained, whilefor the step and the relay, a new dynamics very sensitive to ε and the dampingfactor a appeared.

In addition, the outcome of the physical system matches the mathematicalmodel, indicating that this behaviour can be seen in electronic controllers orother real systems.

2

Page 4: Ageing of an oscillator due to frequency switching in ...

Contents

1 Introduction 4

2 Basic concepts of sliding mode control 5

3 One dimensional oscillator 103.1 Preliminaries: dynamics of the piecewise-smooth system . . . 103.2 Periodic solutions in the piecewise-smooth system . . . . . . . 12

3.2.1 Linear switching . . . . . . . . . . . . . . . . . . . . . 123.2.2 Nonlinear switching . . . . . . . . . . . . . . . . . . . . 13

3.3 Dynamics of a regularised system . . . . . . . . . . . . . . . . 143.3.1 Regularisation fo the linear system . . . . . . . . . . . 163.3.2 Regularisation of the nonlinear switching system . . . . 18

4 Numerical validation 194.1 Linear regularised system . . . . . . . . . . . . . . . . . . . . . 194.2 Nonlinear regularised system . . . . . . . . . . . . . . . . . . . 19

5 Relay circuit: mathematical model 21

6 Relay circuit: physical model 336.1 RL circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.2 RC circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7 Conclusions 37

References 38

Appendix 39

3

Page 5: Ageing of an oscillator due to frequency switching in ...

1 Introduction

Sliding mode control theory was developed to explain how piecewise smoothsystems that have a discontinuous control function evolve around the discon-tinuity and also in it. The first order oscillator proposed in [1] appears tofollow a simple dynamic when the equations are written in a linear form.However, this behaviour does not resemble the one obtained with the nonlin-ear model. Whether the system could be implemented in reality and whichtype of dynamics would follow remain as a question that is intended to beanswered in this research.

First of all, the basic concepts of sliding mode control are introduced inSection 2. After that, the main results of the one dimensional oscillatorpresented in [1] are exposed in Section 3.

A linear regularisation function tanh (kx) is used in Section 4.1 to validatethe results obtained in [1]. In the same way, that function is applied to thenonlinear system (Section 4.2), giving the results expected. However, whenthe function implemented to model the discontinuity is a step or a relay(hysteresis), a new dynamics appear.

The relay switching is developed in detail from there. The resemblancebetween the step and the relay is observed in Section 5. The entire sectionis devoted to describing the dynamics obtained with the relay as a functionof two different parameters: the relay amplitude ε and the damping factor ofthe system a. How the trajectories evolve as a function of these parameterswill be analysed separately by finding bifurcation diagrams that will indicatenew dynamics specific to the relay. The existence of orbits tending to beperiodic will remain.

The most important question will be answered in Section 6, where wewill see that the physical and mathematical systems coincide as long as therelationship between the equations is taken into account. The real-life imple-mentation is achieved with two different circuits: an RL (Section 6.1) and anRC (Section 6.2). We show that even if the first one gives the same resultsas the mathematical model, it is not achievable in reality. Nevertheless, theRC circuit shows also the same behaviour and it is practical.

4

Page 6: Ageing of an oscillator due to frequency switching in ...

2 Basic concepts of sliding mode control

The information of this section about sliding mode control has been ex-tracted from [2, 3, 4, 5, 6], to which the reader is directed for further analysis.

Differential equations are the mathematical tool to represent control sys-tems. Frequently these systems have discontinuous right-hand sides, whosediscontinuities are given by the current state of the process. A generic wayto describe this type of dynamic system can be:

x = f(x, t, u), u ∈ Rm (2.1)

where the state vector is x ∈ Rn, f ∈ Rn, t denotes time, and u is thediscontinuous control state function.

Often the discontinuity points are neither isolated nor zero. This enablesa whole mathematical theory to describe the behaviour of systems aroundsuch points, the so-called sliding mode control theory. Discontinuity pointscan be considered as belonging to a discontinuity surface, which can varyover time such as:

s(x, t) = 0. (2.2)

In terms of historical context, going back to the late fifties in the USSR,sliding modes became the major mode of operation in the so-called VariableStructure Systems (VSS). They appear in problems of different but relatedareas, such as mathematics, physics and control engineering. VSS can bedefined as dynamic systems of the form (2.1) where f(x, t, u) has discontinu-ities. The basic idea is that the variable structure system is built around aset of continuous subsystems called structures that may switch because of adiscontinuous control.

The discontinuous control function can be generally described by:

u(x, t) =

{u+(x, t), s(x, t) > 0u−(x, t), s(x, t) < 0,

(2.3)

where both functions u+(x, t) and u−(x, t) are continuous. u(x, t) can beconsidered as u = u0sign(e) where u0 is a constant, and e is the trackingerror of a reference input e = r(t) − x. With reference to (2.3), the error ecorresponds to a discontinuity function s(x, t). Therefore, the discontinuitymanifold corresponds to e equal to zero.

5

Page 7: Ageing of an oscillator due to frequency switching in ...

Sliding modes arise when the system is directed to the discontinuity fromeither side of it, thereby causing the control action to switch at high (theo-retically infinite) frequency. This fast switching is translated into a motionalong the sliding manifold. For a sliding mode to exist on a discontinuitysurface, the following condition has to be fulfilled:

lims→−0

s > 0 and lims→+0

s < 0 (2.4)

which means that the discontinuity function and its velocity along thesystem trajectories have opposite signs.

The system dynamics on the sliding manifold, the so-called sliding dy-namics, can be found by two different procedures: the convex method ofFilippov, and the equivalent control method of Utkin. If the system is linearwith respect to the control, these two approaches coincide, but they differ inthe nonlinear case.

If for a piecewise smooth system (PSS) as (2.1) two different functions f+

and f− can be associated to one point x of a boundary surface, the systemis said to be discontinuous or, from now on, a Filippov system. When theorthogonal components of f+ and f− with respect to the tangent space ofs = 0 have the same sign, the trajectory will cross the boundary surface. Incontrast, if they have opposite sign, the trajectory is forced to slide on thisboundary.

Let us consider a generic planar Filippov system, with only two differentregions Si such as:

x =

{f1(x), x ∈ S1

f2(x), x ∈ S2(2.5)

The discontinuity boundary that separates the two regions is defined as:

S = {x ∈ R2 : H(x) = 0},

where H is a smooth scalar function with nonvanishing gradient Hx(x) on S,and the regions S1 and S2 correspond to:

S1 = {x ∈ R2 : H(x) < 0},S2 = {x ∈ R2 : H(x) > 0}.

(2.6)

so that Rn = S1 ∪ S ∪ S2, f1 6= f2 and the boundary is either closed or goesto infinity in both directions.

6

Page 8: Ageing of an oscillator due to frequency switching in ...

For x /∈ S, the solution of (2.5) is found as a regular differential equation.The question is what happens on S. Hx(x) is also the unit normal vector toS, then the study is focused on those x ∈ S that fulfill the condition:

Hx(x)f1(x) > 0 and Hx(x)f2(x) < 0, (2.7)

which corresponds to attractive sliding motion on S and is equivalent to(2.4). If the condition is not fulfilled, the sliding segment is not going tobe stable, therefore sliding motion will not occur. Filippov suggests a newfunction fF (x) on S such as:

x =

f(1)(x), H(x) < 0fF (x), H(x) = 0,f(2)(x), H(x) > 0

(2.8)

where fF (x) is found within the convex hull co(f1, f2) of f1, f2, i.e.:

fF (x) = [λf2(x) + (1− λ)f1(x)], x ∈ S (2.9)

and λ ∈ [0, 1] is:

λ(x) =Hx(x)f1(x)

Hx(x)(f1(x)− f2(x)), x ∈ S (2.10)

which is chosen so that at nonisolated points Hx(x)fF (x) = 0. Therefore, fFis the vector on co(f1, f2) which is tangent to S as it can be seen in Figure 1.

Figure 1: Filippov’s method

Filippov’s scheme was considered natural for control devices with smallimperfections, such as delay or hysteresis. It can be physically interpreted as

7

Page 9: Ageing of an oscillator due to frequency switching in ...

a regularisation method in which the control function takes only two extremevalues, with scalar control and one discontinuity surface.

In real-life implementations and because of defects in devices (small delays,dead zones, hysteresis loops, etc.), the control function either switches at highfrequency or takes intermediate values in continuous approximations of therelay function.

Discontinuity points of (2.1) and (2.3) can be isolated in time if all theimperfections that bring uncertainty in the system are considered. The mostcommon approach to do so, is the use of a regularisation technique thatconsists in introducing a boundary layer ||s|| < ∆ around s = 0, i.e. the dis-continuity surface. When dealing with real systems, the ideal discontinuouscontrol u is replaced by a real one u, and the trajectories that slide in theideal system will move within the boundary layer with a finite-frequency, theso-called chattering phenomenon (see Figure 2). If there exists one uniquesolution for the system with u = u, and it neither depends on what kindof imperfections the device has, nor the way to tend ∆ to zero, i.e. it’sindependent of the way the following limit is done:

lim∆→0

x(t,∆) = x∗(t) (2.11)

then, the function x∗(t) is taken as the solution of the ideal sliding dynamics.

Figure 2: Chattering phenomenon within the switching boundary layer.

Regularisation leads the system to be redefined in terms of new fast vari-ables. Slow-fast systems will be explained in more detail in Section 3.3.

Utkin’s equivalent control method is defined for a PSS as (2.1) with acontrol running from u+ to u− as in Figure 3. Since sliding motion appearswhen s(x) = 0, ds

dt= s = 0, this condition can be expressed as:

8

Page 10: Ageing of an oscillator due to frequency switching in ...

s = Gf(x, t, u) = 0, (2.12)

where G = ( ∂s∂x

) is the gradient of the function s(x). If we assume thatthere is at least one solution for (2.12), the equivalent control ueq(x, t) canbe deduced from there and substituted into (2.1):

x = f [x, t, ueq(x, t)]. (2.13)

The sliding mode equation that describes the motion in the discontinuitysurface s(x) = 0 is obtained from ueq. The basic principle of the methodis that a control which is discontinuous on a surface can be replaced by acontinuous control. The latter will direct the velocity vector in the systemstate space along the discontinuity surfaces intersection.

We can apply Utkin’s method to affine systems, i.e. nonlinear systemswhose right-hand sides are a linear function of the control:

x = f(x, t) +B(x, t)u, (2.14)

where f(x, t) is a continuous vector, B(x, t) a continuous matrix of dimen-sion (n × 1) and (n × m), respectively, and u is a discontinuous control inaccordance with (2.3). From (2.14), the equivalent control has to fufill:

s = Gf +GBu = 0. (2.15)

Considering that GB is nonsingular for all x and t, ueq proceeds to be:

ueq(x, t) = −[G(x)B(x, t)]−1G(x)f(x, t). (2.16)

Thus yielding the following sliding mode equation on the manifold s = 0:

x = f −B(GB)−1Gf. (2.17)

As said before, fF from Filippov and f(x, t, ueq) from Utkin are equivalentif the system is linear with respect to control. For this case, the locus f(x, t, u)of the equivalent control method is equal to a minimal convex set of Filippov’smethod (the straight line connecting f1 and f2 in (1)). Utkin’s method canbe applied to systems that are nonlinear with respect to the control but thenthe outcome will differ from the one of Filippov’s method.

9

Page 11: Ageing of an oscillator due to frequency switching in ...

Figure 3: Utkin’s equivalent control method for nonlinear systems with scalarcontrol.

Attempts to show which method fulfills accurately (2.11) have failed be-cause the sliding mode equations obtained from the limit method do dependon the way of tending them to zero. Filippov’s equation matches the slidingmode for relay systems with delay or hysteresis, while Utkin’s coincides withthe one from a piecewise smooth continuous approximation of a discontinuousfunction.

3 One dimensional oscillator

3.1 Preliminaries: dynamics of the piecewise-smoothsystem

All the results of this section have been extracted from [1], to which thereader is directed for further analysis.

Let us consider an autonomous piecewise-smooth system as:

x = 1,

y = −ay − fi(x, λ),(3.1)

where a > 0. λ is a discontinuous quantity λ = sign(y), which is calledswitching multiplier. The sign function takes defined values +1 for y > 0 and−1 for y < 0, whereas λ ∈ (−1,+1) for y = 0. The function fi corresponds

10

Page 12: Ageing of an oscillator due to frequency switching in ...

to sin (πωt), which can be expressed in terms of λ as:

sin (πωt) =1

2(1 + λ) sin (πω+t) +

1

2(1− λ) sin (πω−t), (3.2a)

sin (πωt) = sin

({(1 + λ)ω+ + (1− λ)ω−}

πt

2

), (3.2b)

Function (3.2a) corresponds to a linear switching, since it switches betweentwo sinusoids with different frequencies. Instead, function (3.2b) refers to anonlinear switch, because the discontinuity is placed directly in the frequencyof the sinusoid. The dynamics associated to those two expressions are onlydifferent at y = 0. One can now define ω = ω+ = 3

2for y > 0 and ω = ω− = 1

2

for y < 0. Let S± denote the upper and lower half-planes of (x, y) ∈ R2, i.e

S± = {(x, y) ∈ R2 : ±y > 0}, (3.3)

so that the boundary or switching manifold between them is denoted as:

S0 = {(x, y) ∈ R2 : y = 0}. (3.4)

The regions of S± in which the vector fields are tangent to S0 correspondto y = y = 0. They can be written as:

T+ = {(x, y) ∈ S0 : x =2n

3},

T− = {(x, y) ∈ S0 : x = 2n},(3.5)

such that y = sin (πω+x) = 0 on T+ and y = sin (πω−x) = 0 on T−.The set of points of S0 where the vector field propagates such as y = y = 0

form a sliding manifold. Therefore, sliding modes are the solutions thatevolve along a sliding manifold. The behaviour in these sets depends onwhether fi takes the form of (3.2a) or (3.2b).

The sliding manifolds of interest are the attracting ones, which fulfill thecondition ∂y

∂λ< 0. From now on, ΛL and ΛN will stand for linear and nonlinear

attracting sliding manifolds, respectively.A periodic solution of (3.1) is said to be a sliding periodic orbit if part of

it lies on the sliding manifold ΛN or ΛL, if not, it is a non-sliding periodicorbit.

11

Page 13: Ageing of an oscillator due to frequency switching in ...

3.2 Periodic solutions in the piecewise-smooth system

3.2.1 Linear switching

The linear expression of the forcing fi in (3.2a) can be written as:

fL(x, λ) = [1 + (1 + λ) cosπx] sinπx

2(3.6)

which by substitution in (3.1) gives:

x = 1,

y = −ay − [1 + (1 + λ) cosπx] sinπx

2],

(3.7)

with λ = sign(y) in S± and λ ∈ (−1, 1) in S0. From y = y = 0 it can bededuced that sliding occurs in intervals on S0 where x fulfills:

[1 + (1 + λ) cosπx] sinπx

2= 0 for λ ∈ (−1, 1)

Isolated solution points in which x = 2n are not considered since they donot give motion along S0. Therefore, for sin πx

26= 0, sliding is found where:

x ∈ (2

3+ 2n,

4

3+ 2n), n ∈ N.

Notice that this includes, the attractive sliding manifold ΛL, which isdefined as:

ΛL := ∪n∈NS0A + {(4n, 0)}

= ∪n∈N{(x, y) : y = 0, x ∈(

8

3+ 4n,

10

3+ 4n

)}.

(3.8)

Any solution through a point x ∈ (83

+ 4n, 103

+ 4n) ⊂ ΛL will slide andexit the switching manifold through the point (10

3+ 4n, 0).

Theorem 1 There exists al ∈ R+, al � 1, such that for all a ∈ (0, al) sys-tem (3.7) has a non-sliding periodic solution, which is 4-periodic and locallyasymptotically stable.

Theorem 2 There exists ah ∈ R+, al � 1, such that for all a ∈ (ah,+∞)system (3.7) has a 4-periodic solution. Moreover, for every a ∈ (ah,+∞)there exists ν(a) ∈ R+ such that solutions y(x, xi) of (3.1), with xi ∈ (8

3, 10

3)∪

(103, 10

3+ ν(a)), converge in finite time to the periodic solution y(x, 10

3).

12

Page 14: Ageing of an oscillator due to frequency switching in ...

Figure 4: Period 4 orbits of the linear switching system, showing: a non-sliding orbit for a = 0.01 (full curve), an orbit with a small segment ofsliding for a = 0.1 (dashed curve), and a sliding orbit for a = 10 (dottedcurve, vertical scale multiplied by 1/2 for clarity).

3.2.2 Nonlinear switching

The nonlinear expression of the forcing fi (3.2b) can be written as:

fN(x, λ) = sin (πx(1 +1

2λ)), (3.9)

and by substitution in (3.1) we obtain:

x = 1, (3.10a)

y = −ay − sin (πx(1 +1

2λ)), (3.10b)

with λ = sign(y) in S± and λ ∈ (−1, 1) in S0. Sliding time intervals can bededuced from (3.10b) using y = y = 0:

sin [πx(1 +1

2λ)] = 0, λ ∈ (−1, 1) < 1.

from where we obtain:

x ∈ (2n

3, 2n) for n ∈ N\{0}.

The sliding sets ΛNn and ΛN are those of the previous formula with ∂y

∂λ< 0,

taking n = 2k, k ≥ 1. The sliding manifold ΛN is defined as:

13

Page 15: Ageing of an oscillator due to frequency switching in ...

ΛN := ∪n∈NΛNn = ∪n∈N{(x, y) : y = 0, x ∈

(4n

3, 4n

)}. (3.11)

One difference between ΛL and ΛN is that the latter has no disjoint sets,so that one point p ∈ ΛN can belong in general to several sliding segmentsΛNn with different n.Sliding occurs for x ∈ (4n

3, 4n) regardless of the kind of sliding manifold

(attractive, repelling). The switching manifold of (3.11) depends on n insuch way that a trajectory evolves on a specific manifold sliding a maximumdistance in x of:

∆x(n) = 4n− 4n

3=

8n

3.

This result shows ageing in the system, since the later a solution hits thesliding surface, the longer it will slide. In contrast, for the linear case (3.8),all the sliding intervals have a constant length of 2

3.

Theorem 3 System (3.10a) does not have non-sliding periodic solutions

Theorem 4 For all a ∈ R+, there exists xa ∈ (2, 4) such that system (3.10ahas a unique sliding 4-periodic solution, yd(x), which lies in S− and satisfies:

yd (x) < 0, x ∈ (4n, 4n+ xa) , (3.12a)

yd (x) = 0, x ∈ {0} ∪ [4n+ xa, 4(n+ 1)] , n ∈ N. (3.12b)

Theorem 5 For all a ∈ R+, all solutions starting in S+ have their evolutionsconstrained in S− for all x large enough. Moreover, they overlap with theperiodic solution yd(x) for x ≥ 4n, with n ∈ N.

3.3 Dynamics of a regularised system

In order to characterize clearly the dynamics along the switching mani-fold, the discontinuity has to be regularised. This is done by introducing aboundary layer of width order ε > 0, such as S0 and S± are now defined by:

14

Page 16: Ageing of an oscillator due to frequency switching in ...

Figure 5: Orbits of the nonlinear switching system, showing: a period 4sliding solution (full curve, as described by Theorem 4) and a solution at-tracted onto it infinite time (dashed curve, as described by Theorem 5). Allsimulated for a = 0.5.

Sε0 := {(x, y) ∈ R2 : −ε < y < ε}. (3.13)

Sε± := {(x, y) ∈ R2 : ±y ≥ ε}. (3.14)

The switching multiplier λ = sign(y) is replaced by a transition functionψ(y

ε) that has to fulfill certain properties:

ψ′(yε

)> 0 for |y| < ε, (3.15a)

ψ(yε

)= sign(y) for |y| ≥ ε, (3.15b)

sign(ψ′′(yε

))= −sign(y) for |y| = ε, (3.15c)

from which it follows that |ψ(yε

)| < 1 for | y |< ε and ψ′

(yε

)= 0 for |y| ≥ ε.

In this way, (3.1) can be rewritten in terms of a fast variable v = yε:

x = 1,

εv = −aεv − fi(x, ψ(v)),(3.16)

Since now the system is in fast motion variables, the fast time variable isτ = t

εand its time derivative is x′ ≡ εx, yielding the fast subsystem:

15

Page 17: Ageing of an oscillator due to frequency switching in ...

x′ = ε,

v′ = −aεv − fi(x, ψ(v)),(3.17)

The limit ε→ 0 gives:

x′ = 0,

v′ = −fi(x, ψ(v)).(3.18)

leading the fast dynamics outside the slow critical manifold along the v di-rection, parametrized by x, to be as:

Λi0 = {(x, v) : fi(x, ψ(v)) = 0, | v |< 1}, (3.19)

that is equivalent to the sliding manifold Λi of the discontinuous system.

3.3.1 Regularisation fo the linear system

Replace λ→ ψ(yε) into (3.7) to obtain:

x = 1,

εv = −aεv − [1 + (1 + ψ(v)) cosπx] sinπx

2.

(3.20)

From (3.19) the critical manifolds are defined by:

[1 + (1 + ψ(v)) cosπx] sinπx

2= 0, | v |< 1. (3.21)

so that,

x ∈ (2

3+ 2n,

4

3+ 2n), n ∈ N. (3.22)

The critical manifolds of (3.20) are therefore described in the limit ε→ 0by:

ΛL0 := {(x, v) ∈ V0 : ψ(v) = −1− sec πx, x ∈ (

2

3+ 2n,

4

3+ 2n), n ∈ N}.

(3.23)

Theorem 6 For all a, ε ∈ R such that 0 < a � 1 and 0 < ε � 1, system(3.20) has a non-sliding periodic solution, which is 4-periodic and locallyasymptotically stable.

16

Page 18: Ageing of an oscillator due to frequency switching in ...

Theorem 7 For all a, ε > 0 such that a � 1 and ε � 1, system (3.20) hasa sliding 4-periodic solution. Such a solution is locally asymptotically stable,with Lipschitz constant exponentially small in ε.

Figure 6: Linear regularization, showing a non-sliding period 4 solution (fullcurve) for a = 0.01 passing through the point (x0, y0) = (0, 0.42), and asliding period 4 solution (dotted curve) for a = 2 passing through the point(x0, v0) = (−2

3, 0.0019); both simulated from (3.20) with ε = 0.0025. The

lower panels are magnifications of the switching layer, showing the solutionpassing through the layer, and in the latter case evolving close to the criticalmanifold ΛL

0 .

17

Page 19: Ageing of an oscillator due to frequency switching in ...

3.3.2 Regularisation of the nonlinear switching system

In the same way, substituting λ→ ψ(yε) in (3.10a) yields:

x = 1,

εv = −aεv − sin (πx[1 +1

2ψ(v)]).

(3.24)

From above, the critical manifolds are defined by:

sin (πx[1 +1

2ψ(v)]) = 0, | v |< 1. (3.25)

In the limit ε = 0, the critical manifolds are given by:

ΛN0,n := {(x, v) ∈ V0 : ψ(v) = 2(

n

x− 1), x ∈ (

2n

3, 2n), n ∈ N\{0}. (3.26)

The qualitative dynamics of the regularised linear system is the same asfor the ideal one, for both sliding and non sliding periodic solutions. Theexact period 4 solution of the nonlinear ideal system is transformed underregularisation to an orbit asymptotically approaching period 4. Ageing per-sists for the nonlinear regularised system, such that branches of the slidingmanifold not only increase in length with x but do not overlap, so the systemis not periodic inside the layer V0 and fully periodic orbits are impossible.

Figure 7: Nonlinear regularisation, showing the switching layer V0 and thecritical manifolds inside it, with repelling branches (dashed) and attractingbranches (full), for n = 1, 2...10. Arrows indicate the direction of the vectorfields in S±.

18

Page 20: Ageing of an oscillator due to frequency switching in ...

4 Numerical validation

4.1 Linear regularised system

The switching multiplier λ can be regularised using the function ψ(x) =tanh (kx), where the bigger is k the more the function resembles an idealswitching. Orbits in Figure 8 confirm the statements exposed in Theorems 1and 2.

Figure 8: Trajectories for ψ(x) = tanh (kx) with k = 300, showing a non-sliding period 4 solution for a = 0.01, and a sliding period 4 solution fora = 0.5 and a = 2.

4.2 Nonlinear regularised system

In the same way, the discontinuity can be regularised taking λ as ψ(x) =tanh (kx). Trajectories shown in Figure 9 are consistent with (3.26), becausesolutions hitting y = 0 at x = 2n

3exit the sliding surface at x = 2n. Besides,

orbits evolve constrained in the lower half-plane as predicted in Theorem 5.

19

Page 21: Ageing of an oscillator due to frequency switching in ...

Figure 9: Orbits of the nonlinear regularised system for a transition functionψ = tanh(kx) with k = 300 and a= 2, showing an ageing behaviour accordingto (3.26).

To represent the discontinuity at y = 0 a step function can be used,which corresponds to an ideal discontinuous commutation. A regularisedsystem can be implemented by using a relay (hysteresis) of amplitude ε. Thesmaller the epsilon, the more the relay should resemble an ideal dynamics.Whether this happens or not will be discussed later, but a first look at thesetwo implementations is shown in Figure 10.

The trajectories for both the step and the relay neither agree with Theo-rem 5 nor show the expected ageing. This discrepancy may be related to thefact that none of the two functions fulfill the properties required in (3.15c) tobe a transition function. This suggests a completely different behaviour forthis two functions, and also that they are related in some way, that is why inthe next sections the nonlinear model regularised by using a relay functionis developed in more detail.

20

Page 22: Ageing of an oscillator due to frequency switching in ...

Figure 10: Orbits of the nonlinear system with a = 2 for a step and a relayfunctions as switchings. Two different amplitudes of the relay are shown:ε = 0.1 and ε = 0.001. The blue and red curves resemble the blue curve inFigure 8, validating the concept of step as an ideal discontinuity.

5 Relay circuit: mathematical model

The code used for this section as well as the linear and nonlinear circuitscan be found in the Appendix

As observed in Figure 10, the dynamics of the relay approaches the dy-namics of the step function as ε→ 0. This resemblance is observed in moredetail in Figure 11.

21

Page 23: Ageing of an oscillator due to frequency switching in ...

(a)

(b) (c)

Figure 11: Trajectories showing a similarity between the relay switching andthe step switching as the amplitude ε→ 0. Simulated orbits for a = 0.1 withan initial condition (x0, y0) = (2

3, 0.1) .

The behaviour observed in Figure 11 suggests a bifurcation in the trajec-tories of the nonlinear model for a relay as ε changes. Therefore, it is ofinterest to know how the orbits evolve for different values of a, one close to1 as in Figure 12 and one enough small than 1 as in Figure 13.

In Figure 12a the number of branches decreases qualitatively one unit asε tends to 0, i.e. the period decreases about one integer at a time indicatingperiod adding sequence. This happens until it reaches the step functionbehaviour, result that is consistent with Figure 11. The points forming thebranches of the bifurcation diagram can be checked in Figure 12b where onecan clearly see that for some values of ε, in this case 0.08 and 0.01, there

22

Page 24: Ageing of an oscillator due to frequency switching in ...

(a) (b)

Figure 12: (a) Bifurcation diagram for the nonlinear model for a relay witha = 0.09 and ε ∈ (10−6, 0.1). (b) Trajectories for a = 0.09 and three differentvalues of the amplitude ε.

exists a peak at y = −1, whereas for other values this peak is not obtained.In the same way, for ε = 0.08 (and other values close to ε = 0.1), a middlepeak y ≈ 0.2 appears.

A very different result is obtained in Figure 13a, where amplitude steppingis seen as ε changes. This result coincides with the trajectories in Figure13b. where we also observe the chattering phenomenon explained in Figure2. Imperfections in the switching function give peaks around y = 0, and theamplitude of these peaks decreases as the amplitude of the relay ε is reduced.

Considering also that the parameter a may introduce bifurcations, one canexpect different trajectories as a changes. In Figure 14a we see that as thedamping factor (a) increases, the amplitude of the oscillations decreases, sincethe amplitude of both the upper and lower branches decreases in absolutevalue. Note that the latter is not present for every value of a. The trajectoriesof Figure 13b show how for small values of a, in this case 0.2 and also 0.5, thenumber of oscillations and therefore the peaks corresponding to y = 0 givesdifferent branches in the left hand side of the bifurcation diagram. Theseoscillations match a damping amplitude behaviour as orbits tend to y = 0.

23

Page 25: Ageing of an oscillator due to frequency switching in ...

(a) (b)

Figure 13: a) Bifurcation diagram for the nonlinear model for a relay witha = 0.8 and ε ∈ (10−6, 0.1). (b) Trajectories for a = 0.8 and three differentvalues of the amplitude ε.

(a) (b)

Figure 14: a) Bifurcation diagram of the nonlinear model for a relay withε = 0.1 and a ∈ (0.01, 2). (b) Trajectories for ε = 0.1 and three differentvalues of a.

24

Page 26: Ageing of an oscillator due to frequency switching in ...

Let us define t0, s1 and t1 as in Figure 15. It is of interest to find ananalytical function that relates these three values, i.e., given a crossing pointat y = ε, find the x coordinate where the trajectory will cross y = −ε, andonce obtained that point, find the x coordinate at which the oscillation willcross y = ε again. One can try to derive the analytical function to get thesepoints as a function of ε.

Figure 15: Definition of t0, s1 and t1.

Given the system (3.1), we can distinguish between a = 0 and a 6= 0.

Case a = 0

For a = 0 we can easily find the solution:

y(t) = y0 +1

πw±dcos (πw±t)− cos (πw±t0)e (5.1)

According to the definitions in Figure 15, we can substitute the data knownfor each point t0, s1, t1 in (5.1).

25

Page 27: Ageing of an oscillator due to frequency switching in ...

−ε = +ε+1

πw+

dcos (πw+s1)− cos (πw+t0)e (5.2a)

+ε = −ε+1

πw−dcos (πw−t1)− cos (πw−s1)e (5.2b)

From 5.2a we find s1 as a function of t0, while from (5.2b) we get t1 as afunction of s1:

s1 =1

πw+

arccos (cos (πw+t0 − 2πεw+)) (5.3a)

t1 =1

πw−arccos (cos (πw−s1 + 2πεw−)) (5.3b)

Case a 6= 0

In this case, the solution of (3.1) is:

y(t) = (y0 + Γ±) e−a(t−t0) +w±π cos (πw±t)− a sin (πw±t)

a2 + π2w2±

(5.4)

where the value of Γ± has been defined by convenience as:(a sin (πw±t0)− πw± cos (πw±t0)

a2 + π2w2±

)We need to find from the previous equation the expressions of s1(t0, a)

and t1(s1, a). Note that from now on, the expressions of (5.3a) and (5.3b)will be referred to s1(t0, 0) and t1(t0, 0) respectively.

As before, we can subsitute in (5.4) the mentioned trajectory going fromt0 to s1 and then going to t1.

−ε = (+ε+ Γ+) e−a(s1−t0) +w+π cos (πw+s1)− a sin (πw+s1)

a2 + π2w2+

(5.5a)

+ε = (−ε+ Γ−) e−a(t1−s1) +w−π cos (πw−t1)− a sin (πw−t1)

a2 + π2w2−

(5.5b)

26

Page 28: Ageing of an oscillator due to frequency switching in ...

It is clear that we cannot obtain directly the expressions for s1(t0, a) andt1(t0, a) directly from (5.5a) and (5.5b) respectively. If we consider that thevalue of a is small enough, we can perform a perturbation expansion such asfollows:

s1(t0, a) = s1,0(t0) + as1,1(t0) + a2s1,2(t0) + ... (5.6a)

t1(s1, a) = t1,0(s1) + at1,1(s1) + a2t1,2(s1) + ... (5.6b)

From now on and for convenience we will omit the parentheses of (t0) and(s1):

s1(t0, a) = s1,0 + as1,1 + a2s1,2 + ... (5.7a)

t1(s1, a) = t1,0 + at1,1 + a2t1,2 + ... (5.7b)

We can now expand every function of (5.4) for small a to 1st order terms,so we will omit powers of a ≥ 2. For (5.5a) and substituting s1 as (5.7a), weget after some calculations the following expansions:

e−a(s1−t0) = 1− as1,0 + at0 (5.8a)

cos (πw+s1) = cos (πw+s1,0)− (πw+as1,1) sin (πw+s1,0) (5.8b)

sin (πw+s1) = sin (πw+s1,0) + (πw+as1,1) cos (πw+s1,0) (5.8c)

We can now substitute the expressions from (5.8) into (5.5a). Note that theterms a2, including the one in Γ+, can be omitted.

−ε = (+ε+ Γ+)(1− as1,0 + at0)+

+1

πw+

[cos (πw+s1,0)− (πw+as1,1) sin (πw+s1,0]−

− a

π2w2+

[sin (πw+s1,0) + (πw+as1,1) cos (πw+s1,0)]

(5.9)

Since s1,0 is a known value from (5.3a) we define for convenience the followingvariables:

1. (1− as1,0 + at0) = γ+

2. cos (πw+s1,0) = c+

27

Page 29: Ageing of an oscillator due to frequency switching in ...

3. sin (πw+s1,0) = n+

4. πw+ = σ+

Then, (5.9) can be rewritten as:

− ε = (+ε+ Γ+)γ+ +1

σ+

(c+ − aσ+n+s1,1)− a

σ2+

(n+ + aσ+c+s1,1) (5.10)

and from this we get the value of s1,1:

s1,1 =(+ε+ Γ+)γ+ + ε+ σ+c+−an+

σ2+

a(n+ + ac+σ+

)(5.11)

We can follow the same procedure to obtain the expression for t1,1, but nowwe have to define new variables since we the trajectory goes now from −ε toε.

1. (1− at1,0 + as1) = γ−

2. cos (πw−t1,0) = c−

3. sin (πw−t1,0) = n−

4. πw− = σ−

We’ll omit all the previous steps and show the last equation for t1,1:

+ ε = (−ε+ Γ−)γ− +1

σ−(c− − aσ−n−t1,1)− a

σ2−

(n− + aσ−c−t1,1) (5.12)

from where we obtain:

s1,1 =(−ε+ Γ−)γ− − ε+ σ−c−−an−

σ2−

a(n− + ac−σ−

)(5.13)

We can derive a map that represents every pair (x0, x1), where the formeris the initial condition and the latter is the first x coordinate crossing y = +ε.

28

Page 30: Ageing of an oscillator due to frequency switching in ...

Figure 16: Map of the pairs (x0, x1) for a nonlinear model regularised witha relay switching with a = 0.09 and ε = 0.01. Since the orbits tend to be4-periodic, all the points are in modulus 4.

Sliding occurs for x ∈ (83, 10

3). Because of imperfections introduced by the

relay, the points of the graph that correspond to a sliding motion do not lieon the line y = x, but the distance at which they are placed is related to ε.

Let us consider an initial point x0 = 83

with y0 = +ε. The first point x1

crossing y at +ε can be expressed as x1 = 83

+X1. The trajectory will first godown with a frequency ω+ = 3

2until y = −ε. We will call the x coordinate

at which this happens ξ. After that it will go up with a frequency ω− = 12.

Considering that for a = 0 the solution of (3.1) is (5.1) we split the trajectoryfrom x0 to x1 in two parts x0 to ξ and ξ to x1:

−3επ = cos (3π

2ξ)− 1 (5.14a)

επ = cos (π

2x1)− cos (

π

2ξ) (5.14b)

that can be expressed respectively as:

29

Page 31: Ageing of an oscillator due to frequency switching in ...

1− 3επ = cos (3π

2)ξ = 4 cos3 (

π

2x1)− 3 cos (

π

2ξ) (5.15a)

cos (π

2ξ) = cos (

π

2(8

3+X1))− επ = −1

2(1− π2

8X2

1 ) +

√3π

4X1 − επ (5.15b)

From (5.15b), cos3 (π2ξ) can be obtained. Anything of order ε2, εX1 or X3

1

will be ignored. Combining (5.14a) and (5.14b) we get:

− 3πε = (3√

3

4− 3√

3

4)πX1 + (−6

3π2

16X2

1 ) + ... (5.16)

yielding x1 = 83

+ 2√

2ε3π

. Note that this proportion is only valid if x0 = 83

or

at least very close to it. In Figure 17, the last result can be checked and alsoit is appreciable that as x0 → 10

3, X1 → ε.

Figure 17: Sliding region of the map for a nonlinear system regularised by arelay switching with a = 0.09 and ε = 0.01. The distance at which the dotslie from y = x corresponds to X1. For x0 close to 8

3X1 ≈

√ε, while X1 ≈ ε

as x0 → 103

.

30

Page 32: Ageing of an oscillator due to frequency switching in ...

The orbits for a set of different initial points x0 are showed in Figure 18a.All the crossing points x at y = +ε can be extracted and concatenated in avector [x1, x2, x3, ...., xn]. We can create an array of pairs: [(x1, x2); (x2, x2); (x2, x3); ...;(xn−1, xn); (xn, xn)]. Such array is plotted in Figure 18b, where it is clear thatevery pair of crossing points lies in a branch of the map, thus confirming aperiodic behaviour. It is also appreciable that the orbits overlap.

(a) (b)

Figure 18: Oscillations and map of Figure 16 showing that the orbits overlapin the transient state while tending to be 4-periodic and they lie as expectedon the branches of the map.

Considering that bifurcations are displayed as a function of ε or a, it isof interest to know how the map changes as these parameters change (seeFigures 19 and 20).

31

Page 33: Ageing of an oscillator due to frequency switching in ...

Figure 19: Map of the trajectories of a nonlinear model for a relay switchingwith a = 0.09 and ε = 0.001. Compared to Figure 16, in the sliding regionwe observe now that the branch of the map lies more close to y = x, whichis consistent with the result obtained from (5.16) since ε is smaller .

(a) (b)

Figure 20: Map of the trajectories for a relay switching with a = 0.8 andε = 0.01. Compared to Figure 16, some branches tend to be more flat whena increases because different initial points x0 have the same crossing pointx1, i.e. trajectories overlap.

32

Page 34: Ageing of an oscillator due to frequency switching in ...

6 Relay circuit: physical model

The code used for this section as well as the RL and RC circuits can befound in the Appendix.

6.1 RL circuit

If we want to simulate (3.1) with a circuit composed by a source of voltageV (T ), a resistance R and an inductance L (Figure 21) we have to rewrite thesystem with a real frequency ν (Hz) and a real time variable T (seconds).

Figure 21: RL circuit.

Taking the current I as the variable of study, the physical system has theform:

T ′ = 1, (6.1a)

I ′ = −RLI +

V (T )

L, (6.1b)

with V (T ) = −V0 sin (2πνT ). To find out the relation between a and RL

, wehave first to relate ν and w. In (3.1) we have w+ = 3/2 and w− = 1/2, if wetake ν+ = 75 Hz and ν− = 25 Hz, the relation between them is ν± = 50w±Hz. The content inside the sinusoid must be the same, so from (3.1) we havethat:

33

Page 35: Ageing of an oscillator due to frequency switching in ...

πw±t = 2πν±T,

πw±t = 100πw±T,

t = 100T,

t = kT,

(6.2)

where we have defined k = 100 Hz, but also k = 2ν±w±

. From (6.2) we have

that k ddt

= ddT

, then we can rewrite (6.1) as:

kT = 1, (6.3a)

kI = −RLI −

V0 sin (2πνkt)

L, (6.3b)

with the time derivative denoted as t = x = kT ′. We can rewrite the systemas follows:

kT = 1, (6.4a)

kL

V0

I = − RV0

V0Lk

Lk

V0

I − sin (2πν

kt), (6.4b)

where we have used that y = LkIV0

. Comparing (6.4) and (3.1) we get that

a = RLk

. Since we work with a ∈ (0.01, 2), we have that R ∈ (L, 200L) whichis inconsistent with typical values of R and L in a real circuit, since usuallyR < L.

If a relay switching is implemented to regularise the discontinuity, theamplitude of it is also scaled such that if ε � 1 for (3.1), εRL = ε

k� 1

k. In

Figure 22 we see that because (6.1) is equivalent to (3.1), the same bifurcationbranches appear in both systems and therefore the same orbits, consideringof course the scaling factor in the amplitude.

34

Page 36: Ageing of an oscillator due to frequency switching in ...

Figure 22: Bifurcation diagram for the RL circuit for a relay switching ofamplitude εRL = 0.001 regularising the nonlinear model with a ∈ (0.01, 2).Bifurcations shown are similar to the ones in Figure 14a.

6.2 RC circuit

Given the mismatch between the value of a and the ratio RL

mentionedbefore, we may suggest another circuit, composed by a source of intensityI(T ), a resistance R and a capacitor C (Figure 23).

Figure 23: RC circuit.

35

Page 37: Ageing of an oscillator due to frequency switching in ...

We can rewrite the system as in the previous section, but now the voltageVc will be the variable of study.

T ′ = 1, (6.5a)

V ′c = − VcRC

+I(T )

C, (6.5b)

with I(T ) = −I0 sin (2πνT ). The relation between t and T is the same as in(6.2), therefore we can rewrite (6.5) as:

kT = 1, (6.6a)

kVc = − VcRC−I0 sin (2πν

kt)

C, (6.6b)

where the time derivative has been defined as in the previous section t = x =kT ′. The system can be rewritten as:

kT = 1, (6.7a)

kC

I0

Vc = − I0

RI0Ck

Ck

I0

Vc − sin (2πν

kt), (6.7b)

where we have used that y = CkVcI0

. Comparing now (6.7) and (3.1) we get

that a = 1RCk

. Since we work with a ∈ (0.01, 2), we have that R ∈ ( 1200C

, 1C

)which are values achievable in reality.

We can use a relay to regularise the discontinuity for the nonlinear model.As the system (6.7) has to be equivalent to (3.1), the bifurcation diagram inFigure 24 coincides with the one obtained from the mathematical system inFigure 14a.

36

Page 38: Ageing of an oscillator due to frequency switching in ...

Figure 24: Bifurcation diagram for RC circuit with a relay switching ofamplitude εRC = 0.001 and a ∈ (0.01, 2).

7 Conclusions

To recapitulate, the main objective of this research was to implement a cir-cuit that would model the equations of (3.1) in reality and see how it relatedto the mathematical model. Once this was achieved, the big question was,does the real system, and if so the mathematical one, follow the behaviourpreviously predicted by Utkin and Filippov?

The dynamics observed for the relay applied to the nonlinear mathematicalmodel showed a clear dependence on the amplitude of the relay. This is logicalconsidering that the smaller the amplitude, the more the relay will resemblean ideal switching. Therefore, when ε → 0, we recovered the behaviour ofthe step function. The orbits tended to be 4-periodic as expected.

The dependence on ε generated different changes in the evolution of thetrajectories. We have seen that phenomena like amplitude stepping andperiod adding sequence appeared.

37

Page 39: Ageing of an oscillator due to frequency switching in ...

We have observed that when the oscillation starts near the beginning ofthe sliding interval, the distance between the peaks created by the chatteringphenomenon are proportional to

√ε. When this starting point is in the

middle of the sliding interval, the proportionality is of the order of√ε.

In addition, the nonlinear mathematical system is also sensitive to thedamping factor a. When a grows, the amplitude of the oscillations decreasesand the sliding modes are visible.

The physical system implemented turned out to resemble the behaviourobtained with the mathematical system. Moreover, the values of the RCcircuit related to a and k are actually achievable in reality.

The next step in this research would be to analyse in detail the second-order oscillator proposed in [1] and see how it behaves with different switch-ings. A real physical system could then be set up to model the mathematicalmodel.

References

[1] C. Bonet, M. R. Jeffrey, P. Martin, and J. M. Olm. Ageing of an oscillatordue to frequency switching. arXiv preprint arXiv:2001.08039, 2020.

[2] C. Bonet, T. M. Seara, E. Fossas, and M. R. Jeffrey. A unified approachto explain contrary effects of hysteresis and smoothing in nonsmooth sys-tems. Communications in Nonlinear Science and Numerical Simulation,50:142–168, 2017.

[3] M. R. Jeffrey. Modeling with Nonsmooth Dynamics. Springer, 2020.

[4] Y. A. Kuznetsov, S. Rinaldi, and A. Gragnani. One-parameter bifurca-tions in planar filippov systems. International Journal of Bifurcation andchaos, 13(08):2157–2188, 2003.

[5] V. Utkin, J. Guldner, and M. Shijun. Sliding mode control in electro-mechanical systems (2nd ed.). CRC press, 2009.

[6] V. I. Utkin. Sliding modes in control and optimization. Springer Science& Business Media, 2013.

38

Page 40: Ageing of an oscillator due to frequency switching in ...

Appendix

Mathematical system

1 % Code v a l i d f o r non l in ea r or l i n e a r system , changingsim ( ’ ’ , . . . )

2 % parameter . Code used f o r three d i f f e r e n t sw i t ch ing sthat are changed

3 % manually in Simulink4

5 %% T r a j e c t o r i e s6

7 a=2; b=300; e =0.0001; xo=2/3;8 vecyo = [ 0 . 1 ; 1 ; 5 ; 1 0 ] ;9 c o l o r v e c =[ ’ k ’ , ’ r ’ , ’ b ’ , ’ g ’ ] ;

10

11 f o r i =1:1 : l ength ( vecyo )12 yo=vecyo ( i ) ;13 out=sim ( ’ o rde r1non l i n ea r ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;14 x=out . get ( ’ x ’ ) ;15 y=out . get ( ’ y ’ ) ;16 ydot=out . get ( ’ ydot ’ ) ;17 t=out . get ( ’ tout ’ ) ;18

19 p lo t (x , y , ’ Color ’ , c o l o r v e c ( i ) , ’ DisplayName ’ , [ ’ y 0=’ num2str ( yo ) ] , ’ LineWidth ’ , 2)

20 hold on21 end22 l egend ( ’ FontSize ’ , 12) ;23 x l a b e l ( ’ x ’ ) ; y l a b e l ( ’ y ’ ) ;24

25 %% B i f u r c a t i o n diagram f o r e p s i l o n26

27 c l e a r a l l ; c l o s e a l l28 j v e c = [ ] ; yvec = [ ] ;29 b=250; xo=2/3; yo =0.01; a =0.09;30 veceps=l i n s p a c e (1 e −6,1e −1 ,500) ;

39

Page 41: Ageing of an oscillator due to frequency switching in ...

31

32 f o r i =1:1 : l ength ( veceps )33

34 e=veceps ( i ) ;35 out=sim ( ’ o rde r1non l i n ea r ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;36 x=out . get ( ’ x ’ ) ;37 y=out . get ( ’ y ’ ) ;38 ydot=out . get ( ’ ydot ’ ) ;39 t=out . get ( ’ tout ’ ) ;40

41 x=x (3700000 : end ) ;42 y=y (3700000 : end ) ;43 t=t (3700000 : end ) ;44 ydot=ydot (3700000 : end ) ;45 f i g u r e (1 )46 p lo t (x , y )47

48 f o r j =2 :1 : ( l ength ( ydot ) )49 i f ydot ( j −1)∗ydot ( j ) < 0 % j p o s i t i o n a f t e r dy/

dt=050 j v e c =[ j v e c j ] ;51 yvec=[yvec ( ( y ( j ) + y ( j −1) ) /2) ] ; %y

coord ina te mean52 end53

54 end55

56 %s i z e ( yvec )57 vecaux=ones (1 , l ength ( yvec ) ) ∗e ;58 f i g u r e (2 )59 p lo t ( vecaux , yvec , ’ . ’ , ’ Color ’ , [ rand , rand , rand ] , ’

DisplayName ’ , [ ’ e=’ num2str ( e ) ] )60 hold on ;61 yo=max( yvec ) ;62 yvec = [ ] ;63

64 end

40

Page 42: Ageing of an oscillator due to frequency switching in ...

65 s e tg ( gca , ’ FontSize ’ , 34)66 x l a b e l ( ’ a ’ ) ; y l a b e l ( ’ y when dy/dt=0 ’ )67

68 %% B i f u r c a t i o n diagram f o r a69

70 c l e a r a l l ; c l o s e a l l71 j v e c = [ ] ; yvec = [ ] ;72 b=250; xo=2/3; yo =0.01; e =0.01;73

74 f o r a =0 .01 : 0 . 005 : 275

76 out=sim ( ’ o rde r1non l i n ea r ’ , ’ SaveState ’ , ’ on ’ , ’SaveOutput ’ , ’ on ’ ) ;

77 x=out . get ( ’ x ’ ) ;78 y=out . get ( ’ y ’ ) ;79 ydot=out . get ( ’ ydot ’ ) ;80 t=out . get ( ’ tout ’ ) ;81

82 x=x (3700000 : end ) ; %remove t r a n s i e n t s , t o t a ls imu la t i on time t=400

83 y=y (3700000 : end ) ;84 t=t (3700000 : end ) ;85 ydot=ydot (3700000 : end ) ;86 f i g u r e (1 )87 p lo t (x , y )88

89 f o r j =2 :1 : ( l ength ( ydot ) )90 i f ydot ( j −1)∗ydot ( j ) < 0 % j p o s i t i o n a f t e r dy/

dt=091 j v e c =[ j v e c j ] ;92 yvec=[yvec ( ( y ( j ) + y ( j −1) ) /2) ] ; %y

coord ina te mean93 end94

95 end96

97 %s i z e ( yvec )98 vecaux=ones (1 , l ength ( yvec ) ) ∗a ;

41

Page 43: Ageing of an oscillator due to frequency switching in ...

99 f i g u r e (2 )100 p lo t ( vecaux , yvec , ’ . ’ , ’ Color ’ , [ rand , rand , rand ] , ’

DisplayName ’ , [ ’ a=’ num2str ( a ) ] )101 hold on ;102 yo=max( yvec ) ;103 yvec = [ ] ;104

105 end106 s e tg ( gca , ’ FontSize ’ , 34)107 x l a b e l ( ’ a ’ ) ; y l a b e l ( ’ y when dy/dt=0 ’ )108

109

110 %% Map111

112 c l e a r a l l ; c l o s e a l l113 vecx0 = [ 0 : 0 . 0 0 5 : 1 2 / 3 ] ; e =0.01; a =0.09; b=0.1;114 vecx =[0 0 ] ; wp=3/2;115 format long116 f o r m=1:1: l ength ( vecx0 )117 xo=vecx0 (m) ;118 yo=e + ((1 e−6)∗(−a∗e −s i n ( p i ∗wp∗xo ) ) ) ; %yo= eps +

e r r o r ∗ydot (0 )119 out=sim ( ’ o rde r1non l i n ea r ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;120 x=out . get ( ’ x ’ ) ;121 y=out . get ( ’ y ’ ) ;122 ydot=out . get ( ’ ydot ’ ) ;123 t=out . get ( ’ tout ’ ) ;124 vecxx=[xo ] ;125

126 f o r i =2:1 : l ength ( y )127 s=length ( vecxx ) ;128 ru leup= ( e−y ( i ) ) ∗( e−(y ( i −1) ) ) ;129 %i i s the p o s i t i o n a f t e r c r o s s i n g y=+e p s i l o n

upwards or downwards130

131 i f ru leup <0 && s<2 % only keep 1 c r o s s i n gpo int

42

Page 44: Ageing of an oscillator due to frequency switching in ...

132 vecxx=[vecxx x ( i ) ] ; %pa i r ( x0 xout )133 break134 end135

136 end137 i f l ength ( vecxx )==2138 vecx=[vecx ; vecxx ] ;139 %array with ( x0 x1 ; x0 x1 ; x0 x1 ; . . . ) where x1 i s

the output y=+eps140 end141

142 end143

144 xaux=l i n s p a c e (0 , 4 , 500 ) ;145 yaux=l i n s p a c e (0 , 4 , 500 ) ;146 f i g u r e (1 )147 p lo t ( vecx ( 2 : end , 1 ) , vecx ( 2 : end , 2 ) , ’ . b ’ )148 hold on149 p lo t ( xaux , yaux , ’ k ’ , ’ DisplayName ’ , [ ’ y=x ’ ] )150 x l a b e l ( ’ x {n} ’ , ’ FontSize ’ , 16) ; y l a b e l ( ’ x {n+1} ’ , ’

FontSize ’ , 16) ;151 x t i c k s ( [ 0 2/3 4/3 6/3 8/3 10/3 12/3 ] )152 x t i c k l a b e l s ({ ’ 0 ’ , ’ 2/3 ’ , ’ 4/3 ’ , ’ 6/3 ’ , ’ 8/3 ’ , ’ 10/3 ’ , ’ 12/3

’ })153

154 %% T r a j e c t o r i e s and c y c l e s f o r the map155

156 c l o s e a l l ; c l e a r a l l157 a =0.09; b=0; e =0.01; wp=3/2;158 vecxo =[0 .2 , 1 . 2 , 2 . 5 , 3 . 3 ] ;159

160 f o r i =1:1 : l ength ( vecxo )161 xo=vecxo ( i ) ;162 yo=e + ((1 e−6)∗(−a∗e −s i n ( p i ∗wp∗xo ) ) ) ; %yo= eps +

e r r o r ∗ydot (0 )163 out=sim ( ’ o rde r1non l i n ea r ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;164 x=out . get ( ’ x ’ ) ;

43

Page 45: Ageing of an oscillator due to frequency switching in ...

165 y=out . get ( ’ y ’ ) ;166 ydot=out . get ( ’ ydot ’ ) ;167 t=out . get ( ’ tout ’ ) ;168

169 x=x (3700000 : end ) ; %remove t r a n s i e n t s , t o t a ls imu la t i on time t=400

170 y=y (3700000 : end ) ;171 t=t (3700000 : end ) ;172 ydot=ydot (3700000 : end ) ;173

174 f i g u r e (1 )175 p lo t (x , y , ’ LineWidth ’ , 2 . 5 , ’ DisplayName ’ , [ ’ x {0}=

’ num2str ( xo ) ] )176 hold on177 x l a b e l ( ’ x ’ ) ; y l a b e l ( ’ y ’ ) ) ;178 s e t ( gca , ’ FontSize ’ , 34) ;179 vecxx=[xo ] ;180

181 f o r j =2:1 : l ength ( y )182 s=length ( vecxx ) ;183 ru leup= ( e−y ( j ) ) ∗( e−(y ( j −1) ) ) ;184 %i w i l l be the p o s i t i o n a f t e r c r o s s i n g y=+

e p s i l o n185 i f ru leup <0 %every c r o s s i n g po int y=eps

upwards or downwards186 vecxx=[vecxx x ( j ) ] ; %pa i r ( xo xout )187 end188

189 end190

191 vecxx=mod( vecxx , 4 ) ;192 vecaux1=[ vecxx ( 2 : end ) ’ vecxx ( 2 : end ) ’ ] ; %vec to r [ x1 x1

; x2 x2 ; . . . ]193 vecaux2=[ vecxx ( 2 : end−1) ’ vecxx ( 3 : end ) ’ ] ; %vec to r [ x1

x2 ; . . . ; xend x1 ]194 vecaux2 ( end+1, : ) =[ vecxx ( end ) vecxx (2 ) ] ; %c l o s e c y c l e

[ xend x1 ]195 long =2∗( l ength ( vecxx ) −1) ;

44

Page 46: Ageing of an oscillator due to frequency switching in ...

196 vec2=ze ro s ( long , 2 ) ;197 vec2 ( 1 : 2 : ( long −1) , : )= vecaux2 ; %[ x1 x2 ; x2 x2 ; x2 x3 ;

. . . ; xend x1 ; x1 x1 ]198 vec2 ( 2 : 2 : ( long −2) , : )= vecaux1 ( 2 : end , : ) ;199 vec2 ( long , : )=vecaux1 ( 1 , : ) ;200

201

202 f i g u r e (2 )203 p lo t ( vec2 ( : , 1 ) , vec2 ( : , 2 ) , ’ LineWidth ’ , 2 , ’ DisplayName

’ , [ ’ x {0}= ’ num2str ( xo ) ] )204 hold on205 l egend ( ’ Fonts i z e ’ , 22)206 s e t ( gca , ’ FontSize ’ , 24)207 end208

209 f i g u r e (1 )210 hold on211 y l i n e ( e , ’ DisplayName ’ , ’ y=\e p s i l o n ’ )212 hold on213 y l i n e (−e , ’ DisplayName ’ , ’ y=−\e p s i l o n ’ )214 l egend ( ’ Fonts i z e ’ , 12)

45

Page 47: Ageing of an oscillator due to frequency switching in ...

Figure 25: Mathematical linear circuit.

46

Page 48: Ageing of an oscillator due to frequency switching in ...

Figure 26: Mathematical nonlinear circuit.

Physical system1 % Code f o r RL c i r c u i t2

3 %% T r a j e c t o r i e s4

5 c l o s e a l l ; c l e a r a l l ;6 L=1e −5; Ts=1e −6; k=100;7 a =0.1 ; e =0.01;8 R1=a∗L∗k ; esim=e/k ;9 out=sim ( ’ Simscape RL ’ , ’ SaveState ’ , ’ on ’ , ’ SaveOutput ’ ,

’ on ’ ) ;10 I1=out . get ( ’ I1 ’ ) ;11 V1=out . get ( ’V1 ’ ) ;12 I1dot=out . get ( ’ Idot ’ ) ;13 t=out . get ( ’ tout ’ ) ;

47

Page 49: Ageing of an oscillator due to frequency switching in ...

14

15 p lo t ( t , I1 ) ;16 x l a b e l ( ’ t ’ ) ; y l a b e l ( ’ I ’ )17

18 %% B i f u r c a t i o n diagram f o r a19

20 c l o s e a l l ; c l e a r a l l ;21 j v e c = [ ] ; I1vec = [ ] ; Ts=1e −6;22 L=1e −5; esim =0.1/100; k=100; %e in math system i s 0 . 01 ,

esim=e/k23 %f i x e d value o f L , changing R1 to f o l l o w a=R/(Lk)24 f o r a =0 .01 : 0 . 005 : 225 hold on26 R1= a∗L∗k ;27 out=sim ( ’ Simscape RL ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;28 I1=out . get ( ’ I1 ’ ) ; %r e l a t e d with y29 V1=out . get ( ’V1 ’ ) ;30 t=out . get ( ’ tout ’ ) ;31 I1dot=out . get ( ’ Idot ’ ) ;32

33 I1=I1 (3700000 : end ) ;34 I1dot=I1dot (3700000 : end ) ;35 V1=V1(3700000 : end ) ;36 t=t (3700000 : end ) ;37

38 %I1dot1= −I1 . ∗ ( R1/L) + V1.∗ ( 1/L) ;39 %can a l s o be c a l c u l a t e d from the formula40

41 f i g u r e (1 )42 p lo t ( t , I1dot )43 hold on44 p lo t ( t , I1dot1 )45

46 f o r j =2:1 : l ength ( I1dot )47 i f I1dot ( j −1)∗ I1dot ( j ) < 048 j v e c =[ j v e c j ] ;49 I1vec =[ I1vec ( ( I1 ( j ) + I1 ( j −1) ) /2) ] ;

48

Page 50: Ageing of an oscillator due to frequency switching in ...

50 end51 end52

53 vecaux=ones (1 , l ength ( I1vec ) ) ∗a ;54 f i g u r e (1 )55 p lo t ( vecaux , I1vec , ’ . ’ , ’ Color ’ , [ rand , rand , rand ] , ’

DisplayName ’ , [ ’ a=’ num2str ( a ) ] )56 hold on57 vecaux = [ ] ; I1vec = [ ] ;58

59 end60 x l a b e l ( ’ a ’ ) ; y l a b e l ( ’ I when dI /dT=0 ’ ) ;61

62 %Code f o r RC c i r c u i t63

64 %% T r a j e c t o r i e s65

66 c l o s e a l l ; c l e a r a l l ;67 C=1e −5; Ts=1e −6; k=100;68 a =0.1 ; e =0.01;69 R2=1/(a∗C∗k ) ; esim=e/k ;70 out=sim ( ’ Simscape RC ’ , ’ SaveState ’ , ’ on ’ , ’ SaveOutput ’ ,

’ on ’ ) ;71

72 I2=out . get ( ’ I2 ’ ) ;73 V2=out . get ( ’V2 ’ ) ;74 Vdot=out . get ( ’ Vdot ’ ) ;75 t=out . get ( ’ tout ’ ) ;76

77 p lo t ( t , V2)78 x l a b e l ( ’ t ’ ) ; y l a b e l ( ’V ’ )79

80 %% RC B i f u r c a t i o n diagram f o r a81

82 c l o s e a l l ; c l e a r a l l ;83 j v e c = [ ] ; V2vec = [ ] ; Ts=1e −6;84 C=1e −5; esim =0.1/100; k=100;85 f o r a =0 .01 : 0 . 005 : 2

49

Page 51: Ageing of an oscillator due to frequency switching in ...

86

87 hold on88 R2= 1/( a∗C∗k ) ;89 out=sim ( ’ Simscape RC ’ , ’ SaveState ’ , ’ on ’ , ’

SaveOutput ’ , ’ on ’ ) ;90 I2=out . get ( ’ I2 ’ ) ;91 V2=out . get ( ’V2 ’ ) ;92 t=out . get ( ’ tout ’ ) ;93 Vdot=out . get ( ’ Vdot ’ ) ;94

95 I2=I2 (3700000 : end ) ;96 Vdot=Vdot (3700000 : end ) ;97 V2=V2(3700000 : end ) ;98 t=t (3700000 : end ) ;99

100 f o r j =2:1 : l ength ( Vdot )101 i f Vdot ( j −1)∗Vdot ( j ) < 0102 j v e c =[ j v e c j ] ;103 V2vec=[V2vec ( (V2( j ) + V2( j −1) ) /2) ] ;104 end105 end106

107 vecaux=ones (1 , l ength ( V2vec ) ) ∗a ;108 f i g u r e (1 )109 p lo t ( vecaux , V2vec , ’ . ’ , ’ Color ’ , [ rand , rand , rand ] , ’

DisplayName ’ , [ ’ a=’ num2str ( a ) ] )110 hold on111

112 c l e a r V2vec113 c l e a r vecaux114 vecaux = [ ] ; V2vec = [ ] ;115 end116

117 x l a b e l ( ’ a ’ ) ; y l a b e l ( ’V when dV/dT=0 ’ ) ;

50

Page 52: Ageing of an oscillator due to frequency switching in ...

Figure 27: RL nonlinear circuit.

51

Page 53: Ageing of an oscillator due to frequency switching in ...

Figure 28: RC nonlinear circuit.

52


Recommended