文档库 最新最全的文档下载
当前位置:文档库 › Random Walks and Non-Overshooting Levy processes

Random Walks and Non-Overshooting Levy processes

Random Walks and Non-Overshooting Levy processes
Random Walks and Non-Overshooting Levy processes

a r X i v :0712.2637v 1 [m a t h .P R ] 17 D e c 2007

Random Walks and L′e vy Processes Conditioned Not to Overshoot

Sergey G.Foss ?

Heriot-Watt University,Edinburgh,UK and Institute of Mathematics,Novosibirsk,Russia

and

Anatolii A.Puhalskii ?

University of Colorado,Denver,U.S.A.and

Institute for Problems in Information Transmission,Moscow,Russia

February 2,2008

Abstract

Let ξ1,ξ2,...be i.i.d.random variables with negative mean.Suppose that E exp(λξ1)<∞for some λ>0and that there exists γ>0with E exp(γξ1)=1.It is known that if,in

addition,E ξ1exp(γξ1)<∞,then the most likely way for the random walk S k = k

i =1ξi to reach a high level is to follow a straight line with a positive slope.We study the case where E ξ1exp(γξ1)=∞.Assuming that the distribution exp(γx )P (ξ1∈dx )belongs to the domain of attraction of a spectrally positive stable law,we obtain a weak convergence limit theorem as

r →∞for the conditional distribution of the process r ?1 ?t/(1?F (r ))?

i =1

ξi ,t ≥0 stopped at the time when it reaches level 1given that the latter event occurs.The limit is an increasing jump process.It is shown to be distributed as an increasing stable L′e vy process stopped at the time when it reaches level 1conditioned on the event this level is not overshot.Some properties of this process are studied.

1Introduction

Let ξ1,ξ2,...be i.i.d.random variables on a probability space (?,F ,P )with E ξ1<0and P (ξ1>0)>0.Then the random walk S n = n i =1ξi tends to ?∞with probability 1and the event that it exceeds a high level has a small albeit positive probability.The asymptotics of this probability have been studied extensively.Suppose E exp(λξ1)<∞for some λ>0and denote

γ=sup {λ:E exp(λξ1)≤1}.

(1.1)

Clearly,γ>0and E exp(γξ1)≤1.

In the “classical”case where E exp(γξ1)=1and β=E ξ1exp(γξ1)<∞,the celebrated Cramer-Lundberg theorem asserts that,for a certain constant C 1,

P (sup n

S n >r )~C 1e ?βr

as r →∞,

where ~stands for asymptotic equivalence.The limit is taken along all r if ξ1has a non-lattice distribution and along multiples of the lattice span if ξ1has a lattice distribution,see,for example,Asmussen [2,XIII.5],Borovkov [7,§22],or Feller [14,XII].

If E exp(γξ1)<1so that E exp(λξ1)=∞for allλ>γ,then,under certain regularity as-sumptions on the distribution ofξ1(more speci?cally,provided it belongs to class Sγ,see Teugels [23]),

P(sup

n

S n>r)~C2P(ξ1>r)as r→∞,

where C2=E exp(γsup n S n)/ 1?Eξ1exp(γξ1) ,see,for example,Bertoin and Doney[5]and references therein.For earlier results,see Borovkov[7,§22];recent developments can be found in Borovkov and Borovkov[8]and Zachary and Foss[25].

The borderline case where E exp(γξ1)=1andβ=∞was?rst addressed in Borovkov’s mono-graph,Borovkov[7,§22].More complete results have been obtained by Korshunov[18]who showed that if the distribution ofξ1is nonlattice and the distribution exp(γx)P(ξ1∈dx)has a regularly varying righthand tail with index?α,whereα∈(1/2,1),then

P(sup

n S n>r)~C3

e?γr

where1Γdenotes the indicator function of eventΓ.It is a probability measure by the assumption that E exp(γξ1)=1.The probability measures P and P?are locally equivalent and d P/d P? F n= exp(?γS n).We also note that under P?theξk are i.i.d.with meanβ.

For r>0,letτ(r)be the?rst time the random walk S n attains level r,i.e.,

τ(r)=min{n:S n≥r}.(1.4) Because{τ(r)=n}∈F n,

P(τ(r)<∞)=

n=1P(τ(r)=n)=∞ n=1E?e?γS n1{τ(r)=n}=E?e?γSτ(r)1{τ(r)<∞},

where E?denotes expectation with respect to P?.On noting that P?(τ(r)<∞)=1as E?ξ1>0, we conclude that

P(τ(r)<∞)=E?exp(?γSτ(r)).(1.5) More generally,ifΓ∈Fτ(r),Fτ(r)being theσ-algebra associated with the stopping timeτ(r), then by the fact that{τ(r)=n}∩Γ∈F n

P Γ∩{τ(r)<∞} =∞ n=1P Γ∩{τ(r)=n} =∞ n=1E?e?γS n1Γ∩{τ(r)=n}=E?e?γSτ(r)1Γ, so

P(Γ|τ(r)<∞)=E?e?γSτ(r)1Γ

E?e?γχ(r)

,(1.6)

where

χ(r)=Sτ(r)?r(1.7) is the overshoot of the random walk S n over level r.

Suppose now thatΓis the event{sup n≤τ(r)|S n?βn|0is given.Sinceβ<∞, by the strong law of large numbers the P?-probability of this event tends to1as r→∞.Also,the conditionβ<∞implies,provided the distribution ofξ1is nonlattice,that theχ(r)under P?tend in distribution to a proper random variable as r→∞,see,e.g.,Asmussen[2,VIII.2],Gut[15, III.10],or Feller[14,XI.4].Therefore,the E?exp(?γχ(r))converge to a positive limit as r→∞and by(1.6)

lim r→∞P(sup

n≤τ(r)

|S n?βn|

This argument breaks down in two places ifβ=∞:we can no longer rely on the law of large numbers for the random walk and theχ(r)might converge to in?nity as r→∞.In order to be able to tackle these di?culties,we need to be more speci?c about the distribution of theξi under P?,which is the distribution exp(γx)P(ξ1∈dx).We denote it by F and assume,following Korshunov[18],that the associated distribution function,which is also denoted by F,has a regularly varying righthand tail with index?α,whereα∈(1/2,1),i.e.,(1?F(xy))/(1?F(y))→x?αas y→∞,where x>0.A su?cient(but not necessary)condition for this to hold is for the function eγx P(ξ1>x)to be regularly varying with index?α?1,see Korshunov[18]for further comments. Note also that due to the fact that the lefthand tail of F decays exponentially fast,its righthand tail is regularly varying with index?αif and only if F belongs to the domain of attraction of the spectrally positive stable law with indexα,cf.,Gnedenko and Kolmogorov[12]or Feller[14].

We next implement the idea of slowing down time.It is scaled by(1?F(r))?1so that the processes(S?(1?F(r))?1t?/r,t∈R+)under P?converge in distribution as r→∞to an increasing

pure-jump L′e vy process X=(X(t),t∈R+)with L′e vy measureαx?α?1dx,see,e.g.,Resnick[20]. If the righthand tail of the distribution function F decays as x?α,then the scaled time is?rαt?,as was discussed earlier.

In addition,under the stated assumptions,the random variablesχ(r)/r converge in distri-bution to a proper random variableχ,which assumes values in(0,1)and has density pα(x)= (sinπα/π)x?α(1+x)?1.(See Dynkin[9,Theorem2],or Feller[14,XIV.3],for the case of renewal processes,Sinay[22]for the case of sums of random variables with a stable distribution,the case in question follows by an application of Lemma2in Korshunov[18].A di?erent proof of this result is given in the appendix.)It is plausible that in(1.6)one should be able to replaceχ(r) with rχso that exp(?γχ(r))can be replaced with exp(?rγχ).For large values of r,the bulk of the contribution to E?exp(?rγχ)comes from the small values ofχ,so the righthand side of(1.6) should be asymptotically equivalent to P?(Γ|χ=0).IfΓis an event associated with the process (S?(1?F(r))?1t?/r,t∈R+),then it should translate in the limit into a similar event associated with X.Besides,sinceχ(r)is the overshoot over level r by S n,we have thatχ(r)/r is the overshoot over level1of the process(S?(1?F(r))?1t?/r,t∈R+).That the latter process converges to X suggests the conjecture thatχshould be the overshoot of X above level1.

One is thus led to the conjecture that the conditional distribution of the process (S?(1?F(r))?1t?∧τ(r)/r,t∈R+)given thatτ(r)<∞should converge to the conditional distribu-tion of the process(X(t∧τ),t∈R+)given the event X(τ)=1,whereτ=inf{t:X(t)≥1}.The main result of the paper con?rms this conjecture.As a consequence,we have that if the distribution function F has a power tail x?α,then,assuming X is de?ned on a probability space(?′,F′,P′), for B>0and?>0,

lim r→∞P(sup

n≤τ(r)

|S n?Bn1/α|

t≤τ

|X(t)?Bt1/α|

which can be regarded as a counterpart of(1.8).

Certainly,the above argument is by no means rigourous.To begin with,the process X“does

not creep up”,i.e.,it overshoots every level with probability one,see Bertoin[4],so the event {X(τ)=1}has zero probability,and the probability law of(X(t∧τ),t∈R+)conditioned on this event needs de?ning.We de?ne it as the limit of the distributions of(X(t∧τ),t∈R+)given X(τ)≤1+?as?→0.There still remains the issue of justifying the existence of the limit.

However,one can guess at the predictable measure of jumps of the process X“conditioned not to overshoot level1”,which we denote X and call“a L′e vy process conditioned not to overshoot”, or,in short,“a non-overshooting L′e vy process”.It appears as though the intensity of jumps of size x of X at a point X(t)=u,where u

for the process X not to overshoot a level y>0by more than?>0is asymptotically equivalent to sinπα/(π(1?α)) yα?1?1?αas?→0(see also Rogozin[21],and more details are given in the proof of Theorem3.1below).Therefore,the conditional probability in question converges as?→0to (1?u?x)α?1/(1?u)α?1.Hence,the intensity of jumps of X should beαx?α?1(1?x/(1?u))α?1. It is thus akin to the arcsine law,which is not surprising given that we are concerned,in e?ect, with distributions of in?nite mean here.

In order to substantiate the loose argument we have been indulging in so far and provide proofs,we use a less direct line of attack than the one suggested by the above discussion.Two limit theorems are established:we prove that both the conditional laws of(X(t∧τ),t∈R+) given X(τ)≤1+?and the conditional laws of(S?(1?F(r))?1t?∧τ(r)/r,t∈R+)givenτ(r)<∞

converge,as?→0and r→∞,respectively,to the law of X.Proofs of both convergences are similar.First,we compute the predictable measures of jumps of the processes in question under the “conditional”measures and then apply results on weak convergence of semimartingales.The actual argument is more involved for the partial-sum processes so much so that we have to introduce an additional requirement on the distribution function F.Since the approaches of Korshunov[18] play an important part,we also have to treat the nonlattice and lattice cases separately.

As it happens,the exposition in the paper is reversed as compared with the order in which we have?rst arrived at the results.We begin with a study of the process X,which we do in Section2. We de?ne this process by postulating its predictable measure of jumps,prove its existence and uniqueness,and study some of its properties.In particular,we compute the moments of the time it takes X to reach level one and show that certain exponential moments of this random variable are?nite.In Section3we prove that X can be obtained as a limit in distribution of the processes (X(t∧τ),t∈R+)conditioned on X(τ)≤1+?.In Section4we establish the main result of the paper on the convergence in distribution of the processes(S?(1?F(r))?1t?∧τ(r)/r,t∈R+)conditioned on the event thatτ(r)<∞.The appendix contains a proof of the convergence in distribution of the processes(S?(1?F(r))?1t?/r,t∈R+)to X under measure P?based on the semimartingale weak convergence theory.As a byproduct,we extend Dynkin’s result[9]on the limit in distribution of χ(r)/r to the case of random walks.All results except those of Section4actually hold forα∈(0,1) and not just forα∈(1/2,1).

We conclude the introduction with a list of notation and conventions adopted in the paper.N denotes the set of natural numbers,R denotes the set of real numbers,B(R)denotes the Borel σ-algebra on R,and R+denotes the subset of R of nonnegative reals.For x∈R and y∈R, x∧y=min(x,y),x∨y=max(x,y),and x?=?x∧0.Recall also that?x?denotes the integer part of x and1Γdenotes the indicator-function of eventΓ.Two positive functions f(x) and g(x)of a real-valued argument are said to be asymptotically equivalent as x→∞,which is written as f(x)~g(x)if lim x→∞f(x)/g(x)=1.We write f(x)=O(g(x))if f(x)≤Cg(x) for some C>0and for all x great enough.Integrals of the form b a are understood as (a,b] unless otherwise indicated.For x>0and y>0,B(x,y)denotes Euler’s beta function de?ned by B(x,y)= 10u x?1(1?u)y?1du.

We denote by D the space of R-valued right-continuous functions on R+with lefthand limits.Its elements are denoted with lower-case bold-face Roman characters,e.g.,x=(x(t),t∈R+);x(t?) denotes the left-hand limit of x at t,?x(t)=x(t)?x(t?)denotes the size of the jump at t.The space D is endowed with the Skorohod J1-topology,is equipped with the Borelσ-algebra B(D), and is metrised by a complete separable metric,see Ethier and Kurtz[13],Jacod and Shiryaev

[17],and Liptser and Shiryaev[19]for the de?nition and properties.D↑denotes the subset of

D of increasing functions starting at zero equipped with the subspace topology.All stochastic processes encountered in this paper have trajectories in D and are considered as random elements of(D,B(D)).Weak convergence of probability measures on D and convergence in distribution of stochastic processes are understood with respect to the Skorohod topology.

We recall that a?ltered probability space,or a stochastic basis,(?,F,F,P)is de?ned as a probability space(?,F,P)endowed with an increasing right-continuous?ow F=(F(t),t∈R+) of sub-σ-algebras of F.Such a?ow is also referred to as a?ltration.We will assume without further mention that allσ-algebras we consider are complete with respect to the corresponding probability measure.For background on the general theory of stochastic processes used in the paper,the reader is referred to Jacod and Shiryaev[17]and Liptser and Shiryaev[19].For background on L′e vy processes,see Bertoin[4].For the properties of regularly and slowly varying functions,see Bingham,Goldie,and Teugels[6].

2The non-overshooting L′e vy process

Fixα∈(0,1).For x∈D↑,we de?ne aσ-?nite measureν(x;dt,dx)on R+×R by the equality

ν(x;[0,t],G)=

t

G\{0}

1{0

where σ(t )=∞if ∞

0?X

(q )αdq ≤t .Note that σ(t )is an F L -stopping time.Also,for t < ∞

0?X (q )αdq ,it is an absolutely continuous and strictly increasing function of t with inverse σ(?1)(t )= t

0?X

(q )αdq and σ(t )=t

?X (σ(s ))?αds.(2.5)Also,σ(t )>t for t < ∞

0?X (q )αdq ,so σ(t )→∞as t →∞if ∞

0?X (q )αdq =∞.We de?ne the process X

by

X

(

t )=1??X (σ(t )).(2.6)

This is clearly an increasing pure-jump process with X

(0)=0and lim t →∞ X (t )=1.We evaluate its predictable measure of jumps.By (2.2)and the form of the L′e vy measure of L ,the process ?X

is F L -adapted with predictable measure of jumps

?ν([0,t ],G )=

t 0

G \{0}

1{??X (s )

1+

x

1? X

(s ) α?1

αx ?α?1dx ds ,G ∈B (R ),

(2.9)

as required.

We now assume that X is a process as in the hypotheses of the theorem.Let μdenote the measure of jumps of X

,i.e., μ([0,t ],G )=

0

1{?e X (s )∈G \{0}}.

Since

t 0 R 1{e X (s )≥1?x }+1{x ≤0} ν( X ;ds,dx )=0,it follows that t 0 R

1{e X

(s ?)≥1?x }+1{x ≤0}

μ(ds,dx )=0a.s.,so 0

(s )<1? X (s ?)a.s.,in particular, X is increasing and X (t )∈[0,1]a.s.We also note that lim t →∞ X (t )=1a.s.To see the latter,denote,for ?∈(0,1),τ?=inf {t : X (t )≥1??}.The F -compensator of X is the process

t 0x ν(ds,dx ),t ∈R + .Note that by (2.1) t 0x ν(ds,dx )=αB (α,1?α) t 0

1? X (s ) 1?αds .Then,for t >0,by the fact that

X is a bounded process, E

X (t ∧τ?)=αB (α,1?α) E t ∧τ? 0

1? X (s ) 1?α

ds ≥αB (α,1?α)?1?α E

(t ∧τ?).

It follows that E

τ?<∞,so τ?<∞a.s.,which proves the claim.In order to prove that the distribution of X

is speci?ed uniquely,we reverse the procedure we employed when establishing existence.In what follows,we reuse the earlier notation.Motivated by (2.6),according to

which ?

X (t )=1? X (σ(?1)(t )),and noting that by (2.5)σ(t )= t 0

(1? X (s ))?αds ,we de?ne σ(?1)(t )in terms of X

as follows:σ(?1)(t )=inf {s :s ∧e τ

(1? X

(q ))?αdq >t },(2.10)

where τ=inf {s : X (s )=1}≤∞and σ(?1)(t )= τif e τ0(1? X

(q ))?αdq ≤t .Note that σ(?1)(t ),as a function of t ,is increasing and right-continuous.Moreover,for t < e τ0(1? X

(q ))?αdq ,it is strictly increasing and absolutely continuous with respect to Lebesgue measure,and

σ(?1)(t )=

t

(1? X

(σ(?1)(s )))αds,(2.11)

where we de?ne X

(∞)=1.Let

?X

(t )=1? X (σ(?1)(t )).(2.12)

As the random variable σ(?1)(t )is an F

-stopping time,on the one hand,and a right-continuous function of t ,on the other hand,we have that the σ-algebras ?F

(t )= F (σ(?1)(t ))are well de?ned,the ?ow ?F

=(?F (t ),t ∈R +)is right-continuous,and the process ?X is ?F -adapted.Note also that lim t →∞ X (t )= X ( τ).This has been proved for τ=∞.If τ<∞,then E ? X ( τ)= E s>0? X (s )1{e X

(s ?)<1,?e X (s )=1?e X (s ?)}=0.It follows that the process ?X is continuous at t = e τ0(1? X (q ))

?αdq if t <∞and ?X (t )→0a.s.on the set where t =∞.Arguing in analogy with (2.8),we conclude that the predictable measure of jumps of ?X

is given by (2.7).The process

L (t )=?

t 0

d ?X (s )

?X

(s ?)=σ(?1)(t )∧e τ 0

d X (s )1? X

(s ?)<∞},

so L (t )<∞ P -a.s.on the set t <∞.

By (2.7)and (2.13),the process L is ?F

-adapted with predictable measure of jumps Π(dx )ds.Thus,L is a L′e vy process,so its distribution is speci?ed uniquely.By (2.13)the process ?X

solves the Dol′e ans equation (2.2),so its distribution is speci?ed uniquely too (by (2.3)).As we have seen,

(2.3)implies that ?X (t )>0for all t and lim t →∞X (t )=0a.s.Hence,by (2.12) τ=lim t →∞σ(?1)(t ).

In addition,σ(?1)(t )< τ,so e τ0(1? X

(q ))?αdq =∞.Therefore by (2.11)and (2.12) τ=

∞ 0

?X

(q )αdq.(2.14)

In addition,(2.11)and (2.12)also imply that σ

σ?1(t )

=t ,where σ(t )is de?ned by (2.4).Another

application of (2.12)shows that equation (2.6)holds for t < τ.By (2.14),σ( τ)=∞,so (2.6)holds

for t ≥ τ.Thus,the distribution of X

is uniquely speci?ed by the distribution of ?X .The proof of the uniqueness of X

is complete.We now establish the formula for E τn in the statement of the lemma.By (2.14), E τn =

∞ 0

...

∞ 0

E ?X (q 1)α...?X (q n )αdq 1...dq n =n !

···

0≤q 1≤q 2≤...≤q n

E

?X (q 1)α...?X (q n )αdq 1...dq n =n !

···

0≤q 1≤q 2≤...≤q n

E exp αn k =1

(n ?k +1) ln ?X

(q k )?ln ?X (q k ?1)

dq 1...dq n ,(2.15)where q 0=0.By (2.3),ln ?X (t )= 0

e vy process with L′e vy measure 1{x ≤0}αe αx (1?e x )?α?1dx .Therefore,for u >0,E e u ln ?

X (q )

=exp q 0 ?∞

(e ux ?1)αe αx (1?e x )?α?1dx =exp ?q 1 0

(1?x u )αx α?1(1?x )?α?1dx

,

so,by (2.15), E τn =n !

···

0≤q 1≤q 2≤...≤q n n

k =1

exp ?(q k ?q k ?1)1 0

(1?x α(n ?k +1))αx α?1(1?x )?α?1

dx

dq 1...dq n

=n !

n

k =1∞

exp ?q 1 0

(1?x αk )αx α?1(1?x )?α?1dx dq =n !n k =1 1 0

(1?x αk )αx α?1(1?x )?α?1

dx ?1,

(2.16)

which is the required result.In particular, τ<∞ P

-a.s.We show that τhas a light-tailed distribution.By (2.16),

E τn ≤n !

1

(1?x α)αx

α?1

(1?x )

?α?1

dx

?n

=n !( E τ)n .

The bound E exp(c τ)≤1/(1?c ?E τ)when c ?E τ<1follows by the Taylor expansion for the

exponential function.

Remark 2.1.A slightly more intricate argument than the one used when deriving the latter bound

shows that (2.16)implies that E e c n e τ<∞where c n

=( E τn /n !)?1/n .

3Convergence of conditioned L′e vy processes

Recall that X=(X(t),t∈R+)denotes an increasing pure-jump stable L′e vy process starting at zero with L′e vy measureαx?α?1dx,whereα∈(0,1).We assume that X is de?ned on a probability space(?′,F′,P′).We also denote,as in the introduction,

τ=inf{t:X(t)≥1},(3.1) and let X denote the process X stopped atτ: X(t)=X(t∧τ).

Theorem3.1.The conditional laws of X given the events X(τ)≤1+?,considered as distributions on D,weakly converge as?↓0to the law of X.

Remark3.1.As a consequence,the distribution of X can be interpreted as the distribution of X conditioned on the event X(τ)=1,which justi?es calling X a L′e vy process conditioned not to overshoot.

The proof of this theorem as well as the proof of Theorem4.1in Section4will be obtained by an application of the following result,which is a special case of Theorem IX.3.21in Jacod and Shiryaev[17].

Lemma3.1.Consider a sequence X(n)of R-valued pure-jump semimartingales with predictable measures of jumpsν(n)(dt,dx)de?ned on?ltered probability spaces(?(n),F(n),F(n),P(n)).Suppose that the X(n)are of locally bounded variation,i.e., t0 R|x|ν(n)(ds,dx)<∞for t∈R+.Let an R+-valued function K(y;G),where y∈R and G∈B(R),be Borel-measurable in y and be aσ-?nite measure on(R,B(R))in G such that K(y;{0})=0.Suppose that the following conditions hold:

1.sup y∈R R|x|K(y;dx)<∞,

2.for an arbitrary R-valued continuous function g(x),x∈R,such that g(x)≤M|x|,x∈R, with some M>0,the function R g(x)K(y;dx)is continuous in y,

3.for arbitraryδ>0and an arbitrary R-valued continuous function g(x),x∈R,such that

g(x)≤M|x|,x∈R,with some M>0,

P(n) |t 0 R g(x)ν(n)(ds,dx)?t 0 R g(x)K(X(n)(s);dx)ds|>δ =0,

lim

n→∞

4.the X(n)(0)converge in distribution to a random variable X0as n→∞,

5.there exists at most one pure-jump semimartingale X=(X(t),t∈R+)with initial condition

X0and with predictable measure of jumpsν(dt,dx)=K(X(t);dx)dt.

Then the X(n)converge in distribution to X.

Lemma3.1will be applied with

K(y;G)= G\{0}1{0

Lemma 3.2.The function K satis?es conditions 1and 2of Lemma 3.1.Proof.We have

for

g

(

x

)as

in condition 2of Lemma 3.1and for y ∈(0,1),

R

g (x )K (y ;dx )=(1?y )?α

1

g (x (1?y ))(1?x )α?1αx ?α?1dx.

(3.3)

Thus,

R |x |K (y ;dx )≤αB (α,1?α),so condition 1of Lemma 3.1holds.Condition 2follows by the assumption that |g (x )|≤M |x |,continuity of g (x ),and Lebesgue’s bounded convergence theorem.

Proof of Theorem 3.1.Let F ′(t )denote the σ-algebra generated by the random variables X (s ),s ≤t , F

(t )=F ′(t ∧τ),and F =( F (t ),t ∈R +).We introduce a change of measure on F ′(τ)by letting Q

′(?)

(Γ)=

P ′(Γ∩{X (τ)≤1+?})

d P ′

F (t ) =P ′(X (τ)≤1+?|F ′(t ∧τ)) u (?)(1)

+1{τ>t }

u (?)(1?X (t ))

Z

(t ?)M P ′b μ( Z | P )(t,x ).

(3.7)

We recall that P

denotes the σ-algebra on ?×R +×R which is the product of the predictable σ-algebra on ?×R +associated with F and the Borel σ-algebra on R ,and M P ′b

μdenotes the measure on ?×R +×R de?ned by the equality

M P

b μf =E

′∞ 0 R

f (ω,t,x ) μ(dt,dx )

for f ≥0,where μis the measure of jumps of X ,i.e., μ([0,t ],G )=

0

1{?X (s )∈G }.

(3.8)

Accordingly,M P ′

b μ( Z | P )(t,x )is the conditional expectation of Z with respect to P ,i.e.,it is a

P -measurable function g (ω,t,x )such that M P ′b

μh Z =M P ′b μhg for all nonnegative P -measurable h .We will work further on with the version of the predictable measure of jumps given identically by (3.6).By

(3.5)and

(3.8),

M P ′

b μh Z

=E

∞ 0 R

h (ω,t,x )

1{τ≤t }

1{X (τ)≤1+?} u (?)(1)

μ(dt,dx )

=E

∞ 0

∞ 0

h (ω,t,x )

1{X (t ?)<1}1{X (t ?)+x ≥1}

1{X (t ?)+x ≤1+?}

u (?)(1)

μ(dt,dx ).

Hence,

M P ′

b μ( Z | P )(t,x )=

1

u (?)(1?X (t ))

1{X (t )<1}1{1≤X (t )+x ≤1+?}

+1{X (t )+x<1} u (?)

(1?X (t )?x ) αx ?α?1

dx dt.(3.9)

Recall,see Dynkin [9,Theorem 6]or Rogozin [21,Theorem 7],that

u (?)(y )=Φα

?

π

y

u ?α(1+u )?1du.

We will need the easily veri?ed properties that

lim y →0

y α?1Φα(y )=

sin πα

Φα(?(1?X (t ))?1)

1{X (t )<1}1{1≤X (t )+x ≤1+?}

+1{X (t )+x<1}Φα(?(1?X (t )?x )?1)

αx ?α?1dx dt.(3.12)

Condition3of Lemma3.1clearly holds if,for an arbitrary continuous function g(x)with|g(x)|≤M|x|,

lim ?→0sup

ω∈?′

|

t

g(x) ν′(?)(dt,dx)?

t

1

g(x)K( X(t);dx)dt|=0.(3.13)

We proceed with a proof of(3.13).Let

ν′(?)1(dt,dx)=1{x>0}

Φα(?(1?X(t))?1)

1{X(t)+x<1}Φα(?(1?X(t)?x)?1)αx?α?1dx dt.(3.14b) Using the monotonicity ofΦα,we have,for b>0,

t 0

x ν′(?)

1

(ds,dx)=

α

Φα(?(1?X(s))?1) 1+?

1?α

t

1{?(1?X(s))?1>b}

1{X(s)<1}(1?X(s))1?α

1?X(s) 1?αds +

α

Φα(?(1?X(s))?1) 1+?

(1?α)Φα(b) 1+11?X(s)

1?αds +

α

Φα(?)

(1?α)

?

(1?α)Φα(b) 1+1Φα(?)?α?1.(3.15)

By the convergence in(3.11),for all small enough?the second term on the rightmost side of(3.15) can be made arbitrarily small by choosing b small enough.We conclude that

lim ?→0sup

ω∈?′

t

x ν′(?)

1

(ds,dx)=0.(3.16)

We now consider ν′(?)

2

.We have,forη∈(0,1)and b>0,

|t

g(x) ν′(?)

2

(ds,dx)?

t

1

g(x)K( X(s);dx)ds|

≤M

t

1

1{X(s)+x<1}|

Φα(?(1?X(s)?x)?1)

1?X(s) α?1|αx?αdx ds

=M

t

(1?X(s))1?α1{X(s)<1}

1

|

Φα(?(1?X(s))?1(1?x)?1)

Φα(?(1?X(s))?1)

αx?αdx ds +M

t

(1?X(s))1?α1{X(s)<1}1{?(1?X(s))?1>b}

1

(1?x)α?1αx?αdx ds

+M

t

(1?X(s))1?α1{X(s)<1}1{?(1?X(s))?1≤b}

1?η

|

Φα(?(1?X(s))?1(1?x)?1)

Φα(?(1?X(s))?1)

αx?αdx ds

+M

t

(1?X(s))1?α1{X(s)<1}

1

1?η

(1?x)α?1αx?αdx ds.(3.17)

The last term on the rightmost side of(3.17)is not greater than Mt 11?η(1?x)α?1αx?αdx,so it tends to zero asη→0uniformly inω∈?′.Consider the fourth term on the rightmost side of (3.17).On multiplying the numerator of the fraction in 11?ηwith?α?1(1?X(s))1?α(1?x)1?αand multiplying the denominator with?α?1(1?X(s))1?α,we have that it is not greater than

Mt

sup y≥0Φα(y)yα?1

inf y≤bΦα(y)yα?1

?1 ∨ 1?inf y≤bη?1Φα(y)yα?1

b 1?α

sup y≥bΦα(y)

Convergence(3.13)follows by(3.16),(3.18)and the equality ν′(?)= ν′(?)

1+ ν′(?)

2

(see(3.12),(3.14a)

and(3.14b)).

4Convergence of the conditioned random walk

In this section we state and prove the main result of the paper.We brie?y recall the setting. We are concerned with the random walk S n= n i=1ξ,whereξ1,ξ2,...is an i.i.d.sequence of random variables de?ned on a probability space(?,F,P)such that Eξ1<0and,for someγ>0, E exp(γξ1)=1and Eξ1exp(γξ1)=∞.The distribution exp(γx)P(ξ1∈dx)is denoted F.We also denote by F the distribution ofξ1under P so that F(dx)=exp(γx) F(dx).We extend slightly the notation introduced in(1.4)and(1.7)by letting for r>0

τ(r)=min{n:S n≥r},χ(r)=Sτ(r)?r.

Let also

X(r)(t)=

1

1?F(y)

≤1+C(1?x).

If,in addition,F is a nonlattice distribution,then,as r→∞,the conditional distributions of the X(r)givenτ(r)<∞weakly converge to the distribution of the non-overshooting L′e vy process X.If,instead,F is a lattice distribution with span h,then,as n→∞,where n∈N,the conditional distributions of the X(nh)givenτ(nh)<∞weakly converge to the distribution of the non-overshooting L′e vy process X.

Remark4.1.Under condition1,the function?(x)=xα 1?F(x) is slowly varying at in?nity, i.e.,lim x→∞?(yx)/?(x)=1for all y>0.According to Karamata’s theorem,see Bingham,Goldie, and Teugels[6]or Feller[14],it admits the representation?(x)=c(x)exp( x1?(u)/u du),where c(x)→c>0and?(x)→0as x→∞.If c(x)in this representation is a constant,or converges to the limit quickly enough,then condition2of the theorem holds.

Remark4.2.The full power of the requirements thatα∈(1/2,1)and that r be taken as a multiple of the lattice span when F is a lattice distribution are only used in the proof of Lemma4.1.The rest of the proof applies to any distribution F from the domain of attraction of a stable law with indexα∈(0,1).

Remark4.3.Note that F is lattice if and only if F is lattice with the same span.

The proof of Theorem4.1is similar to the proof of Theorem3.1and involves a change of measure.The technical details are much more intricate though.We start,however,by laying the groundwork and provide two auxiliary lemmas.The next result is contained in Theorems1and2 in Korshunov[18].However,some details of the proof are omitted there,so we?ll in the gaps in our proof.We recall that E?denotes expectation with respect to measure P?de?ned by(1.3).

Lemma4.1.Let condition1of Theorem4.1hold.

1.If,in addition,F is a nonlattice distribution,then,for some C0>0,as r→∞,

E?e?γχ(r)~

C0

nh(1?F(nh))

.

Proof.We introduce strict ascending ladder indices T1,T2,...by letting T0=0and T n=min{k>

T n?1:S k?S T

n?1>0}for n∈N.Letζk=S T

k

?S T

k?1

for k∈N.Under P?,theζk are a.s.?nite

and i.i.d.,and E?T1<∞,see Asmussen[2,VIII.2].We let F+denote the common distribution function of theζk(under P?).Adapting the argument of the proof of Lemma2in Korshunov[18], we write,for x≥0,

1?F+(x)

1?F(x)

H(du),

where H(u)=1{u=0}+ ∞k=1P?(S1≤0,S2≤0,...,S k≤0,S k≤u)for u≤0.Under condition 1of Theorem4.1,lim x→∞(1?F(x?u))/(1?F(x))=1,so by Lebesgue’s bounded convergence theorem,

lim

x→∞

1?F+(x)

Note that z (x )=O (1/x )as x →∞,which follows from the following calculations:

z (x )=

[x,x +ln x/γ]

+ (x +ln x/γ,∞)

≤(F +(x +ln x

x

,F +(x +

ln x

γ

(1?F +(x ))ln x

π(1?α)

∞ 0

e ?γx (1?F +(x ))dx.

In addition,by Theorem 1of Erickson [10],as r →∞,

?H +(r )

r

(1?F +(x ))dx →0.

If we also recall (4.3)and the fact that,according to Karamata’s theorem (see Proposition 1.5.8in Bingham,Goldie,and Teugels [6]), r

0(1?F +(x ))dx ~r (1?F +(r ))/(1?α),we obtain the asymptotic equivalence asserted in part 1with

C 0=

1

π

∞ 0

e ?γx (1?F +(x ))dx.

For lattice distributions,we haven’t been able to ?nd in the literature an analogue of Erickson’s

Theorem 3.Therefore,we,in e?ect,deduce it from the local renewal theorem of Garsia and Lamperti [11]for our particular case by using the approach of Erickson [10].As a matter of fact,we improve on Erickson’s argument so that we can give a streamlined proof of his Theorem 3.

Let F be lattice with span h .Then F +is also lattice with span h .We can write for θ∈(0,1)and suitable A >0,on recalling that z (x )=O (1/x )as x →∞,

[0,nh ]z (nh ?x )H +(dx )=

[0,θnh ]z (nh ?x )H +(dx )+

(θnh,nh ]

z (nh ?x )H +(dx )

A

By the fact that the tail of F+is regularly varying at in?nity with index?α,we have(see Feller [14,XIV.3]or Bingham,Goldie,and Teugels[6,8.6])that H+(x)~(sinπα/πα)(1?F+(x))?1as x→∞,so

lim θ→0lim sup

n→∞

nh(1?F+(nh))

A

n?k

1?F+(nh)

π

.(4.9)

Hence,

lim

n→∞n

1?F+((n?k)h)

m(n?k)1{n?k≥?θn?}=

sinπα1?F+((n?k)h)

?

n?α

n?k

1?F+(nh)

n?k 1?F+(nh)

π

k=0

z kh .(4.11)

Putting together(4.3),(4.6),(4.7),(4.8),and(4.11),we conclude that

lim

n→∞

nh(1?F(nh)) [0,nh]z(nh?x)H+(dx)=1π∞ k=0z(kh)h.(4.12)

By Garsia and Lamperti[11],(4.3),and(4.9),nh(1?F(nh))z(0)?H+(nh)→h z(0)(E?T1)?1sin(πα)/πas n→∞,so the second assertion of the lemma follows by(4.5) and(4.12)with

C′0=1

π

k=1

z(kh)h=

1

π

k=0

e?γkh 1?F+(kh) h.

The following lemma comes in useful too.Note that the?rst part is Potter’s theorem(see Bingham,Goldie,and Teugels[6,Proposition1.5.6]).

Lemma4.2. 1.Let L(x)be a slowly varying at in?nity function.Then,given an arbitrary ?>0,there exists x0>0such that L(x)/L(y)≤(1+?) (x/y)∨(y/x) ?for all x≥x0and y≥x0.

2.If F is regularly varying at in?nity with index?α,whereα∈(0,1),then

lim sup r→∞A→∞

sup

y∈[A/r,1]

y(1?F(ry))

1?F(r)

y

xF(r dx)≤

y1?α

u

du ,

where c(x)→c>0and?(x)→0as x→∞.Therefore,for all x and y large enough,

L(x)

c(y)

exp x y?(u)u du| .

The inequality in part1of the statement now follows by a simple algebraic manipulation.

In order to prove the?rst inequality of part2,note that the function?(x)=xα(1?F(x)) is slowly varying at in?nity.Hence,for given arbitrary?∈(0,1?α),we have by part1for all y∈(0,1]and r such that ry is large enough

y(1?F(ry))

?(r)

≤y1?α(1+?)y??≤1+?.

We prove the second inequality.Integration by parts yields

y

0x F(r dx)=

y

F(ry)?F(rx) dx.

On picking A∈(0,ry)and partitioning the integration interval[0,y]into two pieces[0,A/r]and (A/r,y],we have

1

r(1?F(r))+

1

1?F(r)

≤(1+?)x?α??.

Therefore,for these A and r ,

1

1?α??

.

The required bound follows now by (4.13)and the

fact that the ?rst term on the right of (4.13)tends to zero as r →∞(and as A is kept ?xed large enough).

We now introduce the change of measure.Let the absolutely continuous with respect to P ?probabilty measure Q (r )on (?,F τ(r ))be de?ned by

d Q (r )

E ?e ?γχ(r )

.

(4.14)

By (1.6),for Γ∈F τ(r ),

P (Γ|τ(r )<∞)=

E ?e ?γχ(r )

1?F (r )

F (r (

G \{0})).

(4.18)

Since X (r )(t )=X (r )(t ∧ τ(r )),the measure of jumps of X

(r )is given by

μ(r )

([0,t ],G )=

?(t ∧b τ(r ))/(1?F (r ))?

i =1

1{ξi /r ∈G \{0}},

(4.19)

and the F

(r )-predictable measure of jumps of X (r )under P ?is given by ν(r )([0,t ],G )=ν(r )([0,t ∧ τ(r )],G ).

(4.20)For y >0,we denote

u (r )(y )=E ?e ?γχ

(ry )

.

(4.21)

实验5 JAVA常用类

山西大学计算机与信息技术学院 实验报告 姓名学号专业班级 课程名称 Java实验实验日期成绩指导教师批改日期 实验5 JAVA常用类实验名称 一.实验目的: (1)掌握常用的String,StringBuffer(StringBuilder)类的构造方法的使用;(2)掌握字符串的比较方法,尤其equals方法和==比较的区别; (3)掌握String类常用方法的使用; (4)掌握字符串与字符数组和byte数组之间的转换方法; (5)Date,Math,PrintWriter,Scanner类的常用方法。 二.实验内容 1.二进制数转换为十六进制数(此程序参考例题249页9. 2.13) 程序源代码 import java.util.*; public class BinToHexConversion{ //二进制转化为十六进制的方法 public static String binToHex(String bin){ int temp; //二进制转化为十六进制的位数 if(bin.length()%4==0) temp = bin.length()/4; else temp = bin.length()/4 + 1; char []hex = new char[temp]; //十六进制数的字符形式 int []hexDec = new int[temp];//十六进制数的十进制数形式 int j = 0; for(int i=0;i=0&&dec<10) return (char)('0'+dec-0); else if(dec>=10&&dec<=15) return (char)('A'+dec-10); else return '@'; }

孙鑫深入详解MFC学习笔记

Windows编程 一、#define的几个注意点 ①#与##的用法; #xxx将后面的参数xxx字符串化 xxx##yyy,将两个参数连接 ②\的用法 一行结束使用,表示一行未结束。 二、函数调用约定_stdcall _stdcall是Pascal方式清理C方式压栈,通常用于Win32Api中,函数采用从右到左的压栈方式,堆栈由它自己清理。在win32应用程序里,宏APIENTRY,WINAPI,都表示_stdcall,非常常见。 相对应的_cdecl,堆栈由main()函数或者其他函数清理。 C和C++程序的缺省调用方式则为__cdecl,下图为VC++6.0的默认设置,因此在不显式写明调用约定的情况下,一般都是采用__cdecl方式,而在与Windows API打交道的场景下,通常都是显式的写明使用__stdcall,才能与Windows API保持一致。 另外,还要注意的是,如printf此类支持可变参数的函数,由于不知道调用者会传递多少个参数,也不知道会压多少个参数入栈,因此函数本身内部不可能清理堆栈,只能由调用者清理了。 三、防止头文件重复包含----预编译 在写好的类的首位加上预编译代码,例如: #ifndef xxx_h #define xxx_h Class xxx { ... }; #endif 四、HDC、CDC、CClientDC、CWindowDC HDC是平台SDK提供的全局类,与设备上下文相关 CDC则是类似于封装在CWnd中的一个HDC。 CClientDC:继承于CDC,构造函数完成获取DC,析构函数完成释放DC。 CWindowDC:继承于CDC,构造函数完成获取DC,析构函数完成释放DC,在整个窗口上绘图 CMetaFileDC:图元文件设备描述环境类 创建:CMetaFileDC dc; dc.Create(); 接下来用一般dc的绘图操作,绘图的内容均会保存至图元文件中; HMETAFILE m_hMetaFile=dc.Close();//图元文件赋予数据成员显示图元文件:用一般dc的PlayMetaFile(m_hMetaFile)显示图元文件 窗口销毁时删除图元文件 SDK函数::DeleteMetaFile(m_hMetaFile) 五、OnDraw函数、OnCreate函数 OnDraw函数:窗口重绘的时候被框架类FrameWnd调用,响应WM_PAINT消息。 OnCreate函数:窗口建立的时候调用的函数,响应WM_CREATE消息。

小白学Python笔记系列3.3.1 math库与random库

数学库及其使用 math库中常用的数学函数 函数数学表示含义 圆周率piππ的近似值,15位小数 自然常数e e e的近似值,15位小数 ceil(x) x 对浮点数向上取整 floor(x) x 对浮点数向下取整 pow(x,y)x y计算x的y次方 log(x)lg x以e为基的对数, log10(x)log10x以10为基的对数, sqrt(x)平方根 x

数学库及其使用 函数数学表示 含义exp(x)e的x次幂,degrees(x)将弧度值转换成角度radians(x)将角度值转换成弧度 sin(x)sin x 正弦函数cos(x)cos x 余弦函数tan(x)tan x 正切函数 asin(x)arcsin x 反正弦函数,x ?[-1.0,1.0]acos(x)arccos x 反余弦函数,x ?[-1.0,1.0]atan(x) arctan x 反正切函数,x ?[-1.0,1.0] math库中常用的数学函数

随机数库及其使用 random库中常用的函数 函数含义 seed(x)给随机数一个种子值,默认随机种子是系 统时钟 random()生成一个[0, 1.0)之间的随机小数 uniform(a,b)生成一个a到b之间的随机小数 randint(a,b)生成一个a到b之间的随机整数 randrange(a,b,c)随机生成一个从a开始到b以c递增的数 choice()从列表中随机返回一个元素 shuffle()将列表中元素随机打乱 sample(,k)从指定列表随机获取k个元素

随机数库及其使用 示例

JAVA中常用类的常用方法

JAVA屮常用类的常用方法 一.java?丨ang.Object 类 1、clone()方法 创建丼返M此对象的一个副木。要进行“克隆”的对象所属的类必须实现https://www.wendangku.net/doc/681584661.html,ng. Cloneable 接口。 2、equals(Objectobj)方法 0 功能:比较引用类型数据的等价性。 0 等价标准.?引用类型比较引用,基木类型比较值。 0 存在特例.?对File、String、Date及封装类等类型来说,是比较类型及对象的内稃而+ 考虑引用的是否为同一实例。 3、finalize〇方法 当垃圾丨"丨收器确定>(、存在对该对象的更多引用时,由对象的垃圾丨"丨收器调用此方法。 4、hashCode〇方法返 回该对象的哈希码值。 5、notify〇方法 唤醒在此对象监视器上等待的中?个线祝。 6、notifyAII〇方法 唤醒在此对象监视器上等待的所有线程= 7、toString()方法 返W该对象的字符串表示。在进行String与其它类型数据的连接操作时,&动调用tostringo 方法。可以根据耑要重写toStringO方法。 8、wait()方法 在其他线程调用此对象的n〇tify()方法或notifyAIIO方法前,异致当前线程等待。 二、字符串相关类 I String 类 charAt(int index)返回指定索引处的char值。compareTo{String anotherString)按字

典顺序比较两个字符串。compareTolgnoreCase(Stringstr)按字典顺序比较两个字 符串,不考虑人小写。concat(String str)将指定字符串连接到此字符串的结尾。 endsWith(String suffix)测试此字符串是否以指定的〗?缀结束。equals{Object anObject)将此字符串与指定的对象比较。 equalslgnoreCase(String anotherString)将此String 与另一个String 比较,考虑人小'与’。indexOf(int ch)返H指定字符在此字符串屮第一次出现处的索引。 indexOf(String str)返回第一次出现的指定子字符串在此字符串屮的索引, lastlndexOf(intch)返回指定字符在此字符串中最后??次出现处的索引。 length()返|n丨此字符串的长度。 replace(char oldChar, char newChar) 返回一个新的字符串,它是通过用newChar替换此字符串中出现的所有oldChar得到的。 split(String regex)根据给定正则表达式的匹配拆分此字符串。startsWith{String prefix)测试此字符 串是否以指定的前缀开始。substring(int beginlndex) 返回一个新的字符串,它是此字符串的一个子字符串。该子字符串始于指定索引处的字符,一直到此字符串末尾。 substring(int beginlndex, int endlndex) 返回一个新字符串,它是此字符串的一个子字符串。该子字符串从指定的beginlndex 处开始,一直到索引endlndex-1处的字符。 t〇CharArray()将此字符串转换为一个新的字符数组。

CRichEditCtrl

CRichEditCtrl MFC Library Reference Using CRichEditCtrl(https://www.wendangku.net/doc/681584661.html,/tie/7576199.html)rich edit控件是用户能够输入和编辑文本的窗口。文本能被指定字符和段落格式,并且也能包含嵌入式OLE对象。rich edit 控件在MFC中通过CRichEditCtrl类描绘。关于哪些你想知道更多?RichEdit控件概述 如果你在对话框中使用rich edit控件(不管你的程序是SDI,MDI,还是基本对话框),你必须在对话框显示之前调用AfxInitRichEdit一次。调用此函数的典型位置 在你的程序的InitInstance成员函数中。你不必每次显示对话框时调用它,仅仅第一次就可以了。如果你使用CRichEditView你不必调用 AfxInitRichEdit.Rich edit控件(CRichEditCtrl)为格式化文本提供程序接口。然而,一个程序必须实现任一用户接口组件,这个组件对于用户格式化操作可用是必要 的。那就是,Rich edit控件支持选定文本的字符或段落属性的改变。字符属性

的一些例子就是黑粗体,斜体,字体系列,和点大小。段落属性的例子如对齐,页边空白,和移字键 (英文原文:tab stops.表示在rich edit中按下tab键光标会移动一段距离)。然而,这是给你提供的用户接口,不管那是一个工具条按钮,菜单项,或是一个格式化字符对话框。也有函数对目 前选择查询richedit控件。使用这些函数显示当前属性设置,比如,设置一个选定标记在用户接口上,如果当前选择是黑粗体字符格式属性。参见CharacterFomatting和paragraph formatting查看更多字符段落格式化信息。rich edit控件支持几乎所有多行编辑控件( multiline edit controls)的操作和通知消息。因此,使用EDIT控件的应用程序很容易的变换为使用RICH EDIT控件。附加的消息和通知(notifications)能使程序访问richedit的其它特性。参看CEdit查看编辑控件消息。与rich edit控件有关的类 CRichEditView, CRichEditDoc, 和CRichEditCntrItem类提供在MFC的文档/视图结构环境内的RICH EDIT控件的功能。CRichEditView保持着文本和文本的格式化特性。CRichEditDoc保持着视图中OLE客户项的序列。CRichEditCntrItem提供对OLE客户项的container-side

过程控制实习报告

过程控制工程实习报告 学院:机械与控制工程班级:自动化10-3班 学号: 姓名:傅 指导老师:周 日期:年月

目录 1 绪论 (2) 1.1 过程控制系统的概述 (2) 2 西门子PLC的介绍 (2) 2.1 S7-300PLC介绍 (2) 2.2 S7-3O0主要功能模块介绍 (2) 3 基于PLC的双容量水箱控制系统硬件组成 (3) 3.1硬件模块 (3) 3.2 双容量水箱控制系统实验装置 (4) 3.3双容量水箱对象组成 (4) 4 基于PLC的双容量水箱控制系统的编程设计 (5) 4.1 控制原理 (5) 4.2 STEP 7简介 (6) 4.3 SEP7硬件组态及参数设置 (6) 4.4 SETP7程序设计 (8) 5 控制系统程序编写及调试、运行 (8) 5.1 S7-300_PLC模拟量输入输出量程转换模块FC105简介 (8) 5.2 系统的I/O地址分配 (8) 5.3 双容量水箱控制系统程序 (9) 6 实习结语 (13)

1 绪论 1.1 过程控制系统的概述 过程控制是指根据工业生产过程的特点,采用测量仪表、执行机构和计算机等自动化工具,应用控制理论,设计工业生产过程控制系统,实现工业生产过程自动化。随着生产过程的连续化﹑大型化和不断强化, 随着对过程内在规律的进一步了解,以及仪表﹑计算机技术的不断发展, 生产过程控制技术近年来发展异常迅速.所谓生产过程自动化, 一般指工业生产中(如石油﹑化工﹑冶金﹑炼焦﹑造纸﹑建材﹑陶瓷及热力发电等)连续的或按一定程序周期进行的生产过程的自动控制.凡是采用模拟或数字控制方式对生产过程的某一或某些物理参数(如温度﹑压力﹑流量等)进行的自动控制统称为过程控制,随着科学技术的飞速前进,过程控制也在日新月异地发展。它不仅在传统的工业改造中,起到了提高质量,节约原材料和能源,减少环境污染等十分重要的作用。生产过程自动化是保持生产稳定、降低消耗、减少成本、改善劳动条件、保证安全和提高劳动生产率重要手段,在社会生产的各个行业起着极其重要的作用。 2 西门子PLC的介绍 2.1 S7-300PLC介绍 S7-300是通用可编程控制器,它广泛地应用于自动化领域,涉及多个行业,可用于组建集中式或分布式结构的测控系统,重点在于为生产制造工程中的系统解决方案提供一个通用的自动化平台,性能优良,运行可靠。 S7-300PLC采用模块化结构,模块种类的品种繁多,功能齐全,应用范围十分广泛,可用于集中形式的扩展,也可用于带ET200M分布式结构的配置。S7系列PLC用DIN标准导轨安装,各模块用总线连接器连接在一起,系统配置灵活、维护简便、易扩展。CPU模块是PLC的核心,负责存储并执行用户程序,存取其他模块的数据,一般还具有某种类型的通信功能。信号模块用来传送数字量及模拟量信号,通信模块可提供PROFIBUS、以太网等通信连接形式。 2.2 S7-3O0主要功能模块介绍 1、导轨(Rail) S7-300的模块机架(起物理支撑作用,无背板总线),西门子提供五种规格的导轨。 2、电源模块(PS) 将市电电压(AC120/230V)转换为DC24V,为CPU和24V直流负载电路(信号模块、传感器、执行器等)提供直流电源。输出电流有2A、5A、10A三种*正常:绿色LED灯亮 *过载:绿色LED灯闪

一组惊艳的后台管理界面设计欣赏

一组惊艳的后台管理界面设计欣赏 做那种界面的时候,和设计网页的感觉不一样。因为得考虑的不只是美观,更多应该在操作体验及视觉舒适度上下足功夫。 这种界面会成为管理员长时间驻留的地方,会有很多数据表格。如果我们的配色太鲜艳或者太暗沉,都会让使用者遭受眼球上的磨难。 而且一些按钮和操作焦点没有做好区分和规范,那都会是致命的。 关于界面中的交互,这里优设哥送上前辈们留下的一句金句,非常经典,也很好记: 1、操作前可以预知; 2、操作中有反馈; 3、操作后可撤销; 不管怎么样,这三句话,你可以牢牢记住。这是只可意会不可言传的。等到你钻研达到一定程度了,自然就会明白咯。 而视觉方面的注意事项,其实大家都知道,依然是不要超过三个颜色。这点大家虽然都知道,可是在实际设计的过程中,会不知不觉的用多一些颜色出来,而且还潜意识说服自己:“这个加上也不错,干脆就用上吧。”整套设计稿出来,全局观察的时候,结果就有些混乱,干扰到数据的主视觉区域了。 好吧!今天就为大家带来speckyboy上收集整理的一些dribbble上的精华作品。我相信,这些作品惊艳到你甚至临摹不过来,不信可以试试哟:) Device Dashboard

Admin Tools Admin Charts

Wood Control Panel Responsive Dashboard

Datatable Content Ultramarine Admin

Flyout Menu Administration Panel

Minimalist Admin Dashboard Charts

随机振动(振动频谱)计算(Random Vibration)

Random Vibration 1. 定义 1.1 功率谱密度 当波的频谱密度乘以一个适当的系数后将得到每单位频率波携带的功率,这被称为信号的功率谱密度(power spectral density, PSD)。 功率谱密度谱是一种概率统计方法,是对随机变量均方值的量度。 1.2 均方根 均方根(RMS)是指将N项的平方和除于N后,开平方的结果。均方根值也是有效值,如对于220交流电,示波器显示的有效值或均方根值为220V。 2. 加速度功率谱密度 2.1 单位 加速度单位:m/s^2或g 加速度功率谱密度单位:(m/s^2)^2/Hz或g^2/Hz Hz单位为:1/s, 所以加速度功率谱密度单位也可写为:m^2/s^3 2.2功率谱密度函数 功率谱密度函数曲线的纵坐标是(g2/Hz)。功率谱曲线下的面积就是随机加速度的总方差(g2): σ2= ∫Φ(f)df 其中:Φ(f)........功率谱密度函数 σ ............. 均方根加速度 3. 计算示例 随机振动100-2000HZ,功率谱密度为0.01g^2/Hz,则其加速度峰值计算如下: σ2=0.01*(2000-100)=19 σ=4.36g 峰值加速度不大于3倍均方根加速度:13.08g

4、SAE J 1455 随机振动要求 4.1功率谱图 4.1.1 Vertical axis 4.1.2 Transverse axis 4.1.3 Longitudinal axis

4.2 Vertical axis加速度计算 功率谱曲线下的面积:σ2=(40-5)0.016+0.5*(500-40)*0.016=4.24σ=2.06g 峰值加速度不大于3倍均方根加速度:6.18g 5. FGE随机振动要求 5.1功率谱图

《网络程序设计》复习题

1、什么叫套接字?套接字按通信性质可以分为哪两类? 2、理解线程的创建与使用方法,并能应用到程序设计中。 3、异构环境下的网络程序设计需要考虑哪些问题? 4、为什么在数据结构struct sockaddr_in中,成员变量sin_addr和sin_port需要转换为网络字节顺序,而sin_family不需要呢? 5、从网络编程的角度来简述和比较IP地址和端口的作用。 6、为什么网络编程时需要考虑字节顺序问题? 7、WinSock编程中需要哪些文件? 8、UDP程序的工作模型隐含着通信标识五元组的建立过程。这五元组在UDP的客户与服务端是由哪些函数分别确定的? 9、什么是阻塞与非阻塞通信?请解释两者的区别。 10、简述各种类型数据的发送与接收处理的方法。 11、简述基于UDP的客户机/服务器端socket编程流程。 12、什么是通信三元组和五元组?三元组和五元组每个元素在网络连接中起到什么作用? 13、为什么服务端在TCP通信过程中需要调用bind( )函数而客户端不需要?为什么客户机通常不需要绑定自己的端口号? 14、简述套接字Select模型原理,以及select模型的优势和不足。 15、简述阻塞模式服务器和客户端工作流程,以及阻塞模式套接字的优势和不足。 16、在实际应用中,很多TCP服务器程序在非正常退出时,如果立即重启服务器进程则会发生绑定服务器端口失败的错误,从而无法启动服务器进程,但等待一段时间后就可以了。为什么会发生这种情况呢?如何解决这个问题(或采取什么措施可以立即重启服务器进程)?(要求掌握setsockopt()函数的用法) 17、TCP程序的工作模型隐含着通信标识五元组的建立过程。这五元组在TCP的客户与服务端是由哪些函数分别确定的? 18、accept( )为什么要返回一个套接口?或者说,为什么要为每一个连接创建一个套接口来处理?UDP 服务器端为什么不需要多个套接口? 19、理解生产者-消费者模型,理解线程的同步与互斥方法(event和critical-section),并能应用到程序设计中。 20、采用阻塞式I/O模型时,套接字函数recv()的返回值有哪几种?分别对应什么情况? 21、closesocket()函数和shutdown()函数有何差别? 22、什么是TCP的三次握手机制?为什么要使用TCP的三次握手机制? 23、服务器端并发的两种模型及编程实现。 考试形式:闭卷 考试时间:120分钟 考试题型:选择题(2’×10=20’)、简答题(10’×6=60’)、程序设计题(20’)

4:一个经典的多线程同步问题汇总

一个经典的多线程同步问题 程序描述: 主线程启动10个子线程并将表示子线程序号的变量地址作为参数传递给子线程。子线程接收参数 -> sleep(50) -> 全局变量++ -> sleep(0) -> 输出参数和全局变量。 要求: 1.子线程输出的线程序号不能重复。 2.全局变量的输出必须递增。 下面画了个简单的示意图: 分析下这个问题的考察点,主要考察点有二个: 1.主线程创建子线程并传入一个指向变量地址的指针作参数,由于线程启动须要花费一定的时间,所以在子线程根据这个指针访问并保存数据前,主线程应等待子线程保存完毕后才能改动该参数并启动下一个线程。这涉及到主线程与子线程之间的同步。 2.子线程之间会互斥的改动和输出全局变量。要求全局变量的输出必须递增。这涉及到各子线程间的互斥。 下面列出这个程序的基本框架,可以在此代码基础上进行修改和验证。 //经典线程同步互斥问题 #include #include #include long g_nNum; //全局资源 unsigned int__stdcall Fun(void *pPM); //线程函数 const int THREAD_NUM = 10; //子线程个数 int main() { g_nNum = 0;

HANDLE handle[THREAD_NUM]; int i = 0; while (i < THREAD_NUM) { handle[i] = (HANDLE)_beginthreadex(NULL, 0, Fun, &i, 0, NULL); i++;//等子线程接收到参数时主线程可能改变了这个i的值} //保证子线程已全部运行结束 WaitForMultipleObjects(THREAD_NUM, handle, TRUE, INFINITE); return 0; } unsigned int__stdcall Fun(void *pPM) { //由于创建线程是要一定的开销的,所以新线程并不能第一时间执行到这来int nThreadNum = *(int *)pPM; //子线程获取参数 Sleep(50);//some work should to do g_nNum++; //处理全局资源 Sleep(0);//some work should to do printf("线程编号为%d 全局资源值为%d\n", nThreadNum, g_nNum); return 0; } 运行结果:

后台系统规范设计心得

后台系统采用一整套UI,为什么会形式各异?能统一并带来更好的体验吗?基于交互设计师自己的内心疑问,我们迫切的产出一套设计规范用于统一后台操作系统,利于用户使用习惯的培养和延续,降低学习成本,提高使用效率,有效提高开发效率,方便功能的优化扩展。基于现有的系统,我们抽丝剥茧,才有了如今的阶段性成果。 用户是谁?需求是什么?交互设计师对于一个项目最基本的了解就是源于这两个问题。我们做这次规范也是如此。。。。。。 你知,或者不知

规范就在那里 不悲不喜 用户是谁?我们的系统是给谁用的? 初期是给我们的小二,后期系统会开放,外部商家或是委托方也会来使用我们的系统。那么我们第一次做系统规范的由于商家或委托方的信息掌握不到,可以主要针对我们的小二。我们的小二有什么特点呢?他们目前是什么方法在录入信息的呢? 小二这个角色在我们的部分可以细分为:认证小二,物流小二,行业运营小二(行业运营小二里面还分:买手,买手助理,店铺运营小二,网站运营小二……)每种角色来这个系统的目的都是不同的,行业运营小二,进来主要是录入信息,跟踪订单。物流小二主要是查看审核行业小二的申请,跟踪订单,查看报表。认证小二主要是审核行业小二或商家的申请,跟踪认证情况,分析数据。

需求是什么? 由于当初系统发展情况参差不齐交互资源不够,前端控件没做,导致用户极难使用。系统开放过程中,频繁的更换交互、视觉还有前端,导致现在单个系统交互方式有差异,多个系统呈现给同一个用户时,虽然基本框架没问题,但是在操作过程中效率低。 解决方案:用户急需一个好用的后台系统来提高他们的效率。 我们这次要做规范的目的是统一现有三个系统的视觉+交互规范,然后交付前段,前端来规定他们的代码规范。让我们一起走上提高我们小二的工作效率的第一步。 你念,或者不念 规范就在那里 不来不去 从哪个纬度展开规范设计? 1. 控件 在计算机编程当中,控件(或部件,widget或control)是一种图形用户界面元素。是一种基本的可视构件块,包含在应用程序中,控制着该程序处理的所有数据以及关于这些数据的交互操作。 在PARC研究中心对施乐的Alto电脑(Xerox Alto)用户界面的研究基础上,如今已逐渐产生一组包含常规信息的可重用控件。常规控件的不同组合通常打包在部件工具箱中,程序员可以构建图形用户界面(G UI s)。大多操作系统包括一套用于程序设计的控件,程序员只需将它们加入应用程序,指定它们的行为。 组合控件 描述:为实现产品中某一特定功能而独立出来的模块,其特点在于功能相对单一,在结构层和行为层应具备很强的可复用性,在表现层应保持一致性,方便用户识别。从单一控件可以

java随机函数用法Random

java随机函数用法Random import java.util.Random; public class RandomNumber{ public static void main(String[] args) { // 使用https://www.wendangku.net/doc/681584661.html,ng.Math的random方法生成随机数System.out.println("Math.random(): " + Math.random()); // 使用不带参数的构造方法构造java.util.Random对象System.out.println("使用不带参数的构造方法构造的Random对象:"); Random rd1 = new Random(); // 产生各种类型的随机数 // 按均匀分布产生整数 System.out.println("int: " + rd1.nextInt()); // 按均匀分布产生长整数 System.out.println("long: " + rd1.nextLong()); // 按均匀分布产生大于等于0,小于1的float数[0, 1) System.out.println("float: " + rd1.nextFloat());

// 按均匀分布产生[0, 1)范围的double数 System.out.println("double: " + rd1.nextDouble()); // 按正态分布产生随机数 System.out.println("Gaussian: " + rd1.nextGaussian()); // 生成一系列随机数 System.out.print("随机整数序列:"); for (int i = 0; i < 5; i++) { System.out.print(rd1.nextInt() + " "); } System.out.println(); // 指定随机数产生的范围 System.out.print("[0,10)范围内随机整数序列: "); for (int i = 0; i < 10; i++) { // Random的nextInt(int n)方法返回一个[0, n)范围内的随机数 System.out.print(rd1.nextInt(10) + " "); } System.out.println(); System.out.print("[5,23)范围内随机整数序列: "); for (int i = 0; i < 10; i++) {

Java常用类库介绍

教学内容 第七讲Java常用类库介绍 7.1 Java类库的结构 类库就是Java API(Application Programming Interface,应用程序接口),是系统提供的已实现的标准类的集合。在程序设计中,合理和充分利用类库提供的类和接口,不仅可以完成字符串处理、绘图、网络应用、数学计算等多方面的工作,而且可以大大提高编程效率,使程序简练、易懂。 Java类库中的类和接口大多封装在特定的包里,每个包具有自己的功能。表7.1列出了Java中一些常用的包及其简要的功能。其中,包名后面带“. *”的表示其中包括一些相关的包。有关类的介绍和使用方法,Java中提供了极其完善的技术文档。我们只需了解技术文档的格式就能方便地查阅文档。 表7.1Java提供的部分常用包 注:在使用Java时,除了https://www.wendangku.net/doc/681584661.html,ng外,其他的包都需要import语句引入之后才能使用。 7.2 https://www.wendangku.net/doc/681584661.html,ng包中的常用类

https://www.wendangku.net/doc/681584661.html,ng是Java语言最广泛使用的包。它所包括的类是其他包的基础,由系统自动引入,程序中不必用import语句就可以使用其中的任何一个类。https://www.wendangku.net/doc/681584661.html,ng中所包含的类和接口对所有实际的Java程序都是必要的。下面我们将分别介绍几个常用的类。 7.2.1 String类和StringBuffer类 许多语言中,字符串是语言固有的基本数据类型。但在Java语言中字符串通过String类和StringBuffer类来处理。 1.String类 Java语言中的字符串属于String类。虽然有其它方法表示字符串(如字符数组),但Java使用String 类作为字符串的标准格式。Java编译器把字符串转换成String对象。String对象一旦被创建了,就不能被改变。如果需要进行大量的字符串操作,应该使用StringBuffer类或者字符数组,最终结果可以被转换成String格式。 (1)创建字符串 创建字符串的方法有多种方式,通常我们用String类的构造器来建立字符串。表6.2列出了String 类的构造器及其简要说明。 表7.2 String类构造器概要 【例7.1】使用多种方法创建一个字符串并输出字符串内容。 public class StrOutput { public static void main(Sring[] args) { //将字符串常量作为String对象对待,实际上是将一个String对象赋值给另一个 String s1 = "Hello,java!"; //声明一个字符串,然后为其赋值 String s2; s2 = "Hello,java!";

CSerialPort类解析

CserialPort类的功能及成员函数介绍 CserialPort类是免费提供的串口类,Codeguru是一个非常不错的源代码网站CserialPort类支持线连接(非MODEM)的串口编程操作。 CserialPort类是基于多线程的,其工作流程如下:首先设置好串口参数,再开启串口检测工作线程,串口检测工作线程检测到串口接收到的数据、流控制事件或其他串口事件后,就以消息方式通知主程序,激发消息处理函数来进行数据处理,这是对接受数据而言的,发送数据可直接向串口发送。 介绍几个经常用到的函数: 1、串口初始化函数InitPort 这个函数是用来初始化串口的,即设置串口的通信参数:需要打开的串口号、波特率、奇偶校验方式、数据位、停止位,这里还可以用来进行事件的设定。如果串口初始化成功,就返回TRUE,若串口被其他设备占用、不存在或存在其他股占,就返回FALSE,编程者可以在这儿提示串口操作是否成功如果在当前主串口调用这个函数,那么pPortOwner可用this指针表示,串口号在函数中做了限制,只能用1,2,3和4四个串口号,而事实上在编程时可能用到更多串口号,可以通过通过注释掉本函数中“assert(portur>0&&portnr<5)”语句取消对串口号的限制。 if (m_ComPort[0].InitPort(this,1,9600,'N',8,1,EV_RXFLAG | EV_RXCHAR,512)) //portnr=1(2),baud=9600,parity='N',databits=8,stopsbits=1,

//dwCommEvents=EV_RXCHAR|EV_RXFLAG,nBufferSize=512 { m_ComPort[0].StartMonitoring(); //启动串口监视线程 SetTimer(1,1000,NULL); //设置定时器,1秒后发送数据} e lse { CString str; str.Format("COM1 没有发现,或被其它设备占用"); AfxMessageBox(str); } 2、启动串口通信监测线程函数StartMonitoring() 串口初始化成功后,就可以调用BOOL StartMonitoring()来启动串口检测线程,线程启动成功,返回TRUE。 BOOL CSerialPort::StartMonitoring() { if (!(m_Thread = AfxBeginThread(CommThread, this))) return FALSE; TRACE("Thread started\n"); return TRUE; } 注意这个函数一旦调用,就会建立一个线程,这个线程一直不会结束,调用StopMonitoring ()只是将这个线程挂起。 3、暂停或停止监测线程函数StopMonitoring() 该函数暂停或停止串口检测,要注意的是,调用该函数后,串口资源仍然被占用 // // Suspend the comm thread // BOOL CSerialPort::StopMonitoring() { TRACE("Thread suspended\n"); m_Thread->SuspendThread(); return TRUE; } 4、关闭串口函数ClosePort() 该函数功能是关闭串口,释放串口资源,调用该函数后,如果要继续使用串口,还需要调用InitPort()函数。 这里有一个问题,在以前的版本中,如果调用了StartMonitoring函数,关闭串口后,再打开就会出现问题,及网上所说的关闭死锁问题。找了大量资料后,

后台系统规范设计心得

后台系统规范设计心得 后台系统规范设计心得 时间:2012-03-15 10:39来源:阿里巴巴良无限UPD团队作者:阿里巴巴良无限UPD团围观: 1964 次 .Aav553 { display:none; } 后台系统采用一整套UI,为什么会形式各异?能统一并 带来更好的体验吗?基于交互设计师自己的内心疑问,我们迫切的产出一套设计规范用于统一后台操作系统,利于用户使用习惯的培养和延续,降低学习成本,提高使用效率,有效提高开发效率,方便功能的优化扩展。基于现有的系统,我们抽丝剥茧,才有了如今的阶段性成果。 一些事 用户是谁?需求是什么?交互设计师对于一个项目最基 本的了解就是源于这两个问题。我们做这次规范也是如此。。。。。。一些事 你知,或者不知 互联网的一些事

规范就在那里 互联网的一些事 不悲不喜 互联网的一些事 用户是谁?我们的系统是给谁用的? yixieshi 初期是给我们的小二,后期系统会开放,外部商家或是委托方也会来使用我们的系统。那么我们第一次做系统规范的由于商家或委托方的信息掌握不到,可以主要针对我们的小二。互联网的一些事 我们的小二有什么特点呢?他们目前是什么方法在录入信息的呢? yixieshi 小二这个角色在我们的部分可以细分为:认证小二,物流小二,行业运营小二(行业运营小二里面还分:买手,买手助理,店铺运营小二,网站运营小二……)每种角色来这个系统的目的都是不同的,行业运营小二,进来主要是录入信息,跟踪订单。物流小二主要是查看审核行业小二的申请,跟踪订单,查看报表。认证小二主要是审核行业小二或商家的申请,跟踪认证情况,分析数据。互联网的一些事

引用java中随机函数的使用

引用java中随机函数的使用 引用 axunlb的java中随机函数的使用 java中随机函数的使用 Random N = new Random(1000);中的1000产生的随机数在0到1000之间,参数用于指定随机数产生的范围 方法1 (数据类型)(最小值+m()*(最大值-最小值+1)) 例: (int)(1+m()*(10-1+1)) 从1到10的int型随数 方法2 获得随机数 for (int i=0;i<30;i++) {.println((int)(1+m()*10));} (int)(1+m()*10) 通过包的random方法得到1-10的int随机数 公式是:最小值---最大值(整数)的随机数

(类型)最小值+m()*最大值 方法3 Random ra =new Random(); for (int i=0;i<30;i++) {.println(ra.nextInt(10)+1);} 通过包中的Random类的nextInt方法来得到1-10的int随机数import .*; class Test { public static void main(String args[]) { int[] t = new int[10]; Random rand = new Random(); for(int i=0;i

} } } java中Random的构造函数Random()中默认的种子就是当前时间和midnight, January 1, 1970 UTC的差值(用毫秒计),所以每次运行程序都可以得到不同的结果nt()也可以如此用r.nextInt(100)—–100以内的随机数

JAVA中常用类的常用方法

JAVA中常用类的常用方法 一、类 1、clone()方法 创建并返回此对象的一个副本。要进行“克隆”的对象所属的类必须实现. Cloneable接口。 2、equals(Object obj)方法 功能:比较引用类型数据的等价性。 等价标准:引用类型比较引用,基本类型比较值。 存在特例:对File、String、Date及封装类等类型来说,是比较类型及对象的内容而不考虑引用的是否为同一实例。 3、finalize()方法 当垃圾回收器确定不存在对该对象的更多引用时,由对象的垃圾回收器调用此方法。 4、hashCode()方法返回该对象的哈希码值。 5、notify()方法唤醒在此对象监视器上等待的单个线程。 6、notifyAll()方法唤醒在此对象监视器上等待的所有线程。 7、toString()方法 返回该对象的字符串表示。在进行String与其它类型数据的连接操作时,自动调用toString()方法。可以根据需要重写toString()方法。 8、wait()方法 在其他线程调用此对象的 notify() 方法或 notifyAll() 方法前,导致当前线程等待。

二、字符串相关类 l String类 charAt(int index) 返回指定索引处的 char 值。 compareTo(String anotherString) 按字典顺序比较两个字符串。compareToIgnoreCase(String str) 按字典顺序比较两个字符串,不考虑大小写。concat(String str) 将指定字符串连接到此字符串的结尾。 endsWith(String suffix) 测试此字符串是否以指定的后缀结束。 equals(Object anObject) 将此字符串与指定的对象比较。 equalsIgnoreCase(String anotherString) 将此 String 与另一个 String 比较,不考虑大小写。 indexOf(int ch) 返回指定字符在此字符串中第一次出现处的索引。 indexOf(String str) 返回第一次出现的指定子字符串在此字符串中的索引。lastIndexOf(int ch) 返回指定字符在此字符串中最后一次出现处的索引。length() 返回此字符串的长度。 replace(char oldChar, char newChar) 返回一个新的字符串,它是通过用 newChar 替换此字符串中出现的所有 oldChar 得到的。 split(String regex) 根据给定正则表达式的匹配拆分此字符串。 startsWith(String prefix) 测试此字符串是否以指定的前缀开始。 substring(int beginIndex) 返回一个新的字符串,它是此字符串的一个子字符串。该子字符串始于指定索引处的字符,一直到此字符串末尾。