Don Kim
• Male
• United Kingdom
• Blog Posts
• Discussions (4)
• Groups
• Photos
• Photo Albums
• Videos

## Don Kim's Discussions

### Renormalization Part in 'Direction Cosine Matrix IMU: Theory'

Started this discussion. Last reply by Don Kim Mar 26, 2012.

After computing orthogoanl X, Y and Z matrix, a Taylor's expansion is used in 'Direction Cosine Matrix IMU: Theory'.Scaling X, Y and Z using a Taylor's expansion,[In the paper]X_norm =  0.5 (3 -…Continue

# Don Kim's Page

## Profile Information

Auto pilot!
I am interested in sensor fusion, easpecially DCM and KF.

At 4:22pm on March 15, 2012,
T3
William Premerlani
said…

Hi Don,

"Now I am implementing in MATLAB through your C programming code. But I have encountered some problems.

1)      Your C programming (R.c) looks slightly different from 'Direction Cosine Matrix IMU' when I look at the accelerometers part.  After computing the magnitude of speed over ground from the GPS, I am not really sure how to compute the centrifugal acceleration. Because this C programming codes corrects body acceleration for centrifugal effect directly.

2)      What is different when accelerometers measure only gravity? How the system is different? How to design it? Is there any problem?

3)      'simstruc.h' requires any MATLAB MEX files or any input files to run this program. If you do not mind, I could have your files or give me any clues for inputs.

4)      How you could decide PI controller gains (Kp yaw and pitch-roll=0.02 / Ki yaw and pitch-roll=0.00001)?

[Summary]

1)      Would you explain the accelerometer part?

2)      How to design it when the accelerometers measure only gravity?

3)      Would you help me decide input values?

4)      Would you explain how to decide PI controller gains?"

1. Regarding acceleration, there were a couple of slight changes from the draft paper, as we learned more...the centrifugal acceleration compensation is computed from the air speed, not the ground speed. I make the approximation that the angle of attack and side slip angles are zero. Therefore the centrifugal acceleration is computed from the cross product of the gyro rotation rate vector with the air velocity vector. We also account for forward acceleration from GPS information.

2. All physical accelerometers measure acceleration minus gravity, there are no sensors that can measure gravity only. However, if you are doing a simulation, and you want to use gravity only, then simply skip the acceleration compensation computations.

3. Regarding the MATLAB simulations, you will have to contact Paul Bizard, he did that work.

4. Regarding the PI controller gains, Paul Bizard did a study of a range of values and selected values that gave good performance. However, if you look at the latest code in MatrixPilot, you will see that I am now using a much different approach. For more information on that, you should read my report on the subject.

Best regards,

Bill

At 8:51am on March 26, 2012, Paul Bizard said…

Hi Don,

I don't work on the DCM algorithm anymore. Sorry but I don't have the time to help you very much.

Regarding your question, it seems that William Premerlani has chosen a different approach for the latest code. I don't know what it is.

The values of the gains that I found "optimal" (in my way) in the original algorithm are :

KPPitchRoll   0.012 // Pitch-Roll correction proportional gain

KIPitchRoll   0.00002 // Pitch-Roll correction integral gain

KPYaw         0.3    // Yaw correction proportional gain

KIYaw         0.0001 // Yaw correction integral gain

(International system units)

Good luck.

Best regards,

Paul

At 9:29pm on March 26, 2012, Paul Bizard said…

Hi Don,

1/ I found the gains by gut feelings. I have some experience.

- KI is set relatively to KP in order to avoid oscillations of the response

- the two of them are set high enough to filter the noise from the accelerometers but low enough to allow recovery in case of divergency (this happens if the plane flies aerobatics)

If you want a more powerful attitude estimation algorithm then try the Extended Kalman Filter. It is very powerful.

2/ I don't understand your second question.

Regards,

Paul

At 5:17am on March 27, 2012, Paul Bizard said…

Hi Don,

I don't understand what you mean by "help me set these inputs" ?

Do you mean "generate these inputs" ?

I used my Matlab/Simulink model to generate the inputs. It is a sort of flight simulator.

Regards,

Paul

At 6:38am on March 27, 2012, Paul Bizard said…

Hi Don,

Best regards,

Paul

Join DIY Drones

1

2

3

4

5

6

7

8

9

## Groups

45 members

1472 members

282 members

470 members

• ### 3D Models

57 members

Season Two of the Trust Time Trial (T3) Contest
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here