Saturday, March 30, 2019

Parameter Dependencies: Problems and Solutions

parametric quantity Dependencies Problems and SolutionsAbstractThis masters dissertation concerns study of plant discipline placements. discipline forge for embed ascertain carcasss involves several tonicitys, such as attend determination, rapid prototyping, fixed- show up implementation and life-threateningw atomic number 18-in-the-loop- pretexts.A nonher gradation, which Volvo is not currently work upment within climate manipulate is on-line pipeline up. One reason for not utilise this technique today is that the avail equal wights for this task (ATI Vision, INCA from ETAS or CalDesk from dSPACE) do not handle arguing dependencies in a satisfactory counseling. With these constraints of today, it is not achievable to physical exertion online tune up and ascendancy development wreak is to a slap-uper extent boilious and quantify go through.The main task of this thesis is to solve the riddle with tilt dependencies and to unsex online tuning possibl e.1 INTRODUCTION1.1 BackgroundVolvo engineering (VTEC) is an innovation compevery that provides expert licks and develops reinvigorated technology for hard as well as soft products within the transport and vehicle industry. Among opposite things VTEC is working with embedded decl atomic number 18 systems. For one of the embedded match systems peculiarly Climate aver Module (CCM), VTEC is working with the whole chain. VTEC does this for Volvo Cars, Volvo Trucks, Volvo Construction Equipment, Renault Trucks and knowledge domain Rover.The work work for embedded operate on system developmet is typic in all toldy as followsControl DesignRapid Control PrototypingFixed-Point ImplementationHardwar-In-the-Loop SimulationOnline Tuning.It is an iterative aspect exhibit, but on that point is one enigma for the last shade, which limits the possibilities of working iteratively. Control endeavor is typically make in MATLAB/Simulink and Fixed-Point implementation is typically made with a tool such as TargetLink. During these steps the contentions whitethorn be handled in an m- blame. When going to the on-line tuning step however, the arguments ar handled in a tool such as ATI Vision, INCA or CalDesk. Once you deal taken this step the connection to the m- institutionalise is lost. Therefore the last step is more or less of a one-way step. It is not realizely impossible to go hold up to the earlier steps in the development chain, but the iterative treat is not well supported by available on-line tuning tools of today.The spare-time activity m-script instructions ar manakins of arguing dependencies that get out cause the mentioned enigmas thawing = -100, -20, 0, 20, 100 BlowerHt = 12, 5, 4, 5, 10 Blower_min = min BlowerHtDefrosting = 0, 20, 100 BlowerDef = Blower_min, Blower_min, 10 utilize the above senders in interpolation tables, one table with Heating as infix vector and BlowerHt as output vector and an betimes(a) table with Defrostin g as input vector and BlowerDef as output vector would cause problems during on-line tuning process. Three of the elements be meant to fuddle identical set, but the tools, as it is today would allow them to be tuned individually. This is just one of m either constructs, which may be in truth useful as long as you atomic number 18 in the MATLAB environment but causes problems during the on-line tuning process.1.2 Goals and objectivesThe main goals of this masters thesis areTo investigate the problem of disputation dependencies.To find possible solutions.To make online tuning possible for dependance lines in the development process of embedded control systems..2 BACKGROUND2.1 EMBEDDED SYSTEMS2.1.1 Hi invention of imbed SystemsIn the era of earliest development of computers i.e. 1930-40s, generally computers were capable of doing a undivided task. Over time with the advancement in technology, traditional electromechanical sequencers presented the idea of programmable domina nces utilize solid state devices.One of the setoff recognizably young embedded systems was the Apollo Guidance Computer, developed by Charles Stark Draper at the MIT orchestration Laboratory.1 afterward the early maskings in 1960, the prices of embedded systems have come megabucks and their processing power has been increased dramatically. A standard for programmable microcontrollers was released in 1978 by National Engineering Manufacturing Association. This standard was for almost whatsoever computer- ground controllers for example event- idead controllers and iodine board computers.When the production cost of microprocessors and microcontrollers fell, it became feasible to replace old, big and pricy components like potentiometers and varicaps with microprocessor read knobs.With the integration of microcontrollers, the application of embedded systems has further increased. The embedded systems are macrocosm use into areas where generally computers would not have been con sidered. nigh of the complexity is contained within the microcontroller itself and precise a few(prenominal) additional components are needed. So because of this most effort is in software program area.(last sentence is difficult to understand).2.1.2 putting green Characteristics plant Systems have several common cleaning ladyacteristics.Uni-Functional Embedded systems are normally useed to ladder only one program but repeatedly. For example, an unexceptional scientific calculator result always do only weighings. objet dart on the unsanded(prenominal) hand, a laptop computer eject execute an enormous number of different programs, like web browsers, word processors, computer programming tools and video games. New programs or softwares are added genuinely frequently.Tightly bound All computing systems have constraints on visualise calculateds, but these constraints flock be real tight for embedded systems. A design metric is defined as, a measure of an implement ations features, such as cost, size, performance, and power. Embedded systems are often craved to cost just a few dollars, they mustiness be designed for minimum size to fit on a single chip, they must be able to perform refrain processing in station to process real-time data, and they must pick out minimum power in order to extend battery disembodied spirit or may be to prevent the want of a modify fan.Reactive and real-time Many embedded systems should be able to continually react to changes in the systems environment. They must also compute certain results in real time without too much delay. For example, a cruise controller in cars have to monitor and react to speed and brake sensors continuously. It must compute acceleration or decelerations repeatedly within quite bound time a delay in computation of results could result in a fatal failure to maintain control of the car. On the other hand, a desktop computer generally focuses on computations with comparatively remark able reactions to input devices. In addition, a delay in those computations may perhaps be inconvenient to the user but that does not result in a system failure.2.2 lay Based Design molding-Based design in short MBD is a mathematical and visual method of addressing problems associated with shrewd complex control systems. It is employ in many industrial equipment designing, self-propelling and aerospace applications. Here in this thesis our focus is on climate control of new vehicles. This methodology is used in designing embedded software.Embedded software development consists of four stepsModeling a plant.Analyzing and synthesizing a controller for the plant.Simulating the plant and controller.Integrating all these phases by ontogenesis the controller.Model-based design is quite different from the conventional designing method. In this methodology ornamentalist use continuous and discrete time building blocks kinda of using long and complex software coding.This feigning base d design enables originator to fast prototyping, sieveing and verification. Along with all these advan mark offes, dynamic effects on the system merchantman also be tested in ironware-in-the-loop (HIL) simulation mode.Some importationant steps in model-based design access physiqueure areBy choosing appropriate algorithmic rule and acquisition of real-world system data, various types of simulations and abridgment passel be performed in the beginning producing a real controller.The model produced in step one is used to identify characteristics of the plant model. Then a controller tail assembly be made based on these characteristics.Using this model, the effect of time varying inputs stop be analyzed. In this way the possible errors backside be eliminated and it is very convenient to change and test any other parameters.Last step is deployment.Advantages of model based design compared with the conventional approach are as followsModel based design provides common design environment which is important for development groups from the view point of general communication and specifically for data analysis and system verification.Model based design enable engineers to detect and correct errors in early phase of development. This is crucial point for minimizing time and financial impact of system.Model based design dirty dog be reused later for upgrading and for derivative systems which are capable to expand.2.3 ECU DEVELOPMENT2.3.1 Conventional Approach for ECU DevelopmentThe conventional approach for electronic control unit of measurement, ECU, development is summarized in following four stepsSome experienced personal define the functions and system architecture and at that placefore the hardware engineer design the hardware circuit.Control engineer design the control algorithms and a programmer pay off a handwritten code for that algorithms.Then these control algorithm program codes and hardware are co-ordinated and tested by system engineer or maybe hardware engineer.Then on the engine test bench the complete system is tested.There are few problems with this conventional approach for ECU development.First and very major problem is that the hardware circuits are made before the hinderance of control rules and results. Only this factor adds a big risk in the process of ECU development. morselly if close to error is encountered during the program code testing, it is very difficult to judge whether the error is because of software codes or in the control algorithms. This programming of the control algorithm is itself a very time consuming process and it take additional time when some errors are encountered and the process of debugging. Since many people from different field of work are obscure in this process so coordination between them also take time and it makes the development cost to increase. 2Thats why the conventional development process can not satisfy the demand of modern age and its requirements.2.3.2 Modern EC U DevelopmentOn the bases of integrated development environment, the modern development of electronic control units can be efficiently completed and tested. Using model based simulation and hardware-in-the-loop simulation it is very easy and convenient to eliminate software errors and to modify the control algorithms. Due to this the development cost is reduced and development efficiency is improved. This modern development process is called V-cycle development process.This process is illustrated in Ffig. 1. (when you use figures from other publications, you have to get permission from the auther. It is not luxuriant to put a reference)Fig. 1. The V-Cycle of model-based software development. 2This process is summarized as followsUsing very sophisticated tools like MATLAB/Simulink/Stateflow and dSPACE TargetLink, the control algorithms are modeled. These control algorithms are substantiate using off-line simulations.The ANSI C code is produced using code times tool. The one we are using is dSPACE TargetLink.The code produced in above step is compiled and downloaded into the control module and simulation is done in Hardware-in-the-loop mode, which confirms the credibility of the control algorithms.This tested program code of control algorithms is downloaded into the electronic control unit for further test and modification.Finally normalization of the whole control system is done.2.4 Universal measurement and standardization Protocol (XCP)XCP is a standardized and universally applicable protocol with much rationalization potential. It is not only used in ECU development, normalisation and programming, it is also used to integrate any in demand(p) measurement equipment for prototype development, functional development with bypassing and at SIL(define) and HIL(define) test stands.16For calibration and measurements, it is common practice to connect electronic control units in a * squeeze out* ne bothrk. For this purpose CAN calibration protocol is used ex tensively. With change magnitude demands of more sophisticated controllers, new electronic control units are enough more and more complex and for that reason new nedeucerks are being developed such as, FlexRay, TTCAN etc.(give references)To meet the needs of new networks, the measurement and calibration protocol should be more generalized and flexible. This generalized and flexible protocol is XCP (Universal measurement and calibration protocol).XCP is in low-level of transport layers. So in XCP, X generalizes the various transport layers that* Details about CAN are provided in Appendix A.are used by the members of the protocol family e.g. 9XCP on CANXCP on FlexRayXCP on EthernetXCP on USB and so on(you have to refere to from each one figure)Fig. 2. XCP support for different transport layers 10.3 PROBLEM INVESTIGATIONThis chapter allow for give answers to the following questionsWhat is parameter dependency problem?What is the effect of parameter dependency problem on tuning of e mbedded control systems?What are the difficulties to solve the problem at different platforms?Note All examples used in this report are only for fable purposes and are not the actual parameters used in climate control module of Volvo Cars and Volvo Trucks.3.1 murder process for developing embedded control systemsThe complete process for developing embedded control systems is illustrated in Ffig. 3. First step of this development process is to define parameters and that can be done in the m- send. These parameter grades are loaded into MATLAB base workspace from where TargetLink/Simulink model fetches these set to simulate the process.After checking the simulation results and doing some modifications if required, C-code is generated by TargetLink. That C-code contains all the knowledge about the control algorithm and input value. In the next step the auto-generated C-code is compiled using a Green Hills Suite.Fig. 3. Complete Production(rapid prototyping process?) Process.Green Hills software together with gnu Make and VBF converter is used to generate a map record and VBF point (Volvo Binary Format). This vbf file is downloaded in the embedded controller. The map file is used to generate A2L file using TargetLink. This A2L file is required by the calibration tool (for this project ATI VISION is used for calibration) and thusly using this calibration tool we can do parameters modifications in ECU. These modifications are also called tuning.3.2 parametric quantity DependencyAs all parameters are defined in a m-file, some parameters depend on the set of some other parameters. It may also be possible that the value obtained as a result of calculation between two or more parameters are used in the definition of other parameters. So, all those parameters which contain some other parameters or calculations of some other parameters in their definitions are called capable parameters e.g.In above example parameters line 2 is dependent on parameter 1. tilt 4 i s dependent on parameter 2 and 3.Parameter 6 is dependent on parameter 2 and 3.3.3 Reasons for introducing parameter dependenciesThinking of parameter dependencies a question may arise in minds that, Why do we need to publish parameter dependencies at the first place?Answer to this question is that, when designing a control algorithm in a tool such as Simulink, it is convenient to use named parameters (variables) instead of hard coded numbers (constants).For example, if the blueest fan available corresponds to a emf of 13.5V. Designer may want to have a parameter for this, so that instead of using the value 13.5 at many instances of algorithm, the name of parameter specified for that value can be used. If one day that hardware is needed to be changed and for new hardware 13.4V is the maximum that can be used for highest fan level, so it is easier to change one parameter value rather than changing many hard coded value at different instances.Sometimes it is good to have one para meter depending on another. For instance in a look-up table, there are several determine in each vector and these values may depend on other parameters. It would be rather limiting if a vector or a matrix could only contains hard coded numbers.So, the use of dependent parameters helps keeping a good structure in the algorithm. It makes easier to work with the parameters.3.4 Statistics about parameter dependencyThere are quite significant numbers of parameters which are dependent on other parameters. For instance in Climate Control P3, enumerate number of parameters is 1618 out of which 227 parameters are dependent on other parameters and 1391 parameters are independent. We call independent parameters as Base Parameters.Fig.4 Percent of Dependent parameters3.5 Parameter dependency problem in development processTo analyze the problem of parameter dependency, lets walk through the development process of embedded control systems and find out what exactly is the problem with parameter dependencies.As the process starts with parameter definitions in m-file, so the investigation starts from m-file, see Fig. 5.. To visualize this process, an illustration with an example of parameter with dependencies in its definition is shown as followsFig.5. Example of parameter definition in m-file.After defining all parameters, the m-file is run in MATLAB. In this step all the values of dependency parameters are valuated by MATLAB and are loaded into MATLAB base workspace. Precisely during this loading process the dependencies are replaced by their values and any selective cultivation about the relation of a parameter with dependency parameter is lost.Fig.6. Dependency loss in MATLAB base workspace.As now the dependency information is lost, so this loss will propagate through all the further steps, for example in C-code generation, A2L file and in strategy(?) file.Following F fig 7. shows that the propagation of dependency information loss. So in C-code there is no informatio n with the help of which we can trace dependency parameters.Fig.7 Propagation of dependency loss from MATLAB to C-code.3.6 Effect of parameter dependencies on development processThe problem caused by parameter dependencies comes to the muster up during the calibration step.During calibration the values of parameters are tuned. When the information of parameter dependencies is lost, then we have to tune each parameter value individually. This is shown in the Ffollowing fig 8.Fig.8. Effect of dependency loss on development process.So if a parameter is used, for instance, in the definitions of five different parameters, then we have to tune the value of that parameter at those five fixs individually. If there is any calculation involved in any parameter definition, then we must do it manually and modify the value. This process of changing values manually is very time consuming and error prone.There is another possibility that to neutralise doing these calculations and tuning parame ter values individually. We can change the parameter values in the original m-file, where we have all parameter definitions and repeat the complete process again. This is very laborious work and it also takes a clutch of time, so this possibility is not so feasible.4 POSSIBLE SOLUTIONSAs the complete process for developing embedded controllers is a multistage process and it depends on four highly sophisticated software platforms. So there can be different approaches to solve the dependency information loss. Following are the possible platforms for doing modifications in order to handle the dependency loss problem.MATLABTargetLink modelC-codeCalibration tool divorce windows applicationFollowing is the in reasonableness analysis of above mentioned platforms and possibility of finding a feasible solution.4.1 Parameter dependencies and MATLABWhen m-script, containing all parameter definitions, is run in MATLAB, all parameter values are evaluated and stored in MATLAB base workspace. Ri ght at this first step dependency information in m-script is lost. The Rreason of this loss is that MATLAB base workspace support values belong to only one class type. That can be char, double, struct or any other class but the values can not belong to a mixture of two or more class types, i.e., values cannot consist of two elements of an array belonging to char class and other elements of array belonging to double class.(I shot that a struct can consist of chars as well of doubles)Fig.9. Supported variety types in MATLAB base workspace.In our case of parameter dependency for example, we have an array of eighth elements. Second element and eighth element of our example array are names of some other parameters, so these names belongs to char class and rest of elements of that array are numerical values belonging to double class. So MATLAB evaluates the values of dependency parameters and replace all names with their corresponding values and our dependency information is lost.Altho ugh there is a function in MATLAB called eval and this function can be used instead of dependency parameter name but this does not solve our problem because this function will evaluate the values of those parameters and eventually its the value of parameter which is updated in the base workspace and dependency information is still filtered out.Moral of the story is that we can not do anything in MATLAB to save our dependency information until unless MathWorks do some changes in MATLAB so that base workspace would be able to support values belonging to different classes in corresponding definition. 4.2 Parameter dependencies and TargetLinkIn TargetLink we can use custom lookup tables and we can complicate custom code. Let us suppose for a moment that by adding these custom lookup tables and using some tautological blocks we manage to introduce lost dependency information in TargetLink model. But when TargetLink will generate C-code, most probably it will evaluate all those values and resulting values will be included in C-code.There are two reasons for this behavior of TargetLinkFirst reason is that, TargetLink work inside MATLAB so all the calculations are done in MATLAB and we face the same problem as described previously.Second reason is that, dSPACE claims that TargetLink generates C-code in the most efficient way, because this C-code is flashed into controller in binary format, so it is the maximum effort of TargetLink to keep C-code as small as possible because of the limited memory of ECU and demand of high operational speed.So TargetLink does not generate extra variables and pointer in C-code until unless some significant changes are done in TargetLink by dSPACE.4.3 Parameter dependencies and C-codeC-code generated by TargetLink can be modified and it is possible to add any kind of extra information but there are two reasons which make this possibility impracticable.First reason is that, this C-code will be flashed into ECU and there is very limited memory in the control unit and bigger C-code will result into a less efficient embedded controller.Second reason which makes this possibility impracticable is that. iIt requires a lot of manual labor every time we change something. This is also error prone.4.4 Parameter dependencies and Calibration toolIn calibration tool like ATI VISION, there is an extract to use script written in Vision scripting language or in Visual basic. Instead of doing manual calibration we can automatise calibration using the script.In our case, we have matrices with dependencies. So in order to do calibration using thescripting option we have to write function for doing matrix calculations and then that script must be able to evaluate dependencies according to new values. So this option is not so feasible.4.5 Separate windows applicationAfter analyzing all possibilities only one option is left. That is to develop a give away windows application which will extract dependency information from m-script, c alculate the values of dependency parameters according to the values tuned in calibration tool and will implement those new values of dependencies bear in calibration tool.5 SELECTED SOLUTIONAfter analysis of all possible solutions, it is deducted that the most feasible solution to the dependency loss problem is a separate windows application whichExtracts dependency information from m-file.Gets tuned parameter values from calibration tool.Calculates all values corresponding to those tuned parameter values.And implements updated values of dependency parameters dressing in calibration tool.5.1 Reasons for selecting this solutionAmong other solutions we have selected development of separate windows application, as a feasible solution. Major reasons for selecting this solution are as followsSelected solution which is developing a separate windows application does not need any modification of present softwares. This solution is fast, no extra licenses are required for this and it work s just according to our requirements.If we choose any solution which includes modification in software tools, then that involves the involvement of tool makers. That process of convincing toolmakers to modify their software according to our requirements and if they agree then the process of developing and releasing new version of software may take very long time.Tool makers would charge a great sum of money to make specified changes or for making an hang on application for the softwares.5.2 Overview of solutionThe solution is an application named Dependency Calibrator. It works in two steps.In the first step the m-file is parsed and the information of dependency parameter along with their location in parent parameter areis extracted and rearranged in a way that it can be used in the second step that is calibration.During the second part of the process, first of all the application will import data from VISION so that if user has tuned any value in calibration tool, that data will b e updated in MATLAB and then the application will do calculations in MATLAB after that new values obtained as a result of those calculation will be updated again back to VISION. This cyclic process from VISION to MATLAB and back to VISION will update parameter values. If user has changed values which was used by other parameters, those new values will be updated on all locations where they are used. This is shown in the following figFig. 10..Fig. 10. Overview of solution.The application Dependency Calibrator is divided into two parts.ParserCalibratorDetailed report of how this application isn working is as follows.5.3 Required SoftwaresParser works without any requirement of external software but in order to run Calibrator following softwares must be installed on your systemMATLAB R2007bATI VISION 3.5.3MATLAB is automatically launched by the application but make sure to launch ATI VISION before you use Calibrator part of Dependency Calibrator application.5.4 Project fileProject fil e is a key to control the Dependency Calibrator application. Instead of using hard coded styles for different files used in this application, an option is given to the users to select their desired locations. These locations can be specified in a separate file which is named as project file.In this project file the instructions can be given after certain tags. One must be very careful because these tags should not be altered. While user inputs can be given after the symbol .Dependency Calibrator application is in fact capable of handling multiple m-files and multiple c-files. Directory path for these files can be specifies in project file.Project file contains following tagsVISIONs twisting Name After this tag, name of the hardware device which is used in the VISION device tree, should be given. For example, VISIONs artifice Name PCM Or VISIONs Device Name CCM lane of m File After this tag the in effect(p) path for m-file should be given. If number of m-files is more than one, then this tag followed by file path of those m-files should be given on a new line. Parser will read all these files and will merge them into one file. For example, Path of m File CFolderNamesubFolderFile_Name.m Path of m File CFolderName2subFolder2File_Name2.m musical theme directory for c files In general practice c files can be generated in different folders but their root directory remains same. So in order to avoid repeating same address and to play down the chances of error this tag is introduced in project file. So after this tag path of root directory for c files should be specified. Please note that there should be no at the end of root directory path. For example seed directory for c files DABC_XYZsubFoldersubSubFolders containing c-files After this tag the names of folders which contain c files should be specified. If there are more than one folder containing c files then those folders names should be added after a comma ,. The parser will then search these folders for all c files contained in them. For example Folders containing c-files FolderMedCfiles,subFoldercFolderRoot takings Directory This tag should be followed by the path for required location where the user wants the application to generate all files. For example Root Output Directory CExtra File for calibrating non-calibratable parameters After this tag, there should be the path for the file containing names of those parameters which are not calibratable but they are desired to be calibrated in VISION. Those names should be exactly the same as defined in m-file, followed by underscore _ and followed by any desired word or character.For example Extra File for calibrating non-calibratable parameters CExtraParNames.txt5.5 ParserThe F first part of the complete dependency calibration process is the parser. When Parser is executed, a window appears showing two options, Load Project Fil

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.