Instytut Sterowania i Systemów Informatycznych Uniwersytet
Transkrypt
Instytut Sterowania i Systemów Informatycznych Uniwersytet
Instytut Sterowania i Systemów Informatycznych Uniwersytet Zielonogórski DIAGNOSTYKA PROCESÓW I SYSTEMÓW Laboratorium nr 1 DIAGNOSTYKA Z WYKORZYSTANIEM MODELU Opracował: mgr inż. Marcel Luzar Cel: Detekcja uszkodzeń na podstawie modeli obiektu Celem podstawowym jest zapoznanie sie z działaniem i możliwościami detekcji uszkodzeń wykorzystującymi model obiektu opisany równaniami fizycznymi. Celem dodatkowym jest nabranie umiejętności w modelowaniu i odczytywaniu zależności fizycznych opisujących badany obiekt. 1. Detekcja uszkodzeń na podstawie modeli obiektu Najbardziej zaawansowane metody detekcji uszkodzeń wykorzystują modele obiektu do generacji residuów. Algorytm testu składa sie z dwóch części: w pierwszej wyliczana jest wartość residuum na podstawie modelu obiektu, a w części drugiej następuje ocena tej wartości oraz generacja sygnału diagnostycznego. Residuum wyznaczane jest jako różnica miedzy wartością mierzona zmiennej procesowej, a wartością obliczona na podstawie modelu (bądź różnica pomiędzy lewa i prawa strona równania opisującego obiekt). Pełny model obiektu uzyskać można bezpośrednio z równań fizycznych, np. równań bilansowych. Modele fizyczne są często nieliniowe, uwikłane względem sygnałów wyjściowych. Model taki odzwierciedla własności statyczne i dynamiczne obiektu w całym zakresie pracy, podczas gdy modele liniowe mogą być stosowane jedynie w otoczeniu nominalnego punktu pracy, dla którego przeprowadzono identyfikacje ich parametrów. Generacja residuów na podstawie modelu (zwykle nieliniowego) stanowi najbardziej pewna metodę detekcji, o ile model jest odpowiednio dokładny. Niestety dla wielu obiektów opracowanie modeli na podstawie równań fizycznych jest bardzo trudne lub wręcz nie możliwe, a identyfikacja ich parametrów jest często problematyczna. To ogranicza zastosowanie tej metody do obiektów, które są opisane stosunkowo prostymi zależnościami. 2. Układ hydraulicznego wspomagania kierownicy Obiektem badanym będzie system hydrauliczny, czyli taki w którym następuje przepływ płynu. Rozważany będzie układ wspomagania kierownicy, którego schemat został przedstawiony na Rys. 1. Wejściem systemu sterowniczego jest kat kierownicy i kat kolumny sterującej, podczas gdy wyjściem jest pozycja wałka zębatki, która określa kat skręcenia przednich kół. Istnieje mechaniczne połączenia pomiędzy wałem a kolumna sterującą , za pomocą mechanizmu zębatkowego, który zamienia ruch rotacyjny kolumny kierowniczej na 1 ruch posuwisty wału skręcającego koła. Wspomaganie siłowe jest realizowane poprzez hydrauliczny tłok podłączony do wału. Na kolumnie sterującej znajduje sie drążek skrętny (zawór). Różnica pozycji kątowej pomiędzy kierownica, a pozycja kątowa zębatki wałka determinuje częściowe otwarcie zaworu skrętnego. Jeżeli różnica kątowa jest dodatnia to ciśnienie jest podawane na jedna stronę tłoka, a dla negatywnej różnicy na przeciwna stronę tłoka. Wspomaganie siłowe jest kontynuowane dopóki różnica w pozycji kierownicy i zębatki nie jest bliska zeru. Rys. 1. Schemat układu wspomagania kierownicy 2.1. Zmienne W poniższej tabeli znajdują sie definicje i wartości zmiennych użytych w tym przykładzie: 2.2. Krzywa wspomagania Drążek skrętny posiada wrodzona martwa strefę, w wyniku której dla odpowiednio małych różnic kątowych nie następuje przepływ przez zawór. Po martwej strefie, wspomaganie jest w przybliżeniu liniowe dla małych różnic w katach i rośnie wykładniczo dla zwiększających sie różnic kątowych. Dodatkowym ograniczeniem dla zaworu w pełni otwartego 2 jest maksymalne ciśnienie dostarczane przez pompę, która powoduje nasycenia w obu kierunkach. Krzywa wspomagania można aproksymować następującym równaniem: 2 P(u ) = 4.41⋅10 7 u + 4.59 ⋅1018 u 9 z martwą strefą o wartości 0.04 i saturacją dla wartości 107. 3. Program ćwiczenia 1. Utwórz model obiektu w środowisku Matlab/Simulink i dokonać jego symulacji zgodnie z załącznikiem nr 1. 2. Utworzyć podsystemy zawierające model obiektu i model rzeczywisty (system). 3. W podsystemie modelu rzeczywistego dołączyć wejście oznaczające uszkodzenie systemu wspomagania (bądź jego sprawność), zakres sygnału to <0,1> (0-100%). W jaki sposób można efektywnie symulować uszkodzenia? 4. Wygenerować sygnał residuum i dokonać detekcji uszkodzeń na jego podstawie. 5. Należy zaszumić wyjście modelu rzeczywistego i porównać sygnały residuum z poprzednim przypadkiem. Zaproponować efektywna metodę diagnostyki w takim przypadku (zastosować progowanie sygnału residuum). 6. Wykonać sprawozdanie z wykonanego ćwiczenia. 4. Literatura 1. Diagnostyka procesów. Modele, metody sztucznej inteligencji, zastosowania. Red: Korbicz J., Koscielny J.M., Kowalczuk Z., Cholewa W. - Wydawnictwo Naukowo- Techniczne, Warszawa, 2002. 2. Koscielny J.M.: Diagnostyka zautomatyzowanych procesów przemysłowych. – Akademicka Oficyna Wydawnicza EXIT, Warszawa, 2001. 3. Pieczynski A.: Komputerowe systemy diagnostyczne procesów przemysłowych. Wydawnictwo Politechniki Zielonogórskiej, Zielona Góra, 1999. 4. Pieczynski A.: Reprezentacja wiedzy w diagnostycznych systemach ekspertowych. Lubuskie Towarzystwo Naukowe, Zielona Góra, 2003. 5. Piegat A.: Modelowanie i sterowanie rozmyte. - Akademicka Oficyna Wydawnicza EXIT, Warszawa, 1999. 6. Rutkowska D.: Inteligentne systemy obliczeniowe, Algorytmy genetyczne i sieci neuronowe w systemach rozmytych. - Akademicka Oficyna Wydawnicza, Warszawa, 1997 7. Rutkowska D., Pilinski M., Rutkowski L.: Sieci neuronowe, algorytmy genetyczne i zbiory rozmyte, - Wydawnictwo Naukowe PWN, Warszawa, 1999. 8. Yager R.R., Filev D.P.: Podstawy modelowania i sterowania rozmytego, - J.Wiley & Sons. Inc. 1994. 3 Aneks 1. Budowanie modelu w Simulinku ze strony http://web.archive.org/web/20070610152306/http://www.me.cmu.edu/ctms/modeling/hydraulic/simulinkbasics/mainframes.htm CREATING THE MODEL To begin modeling, start Simulink, open a new model, and save the model as hydraulic.mdl. For more information, please refer to the Simulink Modeling Tutorial section. CONSTRUCTING THE DERIVATIVE RELATIONS The first step in creating a model of this hydraulic system is to create the relation between the position of the rack and its first and second derivatives, velocity and acceleration. Since position is the integral of velocity and velocity is the integral of acceleration, place two integrator blocks in the model. In the Simulink Library Browser expand Simulink. Then single-click on Continuous. Then drag two Integrator blocks into the Simulink model. Label the two blocks as shown in the diagram below by clicking on the existing label and editing it. Connect the two blocks together with a line and label it v by double-clicking on the line and typing in the textbox that appears. Drag a line out of the input of the first block and label it a. Similarly drag a line out of the output of the second block and label it x. 4 SUMMING OF FORCES There are three external forces acting on the rack -- the friction force transmitted through various various linkages of the tires moving against the pavement, the force from the steering column, and the force from to the power-assist system. The friction force acts opposite from the direction of motion, thus is negative in sign. Both the force from the steering column and the power-assist act in the direction of motion, thus are positive in sign. Summation in Simulink is accomplished by using the Sum block. From the Simulink Library Browser window, expand Simulink and click on Math Operations and then scroll down in the right column to find Sum. Drag the Sum block into the model. To change the Sum block to have two positive inputs and a negative input, as needed in this system, double-click on the block to open the Block Parameters: Sum window. In the field marked List of signs change the value from |++ to |++-. Drag a line out of the output of the Sum block. 5 The output of this Sum block is the summation of all external forces acting on the rack. From Newton's Law, the sum of all forces is equal to ma. So dividing the sum of all forces by m results in a. To multiply the sum of all forces by 1/m, add a Gain block with value 1/m and connect the output from the Sum block as its input and the line labeled a as its output. Label the gain block Division by m. The block may need to be enlarged slightly to properly display its value inside the triangle. 6 CONSTRUCTING THE FRICTION FORCE Now construct the signal representing the friction force. The friction force is v multiplied by the damping coefficient, b. We can pull v from the output of the Integration from a to v block. Add a gain block of value b into the system. Flip the block and label it Damper. Connect the input to this gain block to the line labeled v. Be sure it connects to the line with a small square. Drag a line out of the output of the block and connect it to the negative input of the Sum block. CONSTRUCTING THE STEERING COLUMN The position of the steering column is the input of this system. Its position affects the rack motion through a torsional spring connected to the rack by a pinion, and by controlling the flow of a hydraulic fluid through a torsional valve in the power-assist system. The steering column position is a ramping sinusoid, which can be represented as the product of a sinusoid and a ramping function. First, the sinusoidal element of the steering column position must be added into the system in the form of a Signal Generator source. Select the Sources category in the Simulink Library Browser window. Drag the Signal Generator Source into the model. Drag a line out of the Signal Generator. Label the Signal Generator, Max Steer Angle. 7 Next, add a Ramp source from the Sources category in the Simulink Library Browser window. Multiply the output of the Ramp source with the output of the Signal Generator named Max Steer Angle using a Product block from the Math Operations category in the Simulink Library Browser window. Label the product block Steering Column, and drag a line out of the Product block and label it Theta 1. Both the force applied by the pinion attached to the torsional spring and the power assist force are functions of the difference between the steering column rotation position, Theta 1, and the rotation position of the pinion connected to the rack, Theta 2. Add a Sum block with one positive input and one negative input into the system. Drag a line out of the output of the Sum block and label it Delta Theta. 8 The position of the rack, x, is a translational position, while Theta 2 is a rotational position. Divide x by the radius of the pinion, r, to find Theta 2. Add a gain block with the value 1/r. Label it Conversion to Rotational, and connect its input to x and its output to the negative input of the Steering Column Sum block as shown. Label this line Theta 2. To construct the effect on the rack due to the torsional spring and pinion, add a gain block of variable k into the model. The variable k will be the torsional spring constant. Flip the block and connect is input to the output of the line labeled Delta Theta. Also drag a line out of the output of the Gain block and label the block Torsional Spring. 9 The output of this block is a torque. Divide by r to convert this output to a force. Do this by adding a Gain block with the value 1/r. Connect the input of this block to the output of the block labeled Torsional Spring. Connect the output of this block to one of the positive inputs of the Sum block representing the summation of external forces on the rack. Label this Gain block Conversion to Force. 10 CONSTRUCTING POWER ASSIST The pressure allowed through the torsion valve is dependent on the difference between the rotational position of the steering column and the pinion. This non-linear relationship was found in the overview section to be best modeled by the expression 4.41x107 u + 4.59x1018 u9. To add this assist curve into the model, add a Fcn block from the User-Defined Functions category in the Simulink Library Browser window. Change the expression inside the block to 4.41e7*u+4.59e18*u^9 by double-clicking on the block and typing in the field labeled Expression: Adjust the size of the block so that the expression can be seen inside the block and label this block Assist Curve. Drag lines out of the ends of the block. 11 This torsion valve design has an inherent dead zone of magnitude d around where Delta Theta equals zero. As a result, whenever Delta Theta is bigger than -d and smaller than d, there is no flow allowed through the valve. To model this, add a Dead Zone block from the Discontinuous category in the Simulink Library Browser window. Connect its input to the line labeled Delta Theta, and its output to the input of the block labeled Assist Curve. Change the size range of the dead zone to -d to d by double-clicking on the Dead Zone block and changing the values as shown below. 12 The maximum pressure acting on the piston is limited by the maximum pressure created by the pump, pmax. As a result, the output of the torsion valve equals pmax whenever the value of the assist curve exceeds pmax. To model this, add a Saturation block from the Discontinuous category in the Simulink Library Browser window. Connect its input to the output of the Assist Curve block, and drag a line out of its output. Change the upper and lower limits of the Saturation block to pmax and -pmax by doubleclicking on the block and changing the values as shown below. The output of the Saturation block is a pressure. The force due to the power assistance is this pressure multiplied by the surface area of the piston, A. Add a Gain block with a gain of 13 A and connect its input to the output of the Assist Curve block and its output to the positive input to the sum block that represents the summation of all external forces on the rack. Label this block Area. Add a scope to monitor the position of the rack, x. While the scope labeled Rack Position measures the effect of power steering with the motion of the rack, it does not illustrate the fundamental purpose of power steering. The goal of power steering is to reduce steering effort. The output of the Torsional Spring is the torque applied by the steering column. To convert this torque to find input force at the rim 14 of the steering wheel, divide by the radius of the steering wheel, rs. Add a gain block of value 1/rs and a scope to the model as shown below. Label the scope Steering Force. The model is now complete and ready for running. RUNNING THE SIMULATION Before the model can be run, values for the variables used in the model must be defined. We will use the same values used earlier in this example problem. Enter the following values into the MATLAB window prompt. m = 100; b = 10000; k = 500; A = 0.008; r = 0.02; d = 0.004; pmax = 1e7; rs = 0.18; We will model this system given a 4 second period to the steering input with an increasing magnitude which is 0 when t = 0, and reaches 1 radian at t = 10. Double-click on the Signal Generator block labeled Steering Column and change the frequency to 0.25Hz and an amplitude of 1. Double-click on the Ramp block and change the slope of the ramp to 0.1. Running the model and autoscaling yields the following plots for the Rack Position and Steering Force: 15 The motion of the rack tracks the motion of the steering column with excellent precision as a smoothly increasing sinusoid. The nonlinearity of the power assist curve can be seen in the amount of force needed to steer. The power assistance kicks in stronger when the force needed to turn the wheel exceeds 11N. The maximum force needed to turn the wheels on this plot is approximately 13N. Turn off the power assist by setting A = 0 to see how the rack responds without power assistance. 16 Shutting off power assistance does not affect the motion of the rack. On the other hand, without power assistance, far more force is required to turn the steering wheel. The response shows none of the oddities associated with power assistance, but requires a maximum of 35N at the rim of the steering wheel instead of the 13N needed with power assistance. 17