1 / 6

Steps for Production Code Generation

Steps for Production Code Generation. 1. Generate test data and extract controller. Input Data (Wind Data). 1. Wind Turbine. Output Data (Reference). Pitch Controller. 2. 1. 2. Discretize Change integrator blocks Change solver. Output Data ( Discretized ).

caden
Download Presentation

Steps for Production Code Generation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. StepsforProduction Code Generation 1. Generatetestdataandextractcontroller Input Data(Wind Data) 1 Wind Turbine Output Data(Reference) PitchController 2 1 2. Discretize Change integratorblocks Change solver Output Data(Discretized) Input Data(Reference) PitchController PitchController PitchController 3 5 3. Assign Data Types Default double tosingle, boolean, etc. Output Data(Data Types) 4 4. Generate Code SIL Testing, PIL Testing,Productioncode, reports Output Data(Prod. Code) 5. Test controller in closed-loopsystem

  2. StepsforProduction Code Generation 1. Generatetestdataandextractcontroller 1 Wind Turbine • Used for continuous verification • With each change, verify results are still acceptable • Test data generated using full model and signal logging • Script used to compare results Output Data(Reference) PitchController ?? = 1 Output Data(Reference) Output Data(Modified) Input Data(Reference)

  3. StepsforProduction Code Generation 2. Discretize Change integratorblocks Change todiscretesolver Identify proper step size PitchController • Discrete integrators needed for embedded controllers • Replaced using Model Discretizer • Step-size adjusted formaximum speed and acceptable accuracy • Parameterized with MATLAB variables Output Data(Reference) 2 Output Data(Discretized) Input Data(Reference) PitchController

  4. StepsforProduction Code Generation 3. Assign Data Types Default double tosingle, boolean, etc. PitchController • Data types assigned to variablesto specify memory allocationon controller • Storage classes are assignedto variables to define how theyare implemented on the target • Global, pointers, etc. • Decouples model from embedded target Output Data(Reference) 3 PitchController Output Data(Discretized) Input Data(Reference)

  5. StepsforProduction Code Generation 4. Generate Code PitchController • Code generated for SIL(Software-in-the-Loop) and for embedded target • Reports generated include information on interfacing to custom code and traceability • Done using Real-Time Workshop Embedded Coder Output Data(Reference) 4 PitchController Output Data(Prod. Code) Input Data(Reference) ProductionCode

  6. StepsforProduction Code Generation 5. Test controller inclosed-loopsystem Output Data(Prod. Code) Wind Turbine • Replace controller in simulationmodel with production code • Re-run simulation to verify performance against system specification PitchController 5 PitchController

More Related