Download presentation
Presentation is loading. Please wait.
1
AAE 450 Spring 2008 Adam Waite 2/7/08 Dynamics and Control Gaussian Probability Function Collaboration with Mike Walker
2
AAE 450 Spring 2008 Gaussian Probability Method Inputs Average Value of Parameter (ex. Isp, wind speed, mass flow rate) Standard Deviation Create an array (ex. input = [AvWindSpeed, StdDevWind]) Output Randomized value for the Parameter based on Gaussian Probability Model ex. WindSpeed = Gauss_Density(input) Dynamics and Control Num. of Iterations10100100010000100000 Percent Error8.310.6950.1830.05380.0201 Example using WindSpeed equal to 20 m/s with StdDev = 1 m/s By Adam Waite
3
AAE 450 Spring 2008 Implementing Gaussian Function Currently used by the simulator for thrust, mass flow rate, and wind speed Need standard deviation values for: -Isp, mdot, wind speed Dynamics and Control Future Work Finalize controller Set up program for Monte Carlo simulation Investigate hardware necessary to implement controller Simulink by Mike Walker and Adam Waite Location of Gauss Function is in DNC subgroup in Sim 2.05 folder
4
AAE 450 Spring 2008 References Smith, Julius O. Spectral Audio Signal Processing, March 2007 Draft, http://ccrma.stanford.edu/~jos/sasp/, Stanford University The MathWorks Inc., “gaussmf help file,” 2007 Dynamics and Control
5
AAE 450 Spring 2008 Derivation of Gaussian Function This is the main Gaussian equation Rearrange the function to solve for the variable x Matlab is then used to pick a random number between 0 and 2 to put as the function f If the number is between 0 and 1, the negative square root is used If the number is between 1 and 2, the positive square root is used This is the Gauss_Density function with average value and sigma as inputs Derivation by Mike Walker
6
Gauss_Density Function AAE 450 Spring 2008 %ISP Variance function for integration with DNC SIM %By: Mike Walker %January 31 2008 function Value = Gauss_Density(inp) %sigma is sqrt(9) = 3 format long g MEAN=inp(1); sig=inp(2); num_rand = 2.*rand; if(num_rand <=1) r= num_rand; x1 = -sqrt(-2*sig*sig*log(r))+MEAN; else r=num_rand -1; x1 = sqrt(-2*sig*sig*log(r))+MEAN; end Value = x1; Function by Mike Walker
7
Test File AAE 450 Spring 2008 % Test Run for Wind Speed Values % Adam Waite clear clc close all AvWindSpeed = 20; sigma = 1; input = [AvWindSpeed, sigma]; for t = 1:1000 WindSpeed(t) = Gauss_Density(input); end % For infinite iterations, the averaged values for WindSpeed % Should be equal to the given average value number = sum(WindSpeed)/length(WindSpeed) Test File for Gauss_Density function by Adam Waite
8
Old Method Using Simulink Block AAE 450 Spring 2008 Simulink by Adam Waite Used a randomizer block that needed the average value and the variance Can be seen in the above model as Thrust Value Randomizer Used for thrust and wind direction
9
Old Method (cont.) AAE 450 Spring 2008 Simulink by Adam Waite Reasons for Not Using this Method Simulink block also required a seed number which produced the same “randomizations” for every run Required a for loop in Matlab to run through different seed numbers for each use of the block which would slow down the program Did not use Gaussian method
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.