Discrete Time Sample Block not giving the expected integrated results?
1 view (last 30 days)
Show older comments
Hi all,
My aim is to be able to visualise flight data in FlightGear. I am feeding into FlightGear via the FlightGear 6DOF preconfigured block a set of parameters (roll rate, pitch rate, yaw rate, horizontal velocity (u,v), vertical rate(w) ).
I am using discrete timing block to integrate my result into position coordinates and aircraft attitude. I realised that I was able to adjust the gains of the blocks to match the desired amplitude for aircraft yaw. However, I was unable to obtain explainable results when I do this for both pitch and roll rates. If anyone has insights to why there was an incomprehensible dip in the output for integrated roll attitude that would be great. I have tried using different solvers and rules to no avail.
Data Read in model:
Expected Yaw:
Simulink Output yaw (Note that each time step is 0.23 seconds, scope read is from the output of the subsystem block which relates to the aircraft attitude)
Expected Pitch:
Simulink Output Pitch:
Expected Roll:
Simulink Output Roll:
Simulated Input Pitch Rate, Roll Rate and Yaw Rate all matches my original flight data:
Pitch Rate Input:
0 Comments
Accepted Answer
Sebastian K
on 23 Nov 2016
There are many unknowns here that might be related to the issue you are encountering.
I am assuming that you are loading sampled pre-recorded data from the workspace. Is the workspace data a timeseries object or is it a matrix with time and data components?
One important parameter here is the sampling rate at which your data was recorded. At one point in your post you mention that each time step is 0.23 seconds. Is this the sampling period at which the data is recorded?
There are several things that you could try here:
1) Make sure that the sampling time of the Simulink model is either smaller than or equal to the sampling time of your data.
2) Try using a continuous-time integrator block. If the output still looks wrong to you, try decreasing the sampling time of the model.
3) If you are able to obtain a better response with the continuous integrator, but still need to use a discrete integrator, then decreasing the sampling time of the integrator block might be helpful.
If none of these approaches help with this issue, you might try to contact the MathWorks Technical Support group.
2 Comments
More Answers (0)
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!