Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and extract controller 2. Discretize Change integrator blocks.

Similar presentations


Presentation on theme: "1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and extract controller 2. Discretize Change integrator blocks."— Presentation transcript:

1 1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and extract controller 2. Discretize Change integrator blocks Change solver 3. Assign Data Types Default double to single, boolean, etc. Pitch Controller 4. Generate Code SIL Testing, PIL Testing, Production code, reports Output Data (Discretized) Output Data (Data Types) Output Data (Prod. Code) 5. Test controller in closed-loop system Input Data (Reference) 2 3 4 5 Input Data (Wind Data) 1 Output Data (Reference) 1

2 2 Steps for Production Code Generation  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 1. Generate test data and extract controller Output Data (Reference) ?? = Output Data (Modified) Wind Turbine Pitch Controller Input Data (Reference) 1 Output Data (Reference) 1

3 3 Steps for Production Code Generation  Discrete integrators needed for embedded controllers –Replaced using Model Discretizer  Step-size adjusted for maximum speed and acceptable accuracy –Parameterized with MATLAB variables Pitch Controller 2. Discretize Change integrator blocks Change to discrete solver Identify proper step size Output Data (Discretized) Input Data (Reference) Pitch Controller 2 Output Data (Reference)

4 4 Steps for Production Code Generation  Data types assigned to variables to specify memory allocation on controller  Storage classes are assigned to variables to define how they are implemented on the target –Global, pointers, etc. –Decouples model from embedded target Pitch Controller 3. Assign Data Types Default double to single, boolean, etc. Output Data (Discretized) Input Data (Reference) Pitch Controller 3 Output Data (Reference)

5 5 Steps for Production Code Generation  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 Simulink Coder Pitch Controller Output Data (Prod. Code) Input Data (Reference) Pitch Controller 4 Output Data (Reference) 4. Generate Code Production Code

6 6 Steps for Production Code Generation  Replace controller in simulation model with production code  Re-run simulation to verify performance against system specification Pitch Controller 5. Test controller in closed-loop system Wind Turbine Pitch Controller Output Data (Prod. Code) 5


Download ppt "1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and extract controller 2. Discretize Change integrator blocks."

Similar presentations


Ads by Google