Fill This Form To Receive Instant Help
Homework answers / question archive / Problem 1) The below system represents the lateraldirectional dynamics of an aircraft trimmed as some flight condition
Problem 1) The below system represents the lateraldirectional dynamics of an aircraft trimmed as some flight condition. The control input is the aileron position in degrees and the states and outputs are as follows:
x

Æ: roll angle, rad 
p: roll rate, rad/sec 

r: yaw rate, rad/sec 

v: yaxis velocity, ft/sec 
y= 
Æ: roll angle, deg 
p: roll rate, deg/sec 

b: sidelsip angle, deg 

r: yaw rate, deg/sec 
a) Implement this aircraft in Simulink (using the StateSpace block?) and use the below figure to create the control input to the system using the Signal Builder block from the Sources library. Input the same signal to both inputs. Plot the state (X) and output (Y) response to the below control input for the 10 second simulation. (15 points)
b) Now, create the measurement (Z) by adding normal random noise to each of the outputs. Use the variance values of [0.5, 0.5, 0.1, 0.01] (assume these are also the diagonal values in the R matrix) for the noise, respectively, and add the noise to the output. Change the sample time on the random noise to 0.01 seconds. Generate the measurement time histories. (10 points)
c) Next, implement the maximum likelihood estimator and create the time history of the estimated states (Xhat). (10 points)
d) Finally, generate figures that overlay the outputs (Y) and measurements (Z) on the same figure and the true states (X) and estimated states (Xhat) on a different figure. (5 points)
File Edit Group Signal Axes Help ™
cM Smee.  KM WIA po wp Pe TY
Active Group:  Group 1 v JY a ©
1.5 
Signal 4
se
0.5 
0
0.5 °
1°
1.5 —_ > ss ss)
0 1 2 3 4 5 6 7 8 9 10
Time (sec)
———_ A
Name: Signal 1
Index: 1 “ J
a=[...
0.0002 1.0000 0.2282 0;
0.1093 1.0542 0.3059 0.0222;
0.0497 0.0348 0.0133 0.0035;
30.9911 53.3924 234.0021 0.0034];
b=[...
0.0392 0.0392;
0.0015 0.0015;
0.0094 0.0094;
0.0154 0.0154];
c=[...
57.2957 0.2865 0.0654 0;
0.0313 57.5978 0.0876 0.0064;
0.0370 0.0637 0.2793 0.2387;
0.0142 0.0100 57.2920 0.0010];
Problem 2) DiscreteTime Kalman Filter 60 points
To the diagram from problem 1, add a discretetime Kalman filter and compare the results as follows:
a) Implement the discretetime Kalman filter (DKF) in the Simulink diagram you created for Problem 1. Feel free to use MATLAB or Embedded MATLAB blocks to make creation easier. Take the initial value of the covariance matrix P to be identity. Use Q as identity as well but keep the R values from Problem 1 and the same input.
Plot the estimates from the DKF as compared to the estimates from the maximum likelihood estimator. Comment on the similarities or differences in the estimates from the two methods (20 points)
b) Now, let’s look closer at the covariance matrix and the corresponding errors between the true states and the estimated states. For the Q and R values listed above, plot the time history of each state error on a scope/graph along with the + and — square root value of the respective covariance matrix. An example is shown below in which the yellow line is the state error, the blue line is the +sqrt(P(4,4)) and the red line is the sqrt(P(4,4)). (20 points)
c) Now experiment by running four additional cases of varying Q and R values. Run the cases where Q = 0.01*eye(4) and Q = 100*eye(4) and note the changes in the graphs that the effects of process noise have on the estimates. Make Q = eye(4) again and then run cases where R = 100 times the original values and where R = 0.01 times the original values to see the effects of measurement noise on the estimates. (10 points)
d) Based upon these variations in the Q and R matrices, which of them is closest to being ‘tuned’, meaning that the error in the states lies within +/ the square root of the respective covariance matrix elements about 8090% of the time, but not completely within those bounds? (10 points)