For movement in a plane the 1D model will be generalized. Generalization of movement along the x-axis to movement in the plane will be effected by changing from real x to complex x+iy. Apart from the 2D position a new variable will occur, the direction of the long axis of the body. So the model is effctively 3D. The generalization from 1D to 2D is most easily effected using a discrete formulation of the 1D model. The basic 1D discrete model is formulated  here, with T the sampletime and k.T the kth sampling moment. In the model T=0.001, this will give a good approximation to the analog (continuous) system. A first order low pass filter for the speed sp, with timeconstant τv, is implemented as

spfilt(k)=(exp(-T/τv))*spfilt(k-1)+(1- exp(-T/τv))*sp

 

The 1D model in discrete form

Define startconditions for k=1

for k=2 to Nend

xM(k)=xM(k-1)+ vM(k-1)*T

r(k) = xF(k)-xM(k)

sp=Kr*(|r(k)|-rref)

spfilt(k)=(exp(-T/τv))*spfilt(k-1)+(1- exp(-T/τv))*sp

vM(k)=(exp(-T/τ))*vM(k-1)+(1- exp(-T/τ))*spfilt(k)

end

Megachile_2D_Model

In the 2D generalization xM is a complex number indicating a position in the plane. In the same way xF is a complex number. The direction of the long axis of the body is represented by a complex number  Body=exp(i.φ). It is assumed that the body should point to the female. This will be effected by a separate “fixation” control system  (Boeddeker and Egelhaaf, 2005).

 

The fixation control system

for k=2 to Nend

φ(k)=φ(k-1)+ αfilt(k-1)*T

θe(k)=β(k)-φ(k)

d θe(k)=( θe(k)- θe(k-1))/T

α(k)=KrB*sin(θe(k))+KdB*d θe(k)

αfilt(k)=( exp(-T/τf))* αfilt(k-1)+(1- exp(-T/τf))*α(k)

end

 The sine of the error angle θe is amplified by the proportional gain KrB and the velocity dθeis amplified by KdB to obtain the rotation  to be applied to the body direction. A low pass filter is used to model the neural and mechanical delay. To combine both loops it is assumed that the speed in the position loop is a real number. vM is in the 2D case a complex number calculated by :

vM(k)=(exp(-T/τ))*vM(k-1)+(1- exp(-T/τ))*spfilt(k)*exp(i.φ(k))

In steady state, with constant spfilt and φ, vM will assume the value spfilt*exp(i.φ), this is a vector in the direction of the male body axis with size spfilt (spfilt may be negative).

The complete 2D algorithm :

Define startconditions for k=1

for k=2 to Nend

xM(k)=xM(k-1)+ vM(k-1)*T

r(k) = xF(k)-xM(k)

sp=Kr*(|r(k)|-rref)

spfilt(k)=(exp(-T/τv))*spfilt(k-1)+(1- exp(-T/τv))*sp

φ(k)=φ(k-1)+ αfilt(k-1)*T

vM(k)=(exp(-T/τ))*vM(k-1)+(1- exp(-T/τ))*spfilt(k)*exp(i.φ(k))

θe(k)=β(k)-φ(k)

d θe(k)=( θe(k)- θe(k-1))/T

α(k)=KrB*sin(θe(k))+KdB*d θe(k)

αfilt(k)=( exp(-T/τf))* αfilt(k-1)+(1- exp(-T/τf))*α(k)

 

Change over to a small reference distance to initiate a chase.

Collision detection

end

The model needs 9 parameters : 3 timeconstants, 3 gains ( the gain for distance control and two gains for bodyrotation) the reference distance before and after the backward part of the path and a threshold to change over from high to low reference distance to initiate a chase after the female. The starting values are the values of vM (direction and size), the position and the body direction. The starting values are adapted from the experiment with fine tuning to obtain a better fit between model and experiment. An example of the results to be obtained with the model is given here.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.