# Alfa3test. Updated situation

I’m still operative…even if a couple of weeks ago I had some problem with the battery pack.It discharged and didn’t have any idea to be recharged again….

This happend while I was recording some data.In particular I was verifying the test structure behaviour in relation to the variation of the PID parameters.I did some recordings and I can now describe a little sucess: my theorical mathematical model is quite reppresentative of the real quadricopter behaviour.Here you can find the link

In those pics you can see the theorical (blu)  roll and real (red) roll while the pid control is working.

This is the case P=0.3 I=0 D=0.05 This is the case  P=0.5 I=0.7 D=1,75 I can use this important information because I can  verify in the math model the quad behaviour playing with the  P,I and  D , waiting to find a solution with the battery pack!

# SW Dev: Math model- correction and improvement

Hi,
in previous post I attached an xls file with math model of the dynamics of the quadcopter.
I recognized a stupid error. I caclulated the acceleration not using rpm, but the rpm % causing wrong result for R.acc and consequently all the rest.

In this new version I also added the calculation of the angular speed of the motor that can balance the gravity (w hover) wh ( see for calculation details  the prop page)

control loop rev 2

Again, if someone interested can send me its own quadcopted data (length motor-quad center,arm mass,motor mass,total mass,prop data,PID parameters)I’d like to put in there to validate my model.

# SW Dev: Math model for control loop

Before to start development of the python code, I tryied to create the math model that can reproduce the theoretic dynamic behaviour of a quadcopter.You can find it in  control_loop.xls.[Rimoved. See here]

Please, if someone interested can send me its own quadcopted data (length motor-quad center,arm mass,motor mass,total mass,hover motor speed,PID parameters)I’d like to put in there to validate my model.

Hypothesis:

• configuration +copter
• case study: Roll

Data:

• R.target is the desired roll angle
• R.acc is the angular acceleration(calculated respect the angular motor speed w of the previous )

Dynamic balance is given by:

(F1-F3)b=I R.acc Kprop(w1^2-w3^2)b= I R.acc

with Kprop=(Mtot*g)/wh^2   I=(Mbar*b^2)12+2*Mmotor*b^2

R.acc=Kprop*(w1^2-w3^2)b/I

• R.vel is the angula roll speed calculated as integral of R.acc
• R.curr is the thoretical roll angle calculated as integral of R.vel. This value should correspond ot the return of a gyroscope mounted on board of the real quadcopter. So using this model I can play with P,I,D parameters and find out teh best configuration.