Return to search

Simulering av simulinkmodeller medExtended Kalman FilterTidsoptimering av integrering

Simulation of different systems can be done using a graphical model description of the system based on block diagrams. The simulation software Matlab/Simulink offers a lot of possibilities to describe a huge number of systems, which can be linear as well as nonlinear. The simulation using Matlab/Simulink is done by integration based on different kinds of numerical methods. When nonlinear Simulink-models are simulated, it is often interesting to apply a Kalman filter to handle the noise that may occur within the process as well as corrupting the measurement. However, application of such a filter leads to an extensive time-consumption despite using fast computers. The reason is that the existing Matlab functions are not constructed for time optimal evaluation. The time-consuming procedures partly consist of the integration between the sample points and partly of the calculation of the correction term in the Kalman filter. To calculate the correction term and correct the states for the influence of the noise, the integration has to be interrupted for each sampling point. This interruption makes new call to the model at each sampling point concerning the measurement data. The function call to the model is the main reason for the large time-consumption. The goal for this thesis work is to reduce the time consumption for the integrating part of the model simulation. This can be done by the development of new methods that carry out the filtering simulation without a frequent call to the Simulink-model. This can be possible to perform by a conversion from the Simulink-model description to a state-model description. The optimized parts regarding to time, consisting of the integration and filtering part, will furthermore be brought together in a routine for filtering simulation (the filtering part of the simulation is being managed in a complementary report). The time-optimized routine is then able to perform the filtering simulation of nonlinear Simulink-models, but with a time consumption that is manageable. The optimized integration and filtering parts, has in the final routine made it possible to make the filtering simulation with a time-consumption that is reduced by approximately a factor of ten. The goal, to reduce the current time consumption to be more manageable, has thereby been accomplished. The integrating part is in the final routine reducing the time-consumption with approximately a factor two, in relation to if Matlab built in integration-functions is being used. / Simulering av olika system kan ske genom att en grafisk modellbeskrivning av systemet byggs upp med hjälp av blockscheman. Matlab/Simulink tillhandahåller stora möjligheter att med grafiska blockscheman beskriva en stor mängd system, vilka kan vara såväl linjära som olinjära. Simuleringen med Matlab/Simulink sker genom integrering baserat på olika numeriska metoder. Vid simulering av olinjära simulinkmodeller är man i många fall intresserad av att applicera en kalmanfiltrering för att hantera det brus som kan förekomma i processen såväl som vid mätningen. En applicering av ett sådant filter visar sig dock ge en ohanterlig tidsprestanda trots dagens snabba datorer. Detta beror på att de kommandon som för närvarande finns tillgängliga för de olika procedurerna, inte är avpassade att för detta användningsområde arbeta på ett tidsoptimalt sätt. De tidsödande procedurerna består dels av integrering mellan samplingspunkterna, och dels beräkning av filtrets korrektion. För att beräkna filtrets korrektion och korrigera tillstånden för störningarnas inverkan, krävs att integreringen avbryts för varje samplingspunkt. Detta avbrott gör vidare att ett nytt modellanrop måste ske för varje samplingspunkt i mätserien. Det är främst detta modellanrop som är orsaken till den ohanterliga tidsåtgången. Målet med detta examensarbete är att minska den tidsåtgång som för närvarande råder för den integrerande delen av simuleringen. Detta kan ske genom att utveckla metoder för att genomföra den filtrerande simuleringen, vilka inte kräver ett lika frekvent modellanrop. Detta kan möjliggöras genom att konvertera simulinkmodellen till en tillståndsmodell. Den sammanfogade lösningen, dvs. den integrerande och filtrerande delen, skall sedan implementeras i en slutlig simuleringsrutin (den filtrerande delen avsimuleringen behandlas i en komplementerande rapport). Denna tidsoptimerade rutin kan sedan användas för att utföra filtrerande simulering av olinjära simulinkmodeller, fast med en hanterbar tidsprestanda. De tidsoptimerade delarna i form av integrering och kalmanfiltrering, har i den sammanfogade rutinen visat sig kunna genomföra filtrerande simulering med en tidsåtgång som reducerats med ungefär en faktor tio. Målsättningen att minska den tidsåtgång som för närvarande råder till att bli mera hanterbar, har således uppnåtts. Den integrerande delen står i slutliga rutinen för en reduktion av tidsåtgången med en faktor två, vid jämförelse med om Matlabs integreringsfunktion används.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-109458
Date January 2005
CreatorsNorberg, Mikael
PublisherKTH, Reglerteknik
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0026 seconds