How to integrate angular velocity to get angular position?
Ältere Kommentare anzeigen
Hi there!
I have some flight test data and I need to integrate the roll velocity with respect to time to find the plane's roll angle at each point in time.
Ive tried the following however it produces a graph that decreases at a constant rate with some variation. The time period of measurement is constant and 0.1s.
RollRateIn = cumtrapz(RollRate);
The RollRate varies scholastically with maxima ~ +/-20 Rad/s.
I'd really appreciate some help on this guys!
Jasper

Antworten (1)
Star Strider
am 10 Mär. 2018
0 Stimmen
If the integral is decreasing, and with your experiment design it should not be decreasing, then you are integrating a constant, perhaps a negative mean value of the roll rate. (This could be due to calibration problems with the sensor.)
I would do a simple linear fit (using polyfit) to see if there is a linear trend, and also take the mean of your data to see if it is other than zero. You can then use the linear trend information to detrend your data, or simply subtract the mean if that turns out the be the problem.
7 Kommentare
jasper wagen
am 11 Mär. 2018
Star Strider
am 11 Mär. 2018
My pleasure.
To clarify my original Answer: I intended that you apply ‘a simple linear fit (using polyfit) to see if there is a linear trend’ to your original data, not to the integrated data. (A linear trend in your original data would produce a parabolic integration result.)
I would also like to chime in here. I notice that you have 7200 seconds of data, which is two hours of flight. There could be a lot of additional effects that you might want to consider in order to determine the bank angle of the aircraft over such a long period of time.
First of all, the bank angle is obtained by integrating the Euler rate equations, it is not simply the integral of the roll rate. Given "phi" is the bank angle, the equation you want to integrate is the rate of change of the bank angle which is given by
phidot = p + q*sin(phi)*tan(theta) + r*cos(phi)*tan(theta)
where:
phidot = rate of change of the Euler bank angle
p = rollrate
q = pitch rate
r = yawrate
theta = Euler pitch angle
The integral of this equation gives bank angle over time. As you can see, if theta is zero, then the bank angle is simply the integral of p, however...
Second, note that if the aircraft flies for two hours due north, the earth turns 30 degrees in this time, so the bank angle reference (i.e. horizontal) drifts by 30 degrees. If it is flying due south, the reference changes in the opposite direction. In addition, two hours of straight-line travel at 100 knots will result in approximately 3.33 degrees of pitch angle change due to Earth curvature. At higher speed, the effect is greater. So the location of the aircraft over the earth will also have an effect on the bank angle. In addition, there appears to be a significant level of noise in the roll rate signal, and two hours is a very long time to navigate by "dead reckoning" - there must certainly be sensor errors (e.g. gyro drift) which needs to be accounted for. Given the level of noise present in the rate data, you have virtually no chance of getting the correct bank angle without some additional information (such as GPS, or other position information) which could be blended with the rate data in a Kalman filter. As you can see, using strapdown sensors to track an aircraft attitude is a complex business over long periods of time.
Does any of this apply to your situation?
jasper wagen
am 12 Mär. 2018
I'm sorry, but I don't know offhand of any references for flight data analysis. I rely on my many years of experience. I have attached a file with some comments on the data plot that you posted.
The number 1 most important rule of data analysis is that you must understand the source of the data. You need to know what type of sensors and acquisition system were used and the test procedures that were followed in order to be able to understand how accurate the data is, and what errors are inherent. I.e. what is the sensor capable of doing, and how was it actually used. This is the starting point in any data analysis.
Ths looks like a very interesting problem (to me, anyway) and I'm sure that you will learn a lot from this experience.
jasper wagen
am 13 Mär. 2018
Fabrice Lallement
am 19 Apr. 2018
Bearbeitet: Fabrice Lallement
am 19 Apr. 2018
Previous answers are perfect for your issue. I would just like to add a reference for understanding INS data since you were asking for one. It is a bit lengthy but really simple to understand.
An introduction to inertial navigation. Oliver J. Woodman
You can easily find the article on Internet.
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
