CN102393819A - MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method - Google Patents

MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method Download PDF

Info

Publication number
CN102393819A
CN102393819A CN2011103492979A CN201110349297A CN102393819A CN 102393819 A CN102393819 A CN 102393819A CN 2011103492979 A CN2011103492979 A CN 2011103492979A CN 201110349297 A CN201110349297 A CN 201110349297A CN 102393819 A CN102393819 A CN 102393819A
Authority
CN
China
Prior art keywords
test
model
fuzzy
matlab
fuzzy controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011103492979A
Other languages
Chinese (zh)
Inventor
诸葛俊贵
顾美康
许甜甜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Normal University
University of Shanghai for Science and Technology
Original Assignee
Shanghai Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Normal University filed Critical Shanghai Normal University
Priority to CN2011103492979A priority Critical patent/CN102393819A/en
Publication of CN102393819A publication Critical patent/CN102393819A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Feedback Control In General (AREA)

Abstract

The invention discloses a MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method, wherein a step of making a fuzzy controller search table through a SystemTest tool comprises the following processes of: executing a short-term emulation for a model to obtain a first model file; creating a second model file, and copying a fuzzy control module of the first model file into the second model file; adding a Simulink test element for a Main Test in the SystemTest; taking the second model file as a model to be tested, and building test vectors and test variables, wherein the number of the test vectors is in line with the number of the input second model files, and the range of the test vectors is in line with the range of each input; and selecting an appropriate step length, taking the test vectors as input signals for a model test, and storing the output signals of the model test in the built test variables.

Description

A kind of fuzzy controller HDL code automatic generation method based on MATLAB
Technical field
The invention belongs to the IC design technical field, particularly a kind of fuzzy controller HDL code automatic generation method based on MATLAB.
Background technology
The document that the application quotes comprises as follows,
[1]http://zh.wikipedia.org/zh/MATLAB
[2]http://baike.baidu.com/view/584919.htm
[3]http://zh.wikipedia.org/wiki/Simulink
[4] Xi Aimin. fuzzy control technology [M]. Xi'an: publishing house of Xian Electronics Science and Technology University, 2008:98-108.
[5]http://baike.baidu.com/view/2323253.html?fromTaglist
Some terms and the abbreviation that the present invention relates to below described.
MATLAB (matrix experiment chamber)
MATLAB is the abbreviation of MATrix LABoratory, is a business mathematics software of being produced by U.S. The MathWorks company.MATLAB is a kind of advanced techniques computational language and interactive environment that is used for algorithm development, data visualization, data analysis and numerical evaluation.Except common functions such as matrix operation, drafting functions/data image, MATLAB can also be used to creating user interface and reaches and call other Languages (comprising C, C++ and FORTRAN) written program.Although MATLAB is mainly used in numerical operation, it also is fit to the application of different field, for example Control System Design and analysis, Flame Image Process, signal Processing and communication, financial modeling and analysis etc. to utilize numerous auxiliary tools case (Toolbox).Also have a software kit bag Simulink in addition, a visual development environment is provided, be usually used in system simulation, dynamic/aspects such as embedded system development [1]
Simulink (emulation be connected)
Simulink is one of most important assembly of MATLAB, and it provides the integration environment of dynamic system modeling, emulation and an analysis-by-synthesis.In this environment, need not a large amount of writing programs, and only need pass through the simple and direct mouse action, just can construct complicated system.Simulink has advantages such as adapt to wide, structure and clear process and emulation is meticulous, closing to reality, efficient are high, flexible, has a large amount of third party softwares and hardware to can be applicable to or be asked to be applied to Simulink simultaneously [2]Simulink provides an interactively graphical environment and customizable module library (Library), can be to various time-varying system, and for example communication, control, signal Processing, Video processing and image processing system etc. design, emulation, execution and test [3]
Fuzzy controller
Fuzzy controller is by defuzzification interface, inference machine, and rule base, reverse gelatinization interface four parts are formed.Defuzzification interface is used for the input of controller is converted into fuzzy controller ability identified information.Inference machine is used to imitate the expert and makes decisions, and how better the information that receives according to defuzzification interface judge controlling object.Rule base then is that it is made up of the rule statements that contains if-then with expert's control experience quantification.Reverse gelatinization interface is the decision information sharpening that inference machine is made, and is used to control actual controlled device.The basic functional principle of fuzzy controller is that the digital signal of importing is become fuzzy quantity through obfuscation; Send into the fuzzy reasoning module that contains fuzzy rule; Reach a conclusion through approximate resoning---fuzzy set; Become clear amount by the sharpening module then, output to next stage again and go to regulate controlled device, make the satisfied result of its output [4]The structure of fuzzy controller is as shown in Figure 1.
Fuzzy control technology development in theory in recent years mainly shows in the research to the analytical approach of Fuzzy control system stability, proposes a lot of system stability analysis methods.And on the practical applications, what at first will consider is how on hardware system, to realize fuzzy controller, carries out emulation experiment through certain emulation tool then; Whether stable, and realize the most practical still LUT Method of method of fuzzy controller if observing simulation result, be about to the certain scope (domain) that is limited to of input variable; A look-up table is processed in output for the combination in any of all input variables is corresponding; Be stored in this table on the hardware resource, fuzzy controller just is equivalent to a look-up table like this, imports corresponding one group of output for a certain group; This look-up table has been arranged, on software, implemented just easier so.But to produce this look-up table, not be an easy thing, especially many in input variable.
1, Fuzzy Logic Toolbox (fuzzy logic toolbox)
Fuzzy Logic Toolbox utilizes the science computing function of having expanded MATLAB based on the system design aids of fuzzy logic.Can accomplish the overall process of fuzzy inference system design through tool graphical user interface.Function in the tool box provides multiple general fuzzy logic method for designing, for example fuzzy group (Fuzzy Clustering), fuzzy self-adaption neural network learning (AdaptiveNeuro-fuzzy Learning).Can utilize simple fuzzy rule that modeling is carried out in the system action of complicacy through this tool box, then with these rule application in fuzzy inference system.The slip-stick artist can be with the fuzzy inference engine of this tool box as an independent utility, perhaps in whole dynamic system, uses the fuzzy reasoning module among the Simulink that wherein fuzzy subsystem is carried out emulation.http://www.hirain.com/Product/Article.asp?ArtClassID=1398
2, Systemtest (system testing instrument)
Systemtest is powerful system testing and the check analysis instrument that is integrated among the MATLAB; For the test development of MATLAB algorithm and Simulink model provides a software frame; The user can utilize predefined element to build and safeguard the test procedure of standard, the preservation that can also in the process of whole development project, test and shared reusability to guarantee to test.The user can analyze the large data collection through script and the analysis tool of MATLAB, and the behavior of system is made an exhaustive study.
3, Lookup Table (look-up table or question blank)
Look-up table is a module library among the MATLAB assembly Simulink, comprises all kinds of look-up tables in the storehouse, like one dimension look-up table, two-dimensional look-up table, n dimension look-up table etc.Mainly be to be used to approach one dimension, two dimension, n to tie up function.Look-up table is the set that is made up of the data element of same type (or record), owing to exist loose relation between the data element in " set ", so look-up table is a kind of nimble data structure of using.
4, Stateflow (state machine)
Stateflow is the graphical tool of finite state machine (finite state machine), and it can be used to solve complicated logical problem, and the user can be implemented in the conversion between the different conditions through graphical tools.Stateflow can be directly embedded in the Simulink realistic model, and at the initial phase of emulation, SIMULINK can convert the logic figure that Stateflow draws to the C language through program compiler, and the two is organically combined.Stateflow can find in the SIMULINKExtra module library.The emulation principle of Stateflow is finite state machine (finite statemachine) theory, and finite state machine is meant that system contains denumerable state, and when corresponding state event took place, system can transfer to corresponding with it state from current state.The transfer that in finite state machine, realizes state has certain condition, and the state of conversion all can have the state transitions incident each other simultaneously, has so just constituted state transition diagram.In the artificial window of SIMULINK, allow the user to set up the condition and the incident of limited state and state transitions, thereby draw out the finite state machine system, so just can realize emulation to system.The simulation block diagram of Stateflow generally all can be embedded in the Simulink realistic model, and the conditioned disjunction of realizing state transitions simultaneously is that incident promptly can be taken from the Stateflow simulation block diagram, also can be from the Simulink realistic model [5]
5, HDL Coder (HDL speech coder)
HDL Coder is a functional module below the Simulink, it can Simulink model, MATLAB code and Stateflow block diagram generate position true (bit-true), cycle accurately (cycle-accurate), can be comprehensive Verilog and VHDL code.Through using the industrial standardization design tool, can carry out emulation to the HDL code of automatic generation with comprehensive, and further be mapped on FPGA and the asic chip.SimulinkHDL Coder can control architectural framework and the enforcement of HDL, and the critical path in the outstanding model generates the hardware resource utilization assessment.Simulink HDL Coder can also generate the realistic model of test and verification platform and EDASimulator Link, and the code tracking ability of the DO-254 workflow that provides support, thereby the HDL code that generates is verified fast [7]
Based on the fuzzy controller HDL code automatic generation method of MATLAB following example shows is arranged in order to explain in the prior art.
1 utilizes the Fuzzy Logic tool box design fuzzy controller of MATLAB
The purpose of this experiment is will the fuzzy controller of design be generated the HDL code automatically with MATLAB, to be used for FPGA.Owing to being embedded in the Fuzzy Controller element among the simulink, the fuzzy controller tank.fis with Fuzzy Logic design can not generate the HDL code automatically, so adopt LookupTable (LUT) to design fuzzy controller here so that can generate the HDL code automatically with the embedded HDL Coder of MATLAB.
This experiment is to design fuzzy controller according to the example Water Level Control in a Tank among the Demos, and this is standard two dimension mamdani (one a type of fuzzy controller title) fuzzy controller.Its input variable has two components, deviation e and deviation variation rate ec=de/dt, an output quantity u.Deviation e is given liquid level and the deviation of actual output liquid level, called after level here, and deviation variation rate is exactly a deviation rate over time, is called rate here, and output quantity is the aperture of valve, is valve here.This fuzzy controller has 5 control laws.
There are three fuzzy subset high, okay and low to cover fuzzy domain [1 for input variable level; 1] on; Input variable rate has three fuzzy subset negative, none and positive to cover fuzzy domain [0.1 equally; 0.1] on, output variable valve then has five fuzzy subset close_fast, close_slow, no_change, open_slow and open_fast to cover on the fuzzy domain [1,1].
The step that 2 usefulness look-up tables design fuzzy controller is replaced original high water tank fuzzy controller [7]:
2.1 make the degree of membership vector table of input/output variable
At first; As can be seen from Figure 4 the subordinate function of two input variable level and rate all is that Gaussian function and high, okay and low parameter are respectively [0.3-1], [0.30] and [0.31]; And the parameter of negative, none and positive is respectively [0.03-0.1], [0.030] and [0.030.1]; Output variable valve is a triangular function, and their parameter is respectively [1-0.9-0.8], [0.6-0.5-0.4], [0.1 0 0.1], [0.2 0.3 0.4] and [0.8 0.9 1].Here Gaussian function is to calculate by above parameter setting according to the function module Gaussian MF among the Fuzzy Logic Toolbox of simulink the inside in the degree of membership of respective point.It is following to get three input/output variable degree of membership vector tables by above analysis.
The degree of membership vector table of the degree of membership vector table table 2 input rate of table 1 input level
Figure BDA0000106329140000051
The degree of membership vector table of table 3 output valve
Figure BDA0000106329140000061
2.2 making control rule tables
According to five rules of rule base more in addition reasonable supplement to draw control rule tables as shown in table 4.
Table 4 fuzzy control rules table
Figure BDA0000106329140000071
Make the fuzzy controller look-up table according to above argumentation 2.3 press fuzzy reasoning mechanism and clearing principle according to above form, the value of known input variable level and rate can be found the value that fuzzy controller is exported control variable valve by above table.Because the value of level and rate is respectively from [1,1] and [0.1,0.1], and 11 points are all arranged, what therefore will formulate is the bivariate table of one 11 * 11 element, as shown in table 5.
Behavior level classifies rate as in the table 5, can find the value of exporting controlled quentity controlled variable valve according to the level of input and the value of rate, and the output controlled quentity controlled variable is the value of value on the point of crossing of two input quantities.Such as, level=-0.8, during rate=-0.04, the output controlled quentity controlled variable corresponds to valve=-0.8006.
Below with one group of data computing explanation.
If deviation level=-1, rate of change rate=-0.1, can be found by table 1 and 2:
level=-1→high(1)
When following formula was represented level=-1, its fuzzy language value was high (1), and the value in the bracket is its degree of membership.In like manner, can find:
rate=-0.1→negative(1)
Can draw rule by above two formula language values by table 4:
if?level?is?high(1)and?rate?is?negative(1)then?valve?is?close-fast(1)
The language value degree of membership of valve all adopts " getting little " operation to obtain according to regular former piece and rule implication in the above rule.Be that the degree of membership of high and negative is 1 in the rule, both get little, so consequent valve degree of membership also is 1.
Reverse gelatinization then, the output membership function is a symmetrical triangle, so it is simpler to adopt the central value method of average to carry out reverse gelatinization computing.The exact value of fuzzy controller output does
valve = - 0.9 × 1 1 = - 0.9
The value of valve=-0.9 is filled up to the point of crossing of level=-1 and rate=-0.1 in the control look-up table table 5, and the like, need calculate 11 * 11=121 data altogether, the formulation of completion high water tank fuzzy controller look-up table is referring to table 5.
Here the manual calculation workload is bigger, calculates this 121 data so design program.MATLAB program flow diagram such as Fig. 2.
3 realize the controller look-up table made from state machine
Newly-built model file is clicked the start button in the lower left corner, MATLAB master interface, selects simulink-stateflow-New Chart successively, in the model file editor window that ejects, double-clicks Chart.Editor generates as shown in Figure 7.The data of input are judged the value of respective column earlier; Search corresponding row again, the output lookup result has wherein embedded an eM function odata=df (idata); Each step at state flow chart has all been called this function; The function of this function is that to become to have symbol, 16 word lengths, fraction part length be 8 fixed-point number output to the data-switching with input.
Add data output of two data inputs for the Chart module, called after col, row and tab_out find in and out module again from the storehouse respectively; Pull the model file editing machine into, two in are wherein arranged, an out; Two input ends and an output terminal of two in and out and Chart module are connected; Choose all modules then, right button creat subsystem generates subsystem.
At last the subsystem that generates is replaced the Fuzzy Controller module in the original sltank.mdl file; Note behind the good line all will adding covert data type conversion module at two input and output sides of subsystem; The input end converter converts double into sfix16_En8; Output translator is then opposite, and operation does not make mistakes otherwise data type matches.
The order of amended model is saved as mysltank.mdl and operation, the result show with original example in effect the same, and stablize.
4 generate the HDL code with the subsystem in the above-mentioned model automatically in MATLAB
In the MATLAB command window, import hdlsetup (' mysltank '); Open model file mysltank.mdl and in window menu simulation, choose configuration parameters; HDL Coder is clicked in the lower left corner in the window that ejects, and generate HDL for drop-down menu is selected mysltank/subsystem1 (being the subsystem of above-mentioned generation) on the right, clicks Apply in the lower right corner; Click RunCompatibility Checker again; The detection compatibility is passed through, and clicks Generate at last and generates the HDL code automatically, in the MATLAB command window, clicks the link of operation generation and just can open the HDL code of generation.
Summary of the invention
The present invention provides a kind of fuzzy controller HDL code automatic generation method based on MATLAB.
Technical scheme of the present invention, a kind of fuzzy controller HDL code automatic generation method based on MATLAB comprises step:
Utilize the fuzzy controller of the Fuzzy Logic tool box acquisition model of MATLAB;
Utilize SystemTest tool making fuzzy controller look-up table;
The fuzzy controller look-up table of making is realized with state machine;
In MATLAB, generate the HDL code of said model automatically,
Wherein, the described SystemTest of utilization tool making fuzzy controller look-up table step comprises again:
To the once emulation in short-term of said model running, obtain first model file, newly-built second model file copies to second model file to the fuzzy control model of first model file,
Add a Simulink test elements in SystemTest, for Main Test, with second model file as model to be tested,
Make up test vector and test variable; The number of test vector is consistent with the input number of second model file; The scope of test vector is consistent with the scope of each input, and selects suitable step-length, and test vector is as the input signal of model measurement; The output signal of model measurement leaves in the test variable of foundation
The test vector of setting up and the input port of second model file are set up mapping relations, the test variable of setting up and the delivery outlet of second model are set up mapping relations.
Test variable and saving result variable are set up mapping, make the result of test variable can be able to preserve.
The operation test, the fuzzy control table that said test is generated is made for a look-up table, replaces fuzzy controller module and operation in the said model with said look-up table then, checks and verify the fuzzy control table control effect that said test generates.
The present invention mainly utilizes the Systemtest instrument among the MATLAB to generate look-up table efficiently, only need click the mouse, and just can generate look-up table, simple, make things convenient for, workload is little, overcome the shortcoming of prior art.
The HDL Coder that the present invention has also solved MATLAB can not directly generate two-dimensional look-up table the problem of HDL code.
Description of drawings
Fig. 1 is structure of fuzzy controller figure
Fig. 2 calculates the MATLAB program flow diagram of fuzzy controller look-up table
The output test signal is to the input test signal surface chart in Fig. 3 embodiment of the invention
Embodiment
Because going up directly at FPGA (field programmable gate array), the realization FUZZY ALGORITHMS FOR CONTROL is not an easy thing; The present invention is that example has proposed a kind of fuzzy controller HDL code automatic generation method based on MATLAB with the high water tank fuzzy control, and the code of generation can be transplanted on the FPGA control system.
1 utilizes the Fuzzy Logic tool box design fuzzy controller of MATLAB
The objective of the invention is and will the fuzzy controller of design be generated the HDL code automatically with MATLAB, to be used for FPGA.Owing to being embedded in the Fuzzy Controller element among the simulink, the fuzzy controller tank.fis with Fuzzy Logic design can not generate the HDL code automatically, so adopt LookupTable (LUT) to design fuzzy controller here so that can generate the HDL code automatically with the embedded HDL Coder of MATLAB.
The present invention designs fuzzy controller according to the example Water Level Control in a Tank among the Demos, and this is standard two dimension mamdani (one a type of fuzzy controller title) fuzzy controller.Its input variable has two components, deviation e and deviation variation rate ec=de/dt, an output quantity u.Deviation e is given liquid level and the deviation of actual output liquid level, called after level here, and deviation variation rate is exactly a deviation rate over time, is called rate here, and output quantity is the aperture of valve, is valve here.This fuzzy controller has 5 control laws.
There are three fuzzy subset high, okay and low to cover fuzzy domain [1 for input variable level; 1] on; Input variable rate has three fuzzy subset negative, none and positive to cover fuzzy domain [0.1 equally; 0.1] on, output variable valve then has five fuzzy subset close_fast, close_slow, no_change, open_slow and open_fast to cover on the fuzzy domain [1,1].
2 utilize the step of SystemTest tool making look-up table
The first step: operation MATLAB 2010a.
Second step: in the MATLAB command window, import sltank, open high water tank fuzzy control model file by enter key.
The 3rd step: the emulation stand-by time is set to 0.1, and operation once stops.Save as desk file to this model, can name or use default filename in addition, here called after fuzzy.
The 4th step: a newly-built then model file copies to new file to the fuzzy control model in the sltank model.Preserve this document, use default filename.
The 5th step: the newly-built model file menu of click SystemTest get into the system testing interface; Click again and choose test interface left-hand column Main Test item; Click New drop-down menu is selected the Simulink option below the TestElement; Added a Simulink test elements for Main Test
The 6th step: the model of preserving for the 4th step on the right, red frame hurdle adds to come in, and just this model is a model to be tested.
The 7th step: two test vectors of definition in Test Vectors item, variable name use acquiescence.TestVector1=[1:0.1:1], TestVector2=[0.1:0.02:0.1] defines test variable, t_sig in Test Variables.
The 8th step: test vector TestVector1=[1:0.1:1], TestVector2=[0.1:0.02:0.1] is mapped to the input port in1 that controller is stuck with paste in the institute's modeling of the 4th step respectively, and in2 is as input test signal.Being mapped to this step operation of fuzzy controller delivery outlet out1. to test variable t_sig is, chooses the Simulink item at the test interface left end, selects the Properties tab at right-hand member.The output mapping is provided with in the Properties tab equally; The right slide block is slided into lowermost end; Click Assign Model Output to SystemTest Data; Click New Mapping drop-down menu again and select Output Signal, then Simulink Data and SystemTest Data are done corresponding setting.Note Define test signal time: select Manually specifyatime step option.
Test vector shines upon to the model input port:
Inport?Block?Name SystemTest?Data
In1 TestVector1
In2 TestVector2
The mapping of model delivery outlet:
Mapping?Type Simulink?Data SystemTest?Data
Outport?Signal Out1 t_sig
The 9th step, under test interface left-hand column Main Test, click Save Results item, hurdle point New Mapping on the right, the newly-increased click drop-down menu selection t_sig of delegation below Test Variable then,
In the tenth step, EOT is waited in the operation test.
The 11 step, test successfully end after, test interface point Test Results Viewer, put the Surf Plot in the toolbar again, X, Y, Z are set to TestVector1 respectively, TestVector2, t_sig. point Plot button is seen like Fig. 3.
The 12 step, TestVector1, TestVector2; T_sig outputs to the MATLAB space, the left end at TestResults Viewer interface, and right click t_sig jumps out popup menu; Point Export, in like manner to TestVector1, TestVector2 carries out same operation.
In the 13 step, in the MATLAB work space, choose t_sig and double-click. can see the table of 51 21X11, the numerical value in every table all is the same,
The 14 step, get back to the SIMULINK water level fuzzy control model in the 3rd step, drag one to two-dimensional polling list to model in the Lookup Table from the SIMULINK storehouse, remove the fuzzy controller of original model, comprise that MUX of its front also removes.
The 15 step: replace the model of fuzzy controller at last with question blank, the emulation stand-by time be made as 1000, operation, the result with fuzzy controller was the same originally can stable operation.
3 realize the controller look-up table made from state machine
Newly-built model file is clicked the start button in the lower left corner, MATLAB master interface, selects simulink-stateflow-New Chart successively, in the model file editor window that ejects, double-clicks Chart.The data of input are judged the value of respective column earlier; Search corresponding row again, the output lookup result has wherein embedded an eM (embedded MATLAB function) function odata=df (idata); Each step at state flow chart has all been called this function; The function of this function is that to become to have symbol, 16 word lengths, fraction part length be 8 fixed-point number output to the data-switching with input.
Add data output of two data inputs for the Chart module, called after col, row and tab_out find in and out module again from the storehouse respectively; Pull the model file editing machine into, two in are wherein arranged, an out; Two input ends and an output terminal of two in and out and Chart module are connected; Choose all modules then, right button is selected creat subsystem, generates subsystem.
At last the subsystem that generates is replaced the Fuzzy Controller module in the original sltank.mdl file; Note behind the good line all will adding covert data type conversion module at two input and output sides of subsystem; The input end converter converts double into sfix16_En8; Output translator is then opposite, and operation does not make mistakes otherwise data type matches.
Amended model is saved as mysltank.mdl and operation, the result show with original example in effect the same, and stablize.
4 generate the HDL code with the subsystem in the above-mentioned model automatically in MATLAB
In the MATLAB command window, import hdlsetup (' mysltank '); Open model file mysltank.mdl and in window menu simulation, choose configuration parameters; HDL Coder is clicked in the lower left corner in the window that ejects, and generate HDL for drop-down menu is selected mysltank/subsystem1 (being the subsystem of above-mentioned generation) on the right, clicks Apply in the lower right corner; Click RunCompatibility Checker again; The detection compatibility is passed through, and clicks Generate at last and generates the HDL code automatically, in the MATLAB command window, clicks the link of operation generation and just can open the HDL code of generation.
Realizing the controller look-up table of making in this step with state machine; Be to realize the state flow graph among the present invention with the If-else structure; Also can utilize the switch-case structure to realize the state flow graph, can also realize look-up table according to the model of other types (procedural model of the textual form of writing such as embedded MATLAB function).

Claims (1)

1. the fuzzy controller HDL code automatic generation method based on MATLAB is characterized in that, comprises step:
Utilize the fuzzy controller of the Fuzzy Logic tool box acquisition model of MATLAB;
Utilize SystemTest tool making fuzzy controller look-up table;
The fuzzy controller look-up table of making is realized with state machine;
In MATLAB, generate the HDL code of said model automatically,
Wherein, the described SystemTest of utilization tool making fuzzy controller look-up table step comprises again:
To the once emulation in short-term of said model running, obtain first model file, newly-built second model file copies to second model file to the fuzzy control model of first model file,
Add a Simulink test elements in SystemTest, for Main Test, with second model file as model to be tested,
Make up test vector and test variable; The number of test vector is consistent with the input number of second model file; The scope of test vector is consistent with the scope of each input, and selects suitable step-length, and test vector is as the input signal of model measurement; The output signal of model measurement leaves in the test variable of foundation
The test vector of setting up and the input port of second model file are set up mapping relations, the test variable of setting up and the delivery outlet of second model are set up mapping relations,
Test variable and saving result variable are set up mapping, make the result of test variable can be able to preserve,
The operation test, the fuzzy control table that said test is generated is made for a look-up table, replaces fuzzy controller module and operation in the said model with said look-up table then, checks and verify the fuzzy control table control effect that said test generates.
CN2011103492979A 2011-11-08 2011-11-08 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method Pending CN102393819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103492979A CN102393819A (en) 2011-11-08 2011-11-08 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103492979A CN102393819A (en) 2011-11-08 2011-11-08 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method

Publications (1)

Publication Number Publication Date
CN102393819A true CN102393819A (en) 2012-03-28

Family

ID=45861148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103492979A Pending CN102393819A (en) 2011-11-08 2011-11-08 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method

Country Status (1)

Country Link
CN (1) CN102393819A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133948A (en) * 2014-07-16 2014-11-05 潍柴动力股份有限公司 Simulation model generation method, simulation model generation system and simulation model
CN104199652A (en) * 2014-08-26 2014-12-10 邱涌 C TO HDL synchronous mapping method based on data flow

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133948A (en) * 2014-07-16 2014-11-05 潍柴动力股份有限公司 Simulation model generation method, simulation model generation system and simulation model
CN104133948B (en) * 2014-07-16 2018-02-02 潍柴动力股份有限公司 A kind of simulation model generation method, system and simulation model
CN104199652A (en) * 2014-08-26 2014-12-10 邱涌 C TO HDL synchronous mapping method based on data flow

Similar Documents

Publication Publication Date Title
Rong et al. The research of regression model in machine learning field
Raissi et al. Multistep neural networks for data-driven discovery of nonlinear dynamical systems
Tian et al. A recommender system for metaheuristic algorithms for continuous optimization based on deep recurrent neural networks
CN110445126A (en) A kind of non-intrusion type load decomposition method and system
TW201947510A (en) Insurance service risk prediction processing method, device and processing equipment
CN111127246A (en) Intelligent prediction method for transmission line engineering cost
CN107665248A (en) File classification method and device based on deep learning mixed model
Popping et al. Network approaches in text analysis
CN102393819A (en) MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method
Han et al. Deep belief rule based photovoltaic power forecasting method with interpretability
Ruan et al. An ordered weighted averaging operator-based cumulative belief degree approach for energy policy evaluation
Yang et al. Reliability assessment of CNC machining center based on Weibull neural network
Kumar et al. A framework for assessing the evolvability characteristics along with sub-characteristics in AOSQ model using fuzzy logic tool
CN112579775B (en) Method for classifying unstructured text and computer-readable storage medium
Lee On models, modelling and the distinctive nature of model‐based reasoning
Riid et al. Interpretability of fuzzy systems and its application to process control
CN107358494A (en) A kind of client requirement information method for digging based on big data
CN105871630A (en) Method for determining Internet surfing behavior categories of network users
Brilhante et al. Metadata-supported automated ecological modelling
Sommer et al. Recent progress in the EVA Project: Evaluation of Visionary Architectural concepts–State of the art
Baur et al. Explainability and interpretability in electric load forecasting using machine learning techniques–A review
Li et al. Navigating the Evolution of Digital Twins Research through Keyword Co-Occurence Network Analysis
Xu et al. A novel FRBF-Type model for nonlinear time series prediction
El-Rashidy et al. Efficient online detection system of power disturbances based on Deep-Learning approach
Yang et al. The modeling of time series based fuzzy cognitive maps and its application in the furnace temperature prediction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120328