+ All Categories
Home > Documents > 1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and...

1 Steps for Production Code Generation Wind Turbine Pitch Controller 1. Generate test data and...

Date post: 18-Dec-2015
Category:
Upload: georgia-malone
View: 218 times
Download: 1 times
Share this document with a friend
Popular Tags:
6
1 Steps for Production Code Generation Wind Turbine Pitch Controll er Pitch Controll er Pitch Controll er 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 Controll er 4. Generate Code SIL Testing, PIL Testing, Production code, reports Output Data (Discretiz ed) 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
Transcript

1

Steps for Production Code Generation

Wind Turbine

PitchController

PitchController

PitchController

1. Generate test data and extract controller

2. Discretize Change integrator blocks Change solver

3. Assign Data Types Default double to single, boolean, etc.

PitchController

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

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

PitchController

Input Data(Reference)

1

Output Data(Reference)

1

3

Steps for Production Code Generation

Discrete integrators needed for embedded controllers– Replaced using Model Discretizer

Step-size adjusted formaximum speed and acceptable accuracy– Parameterized with MATLAB variables

PitchController

2. Discretize Change integrator blocks Change to discrete solver Identify proper step size

Output Data(Discretized)

Input Data(Reference)

PitchController

2Output Data(Reference)

4

Steps for Production Code Generation

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

PitchController

3. Assign Data Types Default double to single, boolean, etc.

Output Data(Discretized)

Input Data(Reference)

PitchController

3Output Data(Reference)

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

PitchController

Output Data(Prod. Code)

Input Data(Reference)

PitchController

4Output Data(Reference)

4. Generate Code

ProductionCode

6

Steps for Production Code Generation

Replace controller in simulationmodel with production code

Re-run simulation to verify performance against system specification

PitchController

5. Test controller in closed-loop system

Wind Turbine

PitchController

Output Data(Prod. Code)

5


Recommended