Escolar Documentos
Profissional Documentos
Cultura Documentos
Word Count: 14,389 using Microsoft Word Word Count (excluding all appendices)
Abstract
One major requirement of the aircraft industry is the complete testing of all systems. Hydraulic systems feature heavily in aircraft, powering the brakes, undercarriage and all of the steering mechanisms. Hydraulic systems conventionally are not modelled in real-time due to the iterative nature of the solutions. A representation of a hydraulic system as an electrical network was investigated. This would allow the creation of realtime modelling software. Real-time simulation would allow increased testing into unpredictable model states, in particular, emergency situations. Accuracy of the model was compared to existing software currently used within the aircraft industry.
Acknowledgments
I would like to thank my supervisor, Steve King, for his support and guidance during this project. Many thanks also go out to Steve Wright for his support before and during this project and all his help during my Industrial Placement at Airbus UK. His help has been invaluable. Finally I would like to thank my girlfriend Gill for her encouragement and for putting up with me during the whole project process.
Table of Contents
1 Introduction .............................................................................. 1 1.1 1.2 1.3 1.4 2 Background ......................................................................... 1 Project Aim.......................................................................... 1 MATLAB/Simulink ................................................................. 2 Report Structure .................................................................. 2
Review ..................................................................................... 4 2.1 Aircraft Industry................................................................... 4 Federal Aviation Administration (FAA) ................................ 5 Joint Aviation Authorities (JAA) ......................................... 6 Hydraulic Regulations ...................................................... 6
Example Hydraulic Systems ..................................................10 Modelling Hydraulics ............................................................12 Mathematical Models............................................................12 Fuel Model..........................................................................13
Process ...................................................................................16 Model Design ...........................................................................18 4.1 4.2 4.3 Software Choices.................................................................18 Initial Ideas ........................................................................18 Library Design ....................................................................19 The Pump .....................................................................20 The Actuator .................................................................22 i
4.3.1 4.3.2
4.3.3 4.4
The Models .........................................................................29 The Simple System ........................................................29 The Standard System .....................................................30 The Extended System.....................................................30
Configuration ......................................................................31
Evaluation ...............................................................................32 5.1 5.2 Introduction .......................................................................32 Data Analysis......................................................................33 Model 1 ........................................................................34 Model 2 ........................................................................42 Model 3 ........................................................................47
Conclusion ...............................................................................53 6.1 6.2 6.3 Process Evaluation...............................................................53 The Product In Industry .......................................................53 Further Work ......................................................................54 Extra Components in the Model........................................54 Extra System Information ...............................................54 A Graphical User Interface ..............................................55
Bibliography.............................................................................56
ii
Phil Foster
1 Introduction
1.1 Background
In all modern military and commercial aircraft, hydraulic systems power the flight controls. When a pilot moves his (or her) controls, whether in a jet fighter, a helicopter or on a Boeing 747, at some point a hydraulic system will be accessed. Power is generated using pumps and is controlled by various devices along the circuit. An example hydraulic system, from the McDonnell Douglas F-15C Eagle [AND00], a tactical fighter, can be seen in Figure 1 on page 11. This shows how complex a simple network can become when back up devices and safety controls are added. For large aircraft there will be many more output components but the system will have the same format. In the aerospace industry very accurate models are required for all electrical and mechanical systems onboard the craft. These are used to rigorously test all scenarios expected during flight. This includes all the hydraulics systems that are used in the braking and steering controls. For the testing, large test-rigs are configured with the aircraft flight equipment and different states are run to allow safety equipment to be correctly configured. Testing on the systems starts with software models since this is much cheaper and easier to correct than building a full hydraulic system. When test flights are run, the simulated aircraft is modelled in different scenarios, recording results for how the system runs under standard operation and error conditions. In the case of the hydraulics systems some data must be pre-calculated and look-up tables used to allow the model to be run in real-time. This is not a completely desirable situation as the model can only be tested as far as the recorded scenarios stretch. These pre-calculated results cannot be a complete set for every expected or more importantly every unexpected action that can change the environment. Whilst testing every action is unfeasible, if a model can be run in real-time errors can be introduced to a system and the results calculated as the model runs.
Phil Foster
In a large environment the model must deal with many simultaneous equations with the only solution being iterative. In large networks this produces a very irregular run time, since at some points of execution there are only a few calculations but when the whole network is active multiple calculations will slow the system down immensely. Using ideas currently being developed at Airbus UK, this project is investigating whether linearising the hydraulic equations and using an electrical network to model a hydraulic network will produce a real-time solution. Numerous models need to be designed and created and then compared to existing programs using identical model designs. Each model needs to be thoroughly tested if it is to be used within any industry, especially the aircraft industry.
1.3 MATLAB/Simulink
MATLAB is a software tool created by The Mathworks, designed to make mathematical calculations simpler. Simulink is a tool integrated within MATLAB that uses MATLABs software engine and an interactive visual environment to simulate a wide range of different types of systems. There are a large number of add-on packages for the tool that extend the product significantly, including an electrical circuit Blockset. This tool is widely used in industry due to its multi-domain features and its ability to be integrated within other environments. This makes it ideal to use for a product such as this, especially since the tool is used at Airbus UK and can easily be tested using their systems. Further details of these products and their uses are discussed in the next chapter.
Phil Foster
Chapter 5 evaluates how effective the modelling process was and compares the finished product to the initial requirements. Chapter 6 presents general conclusions to the project, discussing its success. Future work and use for the project in industry is also examined.
Phil Foster
2 Review
2.1 Aircraft Industry
Within the aircraft industry there is a need for very accurate modelling. Whilst this may sound obvious there are a large number of standards that need to be attained for an aircraft to be built and flown. From the authors experience during a sandwich year at Airbus UK, a large period of time is spent creating very accurate models for the different sections and systems on board. For both the fuel and hydraulic modelling processes large software test rig computers are built and used to test the software that is used on the aircraft. These test rigs are built to have the same input and output structure as the final aircraft so that the software can be fully tested. Further tools are built to act as the front and back end of the model. Tests are run for a wide range of different situations and scenarios to see how the aircraft is predicted to cope. The main purpose for this is to be able to model accurately which signals will be passed around the aircraft between the different electronic devices so suitable solutions can be programmed and automated. This means when the aircraft comes to be built there will be a good idea of how it will behave in all the test situations. The models are run as quickly as possible from a pre-decided flight plan (i.e. it has already been decided what will happen during the flight) and the results and data are then returned. The models can also be run in real-time, where a pilot flies the aircraft and the test-rig is used to simulate how the aircraft will cope with different actions. This is important for satisfying the different aviation regulatory authorities that the aircraft is safe to fly and ensuring certification of the aircraft. The introduction of fly-by-wire has also increased the need for computer modelling. [AIR04] describes fly-by-wire as an electronically managed flight control system that uses computers to make the aircraft easier and safer to handle. Airbus first introduced the concept to commercial aircraft in 1988 helping it become an industry standard. The fly-by-wire system replaces the mechanical linkages between the pilots controls and the moving surfaces1 of the aircraft. The process has many advantages, from reducing the weight of the aircraft, resulting in improved efficiency, to added safety features. The computer keeps the aircraft within the
1
These are the movable surface on the outside of the aircraft, e.g. Aileron, Elevator and Rudder.
Phil Foster
safety protection window preventing the aircraft from rolling or pitching too much. Modelling is essential for this to take place to allow the safety window to be created and the necessary procedures to be written to correct a situation where the error bounds are exceeded. In an aircraft there are many different hydraulic systems that need to be modelled. These include flight controls, landing gear, gear door actuation, nose wheel steering, thrust reversers and braking [AERO04]. Each system has different requirements and has to be modelled and tested in different ways. There are a number of governing authorities around the world that issue certificates for aircraft design, manufacture and maintenance. They are all variations on the same idea, with the main difference being how widely they are recognised internationally. Many western countries have bodies that are responsible for aviation safety although the Federal Aviation Administration (FAA), based in Washington, and Joint Aviation Authorities (JAA), based in Holland, are the two largest authorities.
The list of countries within the bilateral agreement is listed on the web page and includes the United Kingdom, which means that they can issue certificates for the approval of British designed and built aircraft. In principle, the FAA is responsible for the safety of civil aviation in the United States and the countries covered by the bilateral agreement. They have a number of major roles for promoting safety, from air traffic control through to the development of new aviation technology. Safety regulations are issued and enforced by the body, with minimum standards in all areas of aircraft production, operation and maintenance. Aircraft must be certificated in a number of categories throughout the entire production process, including Design Approvals, Production Approvals for Aircraft, Engines & Propellers and Continued Operational Safety. To gain a certificate to produce even one test aircraft many conditions must be fulfilled. There are 6 phases which the FAA tests on, as listed on [FAA04b]: 5
Phil Foster
1. 2. 3. 4. 5. 6.
Partnership for Safety Plan Conceptual Design and Standards Refined Product Definition and Risk Management Certification Project Planning Certification Project Management Post Certification
The agency produces regulations known as FARs (Federal Aviation Regulations) for aircraft manufacturers to follow. These provide a full list of regulations for all areas of aircraft design, listing everything that must be satisfied for certification to be granted. Advisory Circulars (ACs) are also produced which provide guidance for demonstrating compliance with the regulations. These ACs are not mandatory but are derived from FAA and industry experience in determining compliance with the Code of Federal Regulations (CFR). They include extracts from regulations and illustrate common practices in which manufacturers have complied with the regulations
The JAA is soon to be renamed the European Aviation Safety Agency (EASA)
Phil Foster
2.3 Matlab
MATLAB (Matrix Laboratories) is very powerful mathematical software package used by a large number of companies to test a wide and varied 7
Phil Foster
As is suggested by the name, Matlab is a matrix and vector based program, with fast processing of matrix computations, linear equations and similar calculations. One point to note though is that Matlab does use finite-precision arithmetic to solve its mathematical equations that produces approximate solutions. This is less accurate than other methods but is not comparable due to other significant differences within the tool. Matlab is also able to interact with other types of software and can execute code written in different programming languages as well as its own, built in scripting/programming language.
2.3.1 Simulink
Simulink is an icon driven simulation and modelling tool that runs on top of the Matlab environment. The sales literature on the Mathworks website [MAT04b] for the software describes the tool as:
Simulink is a platform for multidomain simulation and Model-Based Design of dynamic systems. It provides an interactive graphical environment and a customizable set of block libraries Simulink is integrated with MATLAB, providing immediate access to an extensive range of tools for algorithm development, data visualization, data analysis and access, and numerical computation.
[UCSD04] provides a useful overview of Simulink. It describes the software package as a way to model, simulate and analyse dynamic systems. The package has support for linear and non-linear systems, and modelling can also use continuous time, sample time or a mix of the two. There is also the option to have multi-rate systems, where different sections have different sampling rates. Simulink uses block graphics to represent flow diagrams for the world being modelled. These blocks provide a simple way of simulation, avoiding all the coding needed if just Matlab is to be used. This interface allows models to be displayed on screen, in the same format as they would appear if drawn with pen and paper, thus making the whole process highly user friendly. The models are designed to be hierarchical so can be designed and built using both top-down and bottom-up approaches. The whole software package has many benefits, one of which is the block libraries that can be purchased for the tool. Standard tools include many different sinks, sources, linear and non-linear components and connectors. 8
Phil Foster
These allow a large number of different systems to be modelled. There already exist a number of third party packages available for Simulink that model hydraulics that have been designed by Mathworks working with other companies worldwide. These provide most of the needed hydraulic components to create a very good model although, like other software, all the processes involved cannot be run deterministically. Since MATLAB and Simulink are integrated, the model can be simulated, analysed and revised in either environment at any point.
2.3.2 SimPowerSystems
SimPowerSystems [MAT04c] (formerly known as Power System Blockset) is a Simulink library toolbox developed to extend Simulink to model basic electrical circuits and detailed electrical power systems. It is designed for aiding development of self-contained power systems. This tool uses Simulinks solver to produce accurate simulations. The model also can be used for real-time simulation using discretization [MAT04c]:
Discretization simulates your system with fixed time-step trapezoidal integration, and is especially effective for power system models that include power electronic devices. This mode also facilitates the execution of your model in real time.
Real time simulation is an important aspect of modelling especially if designing automated systems. In an automated system the controlling computer must be able to react to many different situations and make decisions based on a continually changing environment. A fundamental concept of real-time simulation is the need for fixed iteration step sizes. In complex stiff systems like large electrical circuits, or hydraulics models, the usual approach is to use a variable step solver. With a system that has the ability to use a fixed step size, although the accuracy of the model can suffer, real-time modelling is feasible. From [SWJ04], SimPowerSystems automates state-space matrix creation. Hydraulics Blocksets do exist, but none is capable of being translated to real-time code. An abstraction wrapper library can be written around electrical components to produce a hydraulic model. The two main advantages of this system are a general solution to all network conditions can be designed and there is fast development by use of high-level tools. Disadvantages are piecewise linear approximation of non-linear components and large computational effort for the solver.
Phil Foster
10
Phil Foster
11
Phil Foster
12
Phil Foster
In physical modelling, mathematical models are based on balancing equations and constitutive relations (static relations between quantities) [KTH04]. With regards to hydraulics, the model needs to develop a relation between pressure and flow. The areas that need modelling are pipes, where a pressure drop drives a flow, tanks, where flow is stored, and items to provide a flow resistance. At junctions or connections the flows must sum to zero and all the pressures must be equal. In [HAE02] basic hydraulic principles are discussed. Many of these are not relevant for a system such as aircraft hydraulics but are worth noting in the event of minor discrepancies in results. Concepts such as the flow of liquid through the pipes can have different results depending on the type of flows. Laminar flow is characterised by smooth, predictable streamlines, and turbulent flows are erratic and unpredictable. In the connecting tubes of aircraft hydraulics systems, the cross-sectional area should be small enough to make effect like these negligible. Loss of energy due to friction is a basic principle that should not be ignored as negligible. According to [HAE02] there are many equations that approximate the friction losses associated with the flow of a liquid through a given section. In this paper they are generalised into a single equation for the mean velocity of the fluid in a channel.
Phil Foster
This is an improvement on the previous simulation programs that relied on pre-calculated flows in look-up tables As with any model there are approximations. Within the Fuel Simulation Program, the pressure is modelled as voltage, flow as current and conductive elements as resistors. For a deterministic model there cannot be any iterative equations so all elements are assumed to have a linear Pressure/Flow relationship. Most fuel systems display properties of increasing resistance with increasing flow. Bi-linear approaches can be made, where there are two linear equations with a switch over point. This increases accuracy but has further complications that require advanced techniques to solve. The issue of bi-linear approximations is interesting. With a linear approach, a straight line is used to approximate a curve. The case where this would be applied is where the flow of the system is changing, i.e. a pump has just been switched on. Obviously this is not a very good model and depending on the situation the results could be useless. In a bi-linear model, two straight-line equations are used to approximate the curve, which improves the situation greatly, and in the case of the fuel system, is sufficient to generate accurate results. Generally the switch over between zero and full fuel flow is only a few seconds so not much accuracy is lost through this approximation. The problem occurs when the graph reaches the cut-off point, the join between the two equations. Hysteresis causes the value to jump between the two different equations, over-stepping the boundary. In some cases the jump will be corrected by reducing the size of the next iteration. This causes the value to be lowered to below the cut-off value, which in turn will make the value jump up again. This creates a large fluctuation in the system. See Figures 2 and 3 for examples of these situations. One solution is to have two cut-off boundaries, one for the increasing value and one when it is decreasing. This can still result in the occasional erroneous results though. Another idea is to increase the iteration speed of the model although this will increase the computational power required and slow the system down. A third solution is to use a Simulink S-Function block, where C-code is used to perform calculations. This is much more powerful than just using Simulink blocks and allows extra checks on the system. The main purpose is to remove the problem of hysteresis by adding in extra logical checks for the system. A check is used to confirm the switch between equations to prevent invalid results using a confirmation time for each cycle.
14
Phil Foster
15
Phil Foster
3 Process
During this project the Waterfall Model for systems development was followed. This model was chosen as it is a fairly simple process to follow and has a number of useful advantages. The whole process is structured in a rigid format, enforcing a disciplined approach to the project. Testing occurs regularly throughout the design and implementation allowing regular checking and improvements to be included. There are a number of different interpretations of the Waterfall Model; the version being followed is described by Adrian Als and Charles Greenidge [ALS03]. This is slightly different from the commonly used Sommerville version in that there is an iterative approach between all neighbouring states. In Sommerville the only iterative phase is from the final stage to all the previous stages.
16
Phil Foster
There are disadvantages with this process compared to other models but are not significant for this particular project. The problem of the iterative process generally found with this model is solved using [ALS03]. The inflexible process here is not an issue due to the small size of the project, the concise plan and the topic. The project has engineering roots so the structure can be followed easily. The problem of having errors or infeasible tasks that are not detected until the process is complete still remains. The linearity of the design process was suitable in this case. The rigid structure is useful for this project, from the initial designs and ensuring the systems is fully tested to the need for maintenance and allowing the product to be used in different environments. There are six separate stages to this model, Requirements Analysis, Specification, System and Software Design, Implementation and Testing, Integration and Systems Testing and Maintenance. The aim of the first stage, requirements analysis, was specifying the goals and identifying the constraints. This was decided during the initial project proposal and ideas stage. The specification phase was merged with the requirements analysis since the size of the project is not large and a separate stage was not required here. Most versions of the waterfall model have these stages combined. System and software design is shown in the Model Design chapter. The software was created from the system specification. The main consideration was software architecture and how to ensure that the model would be useful as a product. This required the model to make use of libraries, as all the individual components would be required separately if re-used on actual aircraft design. The modelling tools used also needed consideration when designing the system. The implementation and testing and integration and systems testing phases show the translation of the designs into software. Both these two phases are shown in the Model Design chapter. The testing focuses on identifying errors and ensuring that the specification has been met. Individual units are then combined and tested as a complete system to ensure the whole product meets the system requirements. The maintenance phase shows how the product can be changed to meet the customers needs, adapted for different environments, enhanced and any undetected errors corrected.
17
Phil Foster
4 Model Design
Using MATLAB three simple hydraulic models were designed with increasing complexity. The designs for these three different are described in this chapter. These models aim to show how the techniques used for fuel modelling (see section 2.7) could be adapted for use in hydraulic modelling, particularly within the aircraft industry.
Phil Foster
Using these ideas a simple system can be drawn up. The key features for a system are the inputs and outputs. The other components are not required so for simplicity the initial models do not make use of them. The components that were used were created individually in a library module in Simulink before being inserted into different systems for testing.
19
Phil Foster
PumpInternalResistance The resistance to the system caused by the pump. This is calculated from PumpOnPressure and PumpZeroPressureFlow. PumpOnDelay Used for testing to allow the model to switch the pump on and off after the pump after a specified delay.
The system has two sections. The first calculates how fast the pump is currently running by counting up from 0% to 100% on each cycle of the simulation. This is necessary since the pump will not switch from Off to On instantaneously, but will take a few seconds to power up and be able to produce full pressure and output a maximum flow. This is all calculated using standard Simulink mathematical blocks. The main block that calculates the pump speed is a Switch block. This block outputs two different values depending on the value of the second input, and the On/Off input to the block. If the switch is on, the pump will ramp up to a maximum flow using the PumpSwitchTime variable. This value is passed through two blocks before it reaches the switch. The first is a Saturation block that is used to prevent a Divide by Zero error on the next block. This is implemented using two values for the upper and lower limits for the value passed through the block. These are both set in the 20
Phil Foster
initialisation file InitModel.m, and are 1e9 for the upper bound (InfiniteTime) and the sample time MainSamplingTime/10 for NearZeroTime. These values are required for systems such as this where the values passed between functions range greatly. In any system, divide-by-zero errors need to be avoided and at the upper end, the values need to be bounded to prevent values being divided by near infinite values, where rounding errors will create divide-by-zero errors. This value is then passed to a Math Function block that takes the reciprocal of the time, to find the period. This is simply the change to the pumps rate on each iterative step of the model. This value is then passed into the switch. The On side takes this value and the Off side takes the value after it is passed through a Gain block, with a value of -1 to negate the period, representing the pump turning off. The value is then passed into a Zero Order Integrator block before being linked to the main pump model. The Zero Order Integrator block calculates the actual percentage that the pump is switched on. This is required to have a loop, so the model can store the value of the pumps state. To allow the loop to successfully run, a Unit Delay block is required. This block outputs a reset value on the first iteration to initialise the loop. The initial condition in this case is the pump is switched off. A saturation block is used to limit the pump to being able to run between 0 and 1, preventing the pump outputting greater than 100% of its power or running with a negative flow. The value that is passed out of the block is the sum of the input value with the value from the previous iteration. A gain block is used to change the input value from seconds to a value relative to the iteration of the model, the MainSamplingTime. The output of this, PumpUnitPressure is passed to the second section of the pump, where the actual pressure is calculated.
21
Phil Foster
The second section uses the SimPowerSystems Blockset and models the pressure of the system as a voltage. This voltage is then passed out from the block. The Pump pressure is taken as the PumpOnPressure multiplied by PumpUnitPressure, the rate that the pump is working at. The pump pressure is then used as the input to a Controlled Voltage Source block. This converts the Simulink value to a voltage value. This voltage is then passed out of the block via a resistor, representing the internal resistance of the pump.
Phil Foster
the movement of the piston is calculated from the force being applied by the pump and the backpressure.
The Piston Block takes two inputs; the pressure into the system and the backpressure applied from the Spring Block. The only output is the position of the piston head, showing how compressed or extended the actuator is. The variables used in this block, initialised in the InitModel.m file are: PistonLength PistonDiameter PistonArea: The length of the piston. The diameter of the piston head. The area of the piston head. This allows the model to calculate the position of the piston head and calculate how extended the actuator is. Calculated from PistonDiameter. The volume of the whole piston i.e. how much hydraulic fluid the piston can contain before being fully opened. Calculated from PistonLength and PistonArea. The starting position of the piston. 23
PistonVolume:
InitialPos
Phil Foster
InitialPressure
PistonInletResistance The resistance caused by the inlet of the piston. InitialVolume Used to initialise the ZeroOrderIntegrator, calculated using PistonArea and InitialPos.
The piston, like the pump, is controlled by a voltage source. There are two sections again, one to calculate how much the piston has moved and one to generate the voltages and measure the current. These represent the pressure and flow in the system. There are two pressure sources in the block, one from the main input to the pump and one from the Spring Block. The backpressure from the spring is passed into a Controlled Voltage Source block via a Delay block. This is used to break the loop in the system, initialising the pressure/voltage in the system. The second pressure input is passed through a Universal Bridge Block, which forms part of an internal loop in the piston. This loop prevents the piston being able to open further than the maximum length. This block, set as a one-arm bridge with an ideal switch, will switch off the circuit once the piston has reached its maximum length. The pressure of the system is measured using a Current Measurement Block from the SimPowerSystems Blockset. The output value is then integrated (using a Zero Order Integrator Block) to calculate the total volume within the piston. The position of the piston is then calculated from the volume within the piston by dividing the volume by the area of the piston head. The volume is prevented from exceeding the maximum possible volume by using a simple Boolean Is greater than comparison. If the piston is calculated as full, the Universal Bridge Block halts the flow through the system, preventing any increase in the volume of fluid in the piston.
24
Phil Foster
The Spring Block is a simple mathematical calculation using a Simulink Gain Block. This just applies a proportional force to the pressure, such as a spring would when under pressure. This output is passed through to the Piston Block.
25
Phil Foster
interested in. There are also a number of other components that are not included in the library but feature in the model.
Junctions
There are two types of junction in the model, one is a simple T-Junction, with one input and two outputs and the other has two inputs and two outputs. These junctions were modelled using a perfect connection, where there is only negligible resistance. It was assumed that the resistance in the junction is minimal compared to that of the rest of the circuit considering the pressures involved and the dimensions of the pipes.
26
Phil Foster
Pipes
A pipe is modelled as a resistance. This resistance depends on the length and diameter of the pipe. Other factors that could be considered are the materials being used and their effect on the resistance, but this is assumed negligible in these examples as the material being used would be identical throughout the system. Two pipes were designed, one pipe with a fixed length and diameter as the feed pipe into the pump and a second that was used around the models which had its properties varied.
Supply
The Supply block in the models is the source of the hydraulic fluid. It is assumed that the system cannot run out of hydraulic fluid, since the maximum volume of the system will be known before construction. This means the block can be modelled as an infinite source, which makes the block much simpler. A SimPowerSystems block Ground is used, which provides a virtual connection to ground in an electrical circuit. In this case, it symbolises an infinite source of fluid.
27
Phil Foster
Step Block
A Step block is used as the switch for the pump. This is simply for testing and removes the need to design a model wrapper. This block has an initial value and after some time delay switches to a final value. The initial value of 0 represents the pump being switched off. After a delay time of PumpOnDelay, a variable set in the initialisation file, the block outputs a value of 1 for the pump being switched on.
Auxiliary Components
A Flowtap component is required in the models to extract data from the system. This is simply a Current Measurement block that measures the current at a particular point in the circuit. This is the measurement of flow at that point in the circuit. This measurement can then be passed to standard Simulink blocks, such as a Scope for analysis. A Scope is used for data analysis. This block produces a graphical display of the input data and provides the option to save the data to the main MATLAB environment. The models all require an additional block to be inserted into the main model page. The Powergui block, from the SimPowerSystems blockset allows the electrical system to be discretized, giving the solution a fixed time step, essential for real-time simulation. The model parameter MainSamplingTime is passed into this block fixing the simulations time step to this value.
28
Phil Foster
29
Phil Foster
30
Phil Foster
4.5 Configuration
The model was designed for easy configuration. This allows the model to be easily changed and so increases the ease of re-use. MATLAB allows models in Simulink to be passed variable information that is initialised when the model is run. This means that the information for a wide range of parameters can be edited without changing the actual model. In the case of this hydraulics model, the main variables changed for each model are the properties for the pipes and for the system pressure. A large number of other variables are stored within this file, which is run at the MATLAB command prompt, either manually or through a script. These range from the models iteration speed to the stiffness of the spring within the actuator. The full file, InitModel.m is listed in the appendix.
31
Phil Foster
5 Evaluation
5.1 Introduction
Each model was tested using script files written in MATLAB, outputting data for analysis in a spreadsheet. Initially the time-step, MainSamplingTime, was set to 0.01s but this caused problems with over-stepping the maximum length of the piston. This was noticed before actual testing was performed, notably before the spring backpressure was configured. When the model was on its final iteration, when the guard on the piston was hit, the model would perform one final calculation before preventing further expansion of the piston. As can be seen on the graph below, when the time step was set to 0.01s, the originally intended iteration speed, the over-step is large. By reducing the time step to 0.001s this error is reduced significantly, from 5.3mm to 0.9mm respectively. This is an advantage provided that the shorter time step does not cause the model to significantly slow down, which on a model of this size is not a problem.
Figure 19 - Graph showing the difference in results when using different timestep values.
32
Phil Foster
During the rest of the report, 1e7 Pascal will be referred to as HP, HighPressure, and 3.8e6 Pascal will be referred to as LP, Low-Pressure. These values were chosen to give a representation of different outputs that could occur. Models were created with Adams software and used identical values in their simulations. When the system is run, the piston is opened until equilibrium is reached with the spring in the actuator. The point of equilibrium is determined by the stiffness of the spring and the pressure the pump exerts on the system. Varying the pressure changes how far the piston moves, a higher pressure causes the piston to move further. According to [FSP04], for the testing of the Airbus FSP software, when numerical analysis was performed, typically a 510% variation is permitted from the corresponding comparison package. Inaccuracies are expected since the model is simplified to allow real-time functionality and is concentrating on only a small part of the system.
33
Phil Foster
5.2.1 Model 1
The first model was used as the main test suite, to check whether the data produced were reasonable. The configuration of the model was checked and various inputs to the model were altered as a result. Testing was performed to check that the various equations in the initialisation file were correct, including calculation of the resistances with the pipes and other components. The pump and piston resistances were set to negligible levels since the resistance within the pipes is dominant. This resistance varies with the length and diameter of the pipe. Since a huge quantity of data was output from the models during simulation, certain variables needed to be chosen to be part of the comparison. The Adams model could be set up to output data about the flow rate and pressure in and out of every component as well as the position and velocity of the piston at every time-step of the model. For the first model, produces six different sets of data, with 10,000 individual values. The most important of these values is the actual position of the piston since all the other values just contribute to this value. This is the final product of the system; the other values are just useful for testing and analysis of the model. The first positive point to notice about the model is that the piston opens to virtually the correct position. When not rounded to 3s.f. the difference between the models is only 0.000659m, or just over half a millimetre. The percentage difference for the value is 9.98e-5. This shows that the model produces a correct final result. Comparing the time taken to open is the next stage. The data table below shows a summary of the position of the piston at second time steps. This data is for three different cases, when the diameter of the pipe was varied. The length and pressure of the system were kept the same for these values, at 1m and HP (1e7 Pa). The results from Adams are taken to be the correct value for the position of the piston at the given time. This is due to the Adams model being used widely in industry and will have been tested against real world models.
34
Phil Foster
Time (s)
MATLAB Model Piston Position for various pipe diameters 0.005m 0.01m 0.2 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.02m 0.2 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408
Adams Model Piston Position for various pipe diameters 0.005m 0.200 0.371 0.408 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.01m 0.2 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.02m 0.2 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409
0 1 2 3 4 5 6 7 8 9 10
0.200 0.387 0.407 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408
Table 1 A summary of results from Model 1, comparing the position of the piston against time.
Using the complete set of results (rather than just the summary above) for these three model tests, the mean difference values are:
Pipe Diameter Mean Difference (m) Mean Percentage Difference 0.005m 0.00204 0.711 0.01m 0.00106 0.407 0.02m 0.00211 0.823
Table 2 The differences in piston positions between the MATLAB and Adams models.
This data comparison is not very useful. In table 1, the piston opens too quickly to make many useful observations. The averages of the data (table 2) show that the model does produce good results for the short pipe length over all three diameters. The percentage difference of the model is minimal. 35
Phil Foster
The mean difference values are calculated using the MATLAB model results minus the Adams Model results, so a positive values implies the MATLAB model opens the piston faster than the Adams model, and vice versa for the negative values. The table below compares the data produced for the three different pipe lengths at HP and d=0.005m.
Time (s) MATLAB Model Piston Position for various pipe lengths 1m 0 1 2 3 4 5 6 7 8 9 10 0.200 0.387 0.407 0.408 0.408 0.408 0.408 0.408 0.408 0.408 0.408 5m 0.200 0.268 0.318 0.352 0.373 0.387 0.395 0.400 0.403 0.405 0.407 10m 0.200 0.237 0.269 0.296 0.318 0.337 0.352 0.364 0.373 0.381 0.387 Adams Model Piston Position for various pipe lengths 1m 0.200 0.371 0.408 0.409 0.409 0.409 0.409 0.409 0.409 0.409 0.409 5m 0.200 0.295 0.358 0.392 0.405 0.408 0.409 0.409 0.409 0.409 0.409 10m 0.200 0.268 0.321 0.359 0.384 0.397 0.403 0.406 0.408 0.408 0.409
Table 3 A summary of results from Model 1, comparing the position of the piston against time.
Using the complete set of results (rather than just the summary above) for these three model tests, the mean difference values are:
Pipe Length Mean Difference (m) Mean Percentage Difference 1m 0.00204 0.711 5m -0.0194 -5.23 10m -0.0443 -12.0
Table 4 The differences in piston positions between the MATLAB and Adams models.
36
Phil Foster
Table 4 shows that the mean difference for the new model is not very significant when the pipe is 1m long, with 2mm as an average distance. The percentage difference is significant for the 10m length pipe and would not be able to be used uncorrected. Whilst 4.4cm is a small value for the difference, when the piston was only moving approximately 21cm, from a starting position of 20cm to a final position of 40.9cm it is a much larger percentage. This is of concern since in the aircraft the pipe lengths will probably be longer than 10m and the difference increases significantly with the length. The main cause for this will be the equation for calculating the resistances in the pipes, since this is the only place where the pipe length features. This equation is not simple to solve and has many other factors involved in calculating a value for the resistance of a length of pipe. Looking at all of the results for this model, tables 5 and 6, this trend continues. For the smallest and middle length piping, the accuracy is good, with the percentage difference being very low. As the pipe diameter increases though, the accuracy does too. For the 10m length of pipe with the diameter at 0.02m the average difference between the two positions of the piston is only 2mm.
0.788
-5.17
-12.0
0.491
-1.61
-4.20
0.924
0.129
-0.654
Table 5 The difference between the MATLAB and Adams models for all HP scenarios.
-0.832
-5.12
-8.35
-0.227
-1.51
-2.92
0.00316
-0.346
-0.780
Table 6 The difference between the MATLAB and Adams models for all LP scenarios.
37
Phil Foster
Graphical output of the results confirms these results showing that when the pipe is short the accuracy is good and as the length increases the accuracy decreases. Comparing figures 20 and 21, it is easy to see that as the pipe diameter increases the accuracy also increases. It can be seen that as the pipe diameter is increased the piston opens quicker. The other comparison is to look at the trends with the pipe lengths, keeping the diameter constant. This shows what happens during the simulation more clearly, that as the pipe length is increased the piston opens slower. Figures 22 and 23 show the 1m long pipe looks out of place but it is proportionally much shorter than the difference between the other two lengths. The results are similar to the Adams results although it is possible to see that the wider pipes are less accurate than the 0.005m diameter pipe. In a comparison between the HP and LP mean percentage difference, shown in tables 5 and 6, all the values have a similar range. There are a few outliers where the HP value is higher than the LP as generally they are similar. There is no trend as to where the outliers occur. For d=0.05m and d=0.01m the occurrence is with the longest pipe length but for the widest pipe the unexpected values occur with the shortest pipe length. The standard deviation for the differences between the models is 0.0335 for the HP tests and 0.00840 for the LP tests. This shows that the accuracy for the LP simulations is much higher although overall the standard deviation value is low. The total variance from the mean difference is minimal. The LP system has a lower standard deviation value as the piston is moving a shorter distance. This implies that 95% of the values are within 0.101m for the HP simulations and only 0.0252m for the LP simulations. Generally all the results are within a 5% error margin of the Adams results, only three of the eighteen simulations exceed this lower error bound, and only one of these is greater than 10% from the Adams output.
38
Phil Foster
Figure 20 - Graph showing the piston position against time for the MATLAB model, HP and L=1m.
Figure 21 A graph showing the piston position against time for the Adams model, HP and L=1m.
39
Phil Foster
Figure 22 - A graph showing the piston position against time for the MATLAB model, LP and d=0.005m
Figure 23 - A graph showing the piston position against time for the Adams model, LP and d=0.005m
40
Phil Foster
By looking at the full set of graphs, which are listed in the appendix, it is possible to see that the trends between the sets of graphs are similar. This shows that throughout the models simulation the model produces similar results, rather than results that just average out over time to produce a good average. By producing a similar curve on the graph to the Adams results the model shows that it does work, just not as accurately as required. Another point for observation for the model with regards to accuracy is the time scale for the model solutions. The worst cases are when the pipe length is longest and the diameter is narrowest. This case gives the longest time for the piston to open. Often the time for the piston to open fully is longer than the 10 seconds of simulation. This effect is likely to be a by-product of the faults mentioned with the pipe resistance equations but could be a separate issue. More testing would be required to decide whether this is the case or not. The same initialisation file, with no alterations, was then used in the tests for Model 2 and Model 3.
41
Phil Foster
5.2.2 Model 2
Looking at the second set of examples as used for Model 1, where the pressure is set to HP, and diameter is 0.005m and the pipe length is varied, it is clear that the model does not produce accurate results. For these results, the 10m pipe has the worst difference. However, both the 1m and 5m length pipes have an 8% difference, which is a significant increase in the errors from Model 1. In this model there are three pipe blocks used, the flow is effectively flowing through two lengths of pipe. When the pipe length is set to 1m the fluid is flowing through 2m of pipe between the pump and each of the actuators. This means that any errors with the pipe resistance equation regarding the length of the pipe will be effectively doubled.
Time (s)
MATLAB Model Piston Position for various pipe lengths 1m 5m 0.200 0.225 0.248 0.269 0.287 0.304 0.318 0.331 0.342 0.352 0.360 10m 0.200 0.213 0.225 0.237 0.248 0.259 0.269 0.278 0.287 0.296 0.304
Adams Model Piston Position for various pipe lengths 1m 0.200 0.260 0.306 0.339 0.362 0.377 0.388 0.395 0.400 0.403 0.405 5m 0.200 0.238 0.270 0.298 0.320 0.339 0.353 0.365 0.375 0.382 0.388 10m 0.200 0.228 0.252 0.274 0.294 0.311 0.326 0.339 0.350 0.359 0.367
0 1 2 3 4 5 6 7 8 9 10
0.200 0.304 0.360 0.387 0.399 0.404 0.407 0.408 0.408 0.408 0.408
Table 7 A summary of results from Model 1, comparing the position of the piston against time.
Using the complete set of results (rather than just the summary above) for these three model tests, the difference values are: 42
Phil Foster
1m 0.0263 8.09
5m -0.0279 -8.38
Table 8 The differences in piston positions between the MATLAB and Adams models.
The results displayed in tables 7 and 8 show a decrease in accuracy for the 1m pipe compared to Model 1, but it is still the most accurate of the three different pipe lengths. The 10m pipes accuracy is now considerably outside the 5-10% suggested to be an allowable error margin. The full set of difference results are shown below. Only the shortest pipe fully opens during the 10 second simulation, which allows a large percentage difference to occur.
0.0261
-0.0280
-0.0453
0.00564
-0.0171
-0.0461
0.00708
0.000176
-0.00850
8.00
-8.44
-14.3
1.70
-4.69
-12.2
2.29
0.0400
-2.33
Table 9 The difference between the MATLAB and Adams models for all HP scenarios.
L=5, d=0.005
L=10, d=0.005
L=1, d=0.01
L=5, d=0.01
L=10, d=0.01
L=1, d=0.02
L=5, d=0.02
L=10, d=0.02
-0.00498
-0.0192
-0.0212
-0.0015
-0.0113
-0.0166
3.59E-05
-0.00263
-0.00582
-2.06
-8.00
-8.98
-0.619
-4.55
-6.77
0.0137
-1.07
-2.34
Table 10 The difference between the MATLAB and Adams models for all LP scenarios.
43
Phil Foster
Looking at tables 9 and 10, it can be seen that, once again, the results dramatically improve when the pipe width increases. There is still a trend on which of the pipe lengths are accurate, although the whole set of data seems to have been shifted. The piston now opens more slowly for all the pipe lengths in comparison to the Model 1. This can be put down to the extra pipe blocks in the model. Overall more of the results from the difference calculations are negative so generally the piston is just opening more slowly in the MATLAB model, but as there are some exceptions. This means that that whilst the problem still probably lies within the pipe resistance calculations, other areas may be producing errors. There are some odd results when comparing the differences between the HP and LP simulations. Unlike in Model 1 over half of the results have a mean percentage difference with significant variation between the HP and LP systems. In this system the pressure seems to affect the accuracy, but this is likely to be due to the total time taken for the piston to fully open. There is no common trend to show that by varying the pressure the precision of the model will be affected although more testing would be required to confirm this. Figures 24 and 25 show that there are some large inaccuracies. The results for the wider pipes appear to be quite accurate although the time taken for the piston to open is small. Since the junction block is modelled to be a perfect, resistance free connector, rather than applying a resistance, errors may be occurring. Also, any errors with the pipe resistance equations (as mentioned for Model 1) will be doubled in these models so it is not easy to check other areas for problems unless the pipe equations are improved. For this model the average standard deviation value for the differences between the two models is 0.0420 for the HP simulations and 0.0107 for the LP simulations. This is worse than for model 1 but is still a low variation. The majority of the results lie within 5% of the Adams results, and of these there is still only one value that exceeds the 10% upper bound.
44
Phil Foster
These are graphical outputs showing some of the results from Model 2. The full set of graphs is listed in the appendix.
Figure 24 - Graph showing the piston position against time for the MATLAB model, HP and L=1m.
Figure 25 - Graph showing the piston position against time for the Adams model, HP and L=1m.
45
Phil Foster
Figure 26 - Graph showing the piston position against time for the MATLAB model, LP and d=0.005m.
Figure 27 - Graph showing the piston position against time for the Adams model, LP and d=0.005m
46
Phil Foster
5.2.3 Model 3
Once again we will look at the same set of examples as for Model 1, with pressure set to HP, diameter at 0.005m and the pipe length varied.
Time (s)
MATLAB Model Piston Position for various pipe lengths 1m 5m 0.200 0.239 0.272 0.300 0.323 0.341 0.356 0.368 0.377 0.384 0.390 10m 0.200 0.219 0.237 0.254 0.269 0.283 0.296 0.308 0.318 0.328 0.337
Adams Model Piston Position for various pipe lengths 1m 0.200 0.287 0.341 0.372 0.390 0.399 0.403 0.406 0.407 0.408 0.408 5m 0.200 0.255 0.298 0.330 0.353 0.370 0.382 0.390 0.396 0.400 0.403 10m 0.200 0.240 0.274 0.303 0.326 0.344 0.359 0.370 0.379 0.386 0.391
0 1 2 3 4 5 6 7 8 9 10
0.200 0.337 0.387 0.402 0.407 0.408 0.408 0.408 0.408 0.408 0.408
Table 11 A summary of results from Model 1, comparing the position of the piston against time.
Using the complete set of results (rather than just the summary above) for these three model tests, the mean difference values are:
Pipe Length Mean Difference (m) Mean Percentage Difference 1m 0.0169 5.17 5m -0.0221 -6.38 10m -0.0500 -14.8
Table 12 The differences in piston positions between the MATLAB and Adams models.
47
Phil Foster
The data for this model shown in table 11 is marginally more accurate than for Model 2. The fluid still only flows through two pipes, so the inclusion of the extra pump to the system has not made the system function any worse than before. Once again, only the shortest pipe here opens the piston up to the equilibrium point so there is room for error but the slight increase in the accuracy could be due to the slightly quicker average solution time to the model. The full set of comparison data is shown below.
0.0169
-0.0221
-0.0500
0.00397
-0.0113
-0.0321
0.00484
0.000258
-0.00544
5.17
-6.38
-14.8
1.21
-3.09
-8.50
1.58
0.0750
-1.49
Table 13 The difference between the MATLAB and Adams models for all HP scenarios.
L=5, d=0.005
L=10, d=0.005
L=1, d=0.01
L=5, d=0.01
L=10, d=0.01
L=1, d=0.02
L=5, d=0.02
L=10, d=0.02
-0.00333
-0.0168
-0.0227
-0.000970
-0.00764
-0.0125
5.65E-05
-0.00173
-0.00382
-1.37
-6.92
-9.42
-0.399
-3.07
-5.07
0.0236
-0.701
-1.53
Table 14 The difference between the MATLAB and Adams models for all LP scenarios.
The results are a mixture of negative and positive differences, show that the model produces results either side of the Adams results, opening the piston both quicker and slower under different simulation conditions. As the diameter of the pipe gets wider the set of results shift towards a positive difference. Here the overall solution time is quicker, leaving less time for the model to produce inaccurate results. Likewise, when the length of the pipe is shortest the results are more accurate, due to a quicker solution time. Looking at figures 28 and 29 the shapes of the graphs are similar although the MATLAB model opens the piston quicker in all three of these conditions. The LP simulation results shown in figures 30 and 31 appear 48
Phil Foster
much closer, although the MATLAB model opens the piston slower in these situations. For model 3, the standard deviation for the difference between the two models for the HP simulations is 0.0390 and is 0.00988 for the LP simulations. This is an improvement from model 2 and is almost as good as the results from model 1. This implies that 95% of the results are within 0.117m for the HP simulation and only 0.0296m for the LP simulation. Overall the percentage difference is good, with once again a majority of results within 5% of the Adams results and only one falling outside 10%.
49
Phil Foster
Figure 28 - Graph showing the piston position against time for the MATLAB model, HP and L=1m.
Figure 29 - Graph showing the piston position against time for the Adams model, HP and L=1m.
50
Phil Foster
Figure 30 - Graph showing the piston position against time for the MATLAB model, LP and d=0.005m
Figure 31 - Graph showing the piston position against time for the Adams model, LP and d=0.005m
51
Phil Foster
52
Phil Foster
6 Conclusion
Analysis of the model shows that it is possible to model a simple hydraulic network with fairly good accuracy. More work does need to be performed to improve the pipe component and to improve the accuracy. Real-time simulation is also achieved by using the discrete solver within the Simulink environment. This is provided as part of the SimPowerSystems functionality. Since real-time simulation is achieved, the main purpose for the investigation, it is successful, although improved accuracy would be required for actual use within industry.
53
Phil Foster
Phil Foster
Modelling fluid flow in three dimensions, rather than assuming horizontal flow would affect properties of the system. This would take into account the aircraft orientation since during take-off and landing the angle of the aircraft with respect to gravity varies extensively. Since gravity does play a major part in the movement of objects, if a flow of fluid were assisted by gravity there would be some increase in kinetic energy. Designing a model for a 3D world would be very difficult. If flow were to be modelled for the changing pitch or roll of the aircraft as well as the initial 3D environment of the system within the aircraft, there would be many factors that would need to be included. A representation would need to be created to allow the position of components and, for items like pipes, a gradient would need to be known. Tests would then need to be performed to check how this actually affects the system so the models equations could be edited.
55
Phil Foster
7 Bibliography
[ADAMS04] [ADI04] [AERO04] http://www.mscsoftware.com/products/products_detail.cfm?PI=435 Product details for Adams/Hydraulics software. Last accessed on . http://www.adi.com/pdfs/AircraftIntegration.pdf - Paper on Aircraft Development. Last accessed on 06 Nov 04. T. Gerkens, G. Fritsch, C. Seyffert, J. Bttner, I. Mugtussidis and I. Morrish (2004). The Iron Bird for the Fairchild-Dornier 728. Aerospace Science and Technology 8 (2004) 231243. http://www.airbus.com/media/fly_by.asp - Information on fly-by-wire process. Last accessed on 06 Dec 04. Adrian Als & Charles Greenidge, 2003 http://scitec.uwichill.edu.bb/cmp/online/cs22l/waterfall_model.htm Waterfall model. Last accessed on 10 Feb 04. Robert S. Andrews, Senior Engineer, Hydraulic Design. Details of the hydraulic system of an F-15 jet. http://www.f15sim.com/operation/f15_hydraulic_system.html - Last accessed on 23 Feb 05. http://www.engineersedge.com/hydraulic/hydraulic_actuator.htm - Details about hydraulic actuators. Lat accessed on 23 Feb 05. http://www.faa.gov - The main Federal Aviation Administration web page. Last accessed on 25 Nov 04. http://www.faa.gov/certification/aircraft/original_design_approval.htm Guide on Original Design Approval Process. Last accessed on 08 Dec 04. AC 25.735-1. Brakes and Braking Systems Certification Tests and Analysis. Advisory Circular document produced by the FAA. Steve Wright, Airbus UK, 2004, A380 FCMS Test Rig High Level Design for Fuel Simulation Program (FSP). Computer Applications in Hydraulic Engineering: connection theory to practise. Haestad Methods, Inc. Haestad Press 2002. K. Wu, Q. Zhang and A. Hanson (2004). Modelling and identification of a hydrostatic transmission hardware-in-the-loop simulator. Int. J. Vehicle Design, Vol. 34, No. 1. Ashok Joshi, Jayan, PG., "Modeling And Simulation Of Aircraft Hydraulic System", AIAA Modelling and Simulation Conference and Exhibit, 05-08 August 2002, Monterey, CA, USA. Principles of Physical Modelling, March 14 2004. Lecture by Mikael Johansson from KTH Royal Institute of Technology, Stokholm. Published at http://www.s3.kth.se/control/kurser/2E1282/lectures/lec02.pdf. Last accessed on 08 Dec 04.
[AIR04] [ALS03]
[AND00]
[JOS02]
[KTH04]
56
Phil Foster
http://www.luftrecht-online.de/english/jaa.htm - Information on JAA. Last accessed on 11 Feb 05. http://www.mathworks.com/products/matlab/ - Overview of Matlab software. Last accessed on 01 Nov 04. http://www.mathworks.com/products/simulink/ - Overview of Simulink software. Last accessed on 01 Nov 04. http://www.mathworks.com/products/simpower/ - Overview of SimPowerSystems Blockset. Last accessed on 30 Nov 04. Q. Zhang, D. Wu, J. F. Reid and E. R. Benson (July 2002). Model recognition and validation for an off-road vehicle electrohydraulic steering controller. Agricultural Engineering Department, University of Illinois at Urbana Champaign, Urbana, IL 61801,USA. Friedrich Pfeiffer and Fredrik Borrchsenius. New Hydraulic System Modelling (2003). Institute for Applied Mechanics, Technical University of Munich. Steve J Wright (Aug 2004). SJW Bath Symposium. http://www-ccs.ucsd.edu/matlab/toolbox/simulink/c01_get1.html#1950 Information about Simulink from University of California. Last accessed on . Watton, J. (1989). Fluid Power Systems: Modelling, Simulation, Analog and Microcomputer Control, Prentice-Hall, Englewood Cliffs, NJ.
[PFEI03]
[SWJ04] [UCSD04]
[WAT89]
57
Phil Foster
Appendix
DiscreteSwitchThreshold = 0.5; % Volts % Constants and translation factors TypicalFluidDensity = 797.0; SecsPerHour = 3600; SecsPerMin = 60; Mins2Secs = SecsPerMin; Litres2CubeM = 1/1000; kpl2kpm3 = 1/Litres2CubeM; PerMin2PerSec = 1/SecsPerMin; PerSec2PerMin = SecsPerMin; % kg/m3 % sec/hr % sec/min % sec/min % Translate litres to m^3 % Translate kg/litre to kg/m3 % Translate per-min to per-sec % Translate per-sec to per-min [Supplied in Flowmaster model] [Physical constant] [Physical constant] [Physical constant] [Physical constant] [Physical constant] [Physical constant] [Physical constant]
PerSec2PerCycle = MainSamplingPeriod; % Translate per sec to per-cycle PerCycle2PerSec = 1/PerSec2PerCycle; lpm2mps = Litres2CubeM/Mins2Secs; Pascal2Bar = 1/100000; Bar2Pascal = 100000 % Translate per-cycle to per-second % Translate per-min to per-cycle % Translate litres/min to m3/sec % Translate Pascals to bar % Translate bar to pascals % Translate bar/lpm to pascal/m3ps % Translate bar/lpm to pascal/kps % Mathematical Constant [Selected to avoid calculation saturation] PerMin2PerCycle = PerMin2PerSec * PerSec2PerCycle;
BarPerLpm2PascalPerMps = Bar2Pascal/lpm2mps; BarPerLpm2PascalPerKps = Bar2Pascal/lpm2kps; Pi = 3.1415926; % General infinite values InfiniteVolume = 1e9 InfiniteLevel = 1e9;
57
Phil Foster
InfinitePressure = 1e9; InfiniteFlow = 1e9; InfiniteResistance = 1e9 * BarPerLpm2PascalPerKps; InfiniteTime = 1e9; % General near-zero values [Selected to avoid calculation saturation] % Pascal/kgs-1 % sec
NearZeroResistance = 1e-9 * BarPerLpm2PascalPerKps; NearZeroTime = MainSamplingPeriod/1000; % Pump parameters PumpOnPressure PumpOffPressure PumpSwitchTime PumpOnDelay % Piston parameters PistonInletResistance PistonLength PistonDiameter PistonArea PistonVolume InitialPos InitialPressure InitialVolume % Pipe parameters PipeLen PipeDiam = 1.0; = 0.005; % m % m = 0.2; = 0.0; = InitialPos * PistonArea; = 1.0e7; = (0.0 * Bar2Pascal); = 0.01; = 0;
PumpInternalResistance = PumpOnPressure/PumpZeroPressureFlow;
= 4e-6 * BarPerLpm2PascalPerKps; % Pascal/kgs-1 = 0.5; = 4e-3; = (PistonDiameter / 2)^2 * Pi; = PistonLength * PistonArea; % m % Pascal % m^2 % m % m % m^2 % m^3
[Varied between 1m, 5m and 10m] [Varied between 0.005m, 0.01m and 0.02m]
PipeResistance = (PipeLen * 4) / ( (PipeDiam / 2)^2 * Pi ) * BarPerLpm2PascalPerKps; % Pascal/kgs-1 InPipeResistance = NearZeroResistance; % Pascal/kgs-1 JunctionResistance = NearZeroResistance; % Pascal/kgs-1 % Spring parameters SpringStiffness = 2e5; % Newtons
58
Phil Foster
MATLAB Graphs
Adams Graphs
59
Phil Foster
Graphs comparing pipe diameters for the HP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
60
Phil Foster
Graphs comparing the pipe length results for the LP system. The top set of graphs are for d=0.005m, the second set are for d=0.01m and the bottom set are for d=0.02m
61
Phil Foster
Graphs comparing the pipe diameter results for the LP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
62
Phil Foster
Model 2 Results
Graphs comparing pipe lengths for the HP system. The top set of graphs are for d=0.005m, the second set are for d=0.01m and the bottom set are for d=0.02m
63
Phil Foster
Graphs comparing pipe diameters for the HP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
64
Phil Foster
Graphs comparing pipe lengths for the LP system. The top set of graphs are for d=0.005m, the second set are for d=0.01m and the bottom set are for d=0.02m
65
Phil Foster
Graphs comparing pipe diameters for the LP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
66
Phil Foster
Model 3
Graphs comparing pipe lengths for the HP system. The top set of graphs are for d=0.005m, the second set are for d=0.01m and the bottom set are for d=0.02m
67
Phil Foster
Graphs comparing pipe diameters for the HP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
68
Phil Foster
Graphs comparing pipe lengths for the LP system. The top set of graphs are for d=0.005m, the second set are for d=0.01m and the bottom set are for d=0.02m
69
Phil Foster
Graphs comparing pipe diameters for the LP system. The top set of graphs are for L=1m, the second set are for L=5m and the bottom set are for L=10m
70